-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(e2e-test): [Test automation] Verify Home Page can be customized (…
…#2035) * chore(e2e-test): [Test automation] Verify Home Page can be customized * Fixed appConfig * Updated test names * Added new config for homepage and sidebar
- Loading branch information
Showing
6 changed files
with
221 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
180 changes: 180 additions & 0 deletions
180
.ibm/pipelines/resources/config_map/dynamic-homepage-and-sidebar-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
dynamicPlugins: | ||
rootDirectory: dynamic-plugins-root | ||
frontend: | ||
red-hat-developer-hub.backstage-plugin-dynamic-home-page: | ||
mountPoints: | ||
- mountPoint: home.page/cards | ||
importName: SearchBar | ||
config: | ||
layouts: | ||
xl: { w: 10, h: 1, x: 1 } | ||
lg: { w: 10, h: 1, x: 1 } | ||
md: { w: 10, h: 1, x: 1 } | ||
sm: { w: 10, h: 1, x: 1 } | ||
xs: { w: 12, h: 1 } | ||
xxs: { w: 12, h: 1 } | ||
- mountPoint: home.page/cards | ||
importName: QuickAccessCard | ||
config: | ||
layouts: | ||
xl: { w: 7, h: 8 } | ||
lg: { w: 7, h: 8 } | ||
md: { w: 7, h: 8 } | ||
sm: { w: 12, h: 8 } | ||
xs: { w: 12, h: 8 } | ||
xxs: { w: 12, h: 8 } | ||
- mountPoint: home.page/cards | ||
importName: CatalogStarredEntitiesCard | ||
config: | ||
layouts: | ||
xl: { w: 5, h: 4, x: 7 } | ||
lg: { w: 5, h: 4, x: 7 } | ||
md: { w: 5, h: 4, x: 7 } | ||
sm: { w: 12, h: 4 } | ||
xs: { w: 12, h: 4 } | ||
xxs: { w: 12, h: 4 } | ||
|
||
- mountPoint: home.page/cards | ||
importName: Headline | ||
config: | ||
layouts: | ||
xl: { w: 12, h: 1 } | ||
lg: { w: 12, h: 1 } | ||
md: { w: 12, h: 1 } | ||
sm: { w: 12, h: 1 } | ||
xs: { w: 12, h: 1 } | ||
xxs: { w: 12, h: 1 } | ||
props: | ||
title: Placeholder tests | ||
align: center | ||
|
||
- mountPoint: home.page/cards | ||
importName: Placeholder | ||
config: | ||
layouts: | ||
xl: { x: 1, y: 0, w: 10, h: 1 } | ||
lg: { x: 1, y: 0, w: 10, h: 1 } | ||
md: { x: 1, y: 0, w: 10, h: 1 } | ||
sm: { x: 0, y: 0, w: 12, h: 1 } | ||
xs: { x: 0, y: 0, w: 12, h: 1 } | ||
xxs: { x: 0, y: 0, w: 12, h: 1 } | ||
props: | ||
showBorder: true | ||
debugContent: Home page customization test 1 | ||
- mountPoint: home.page/cards | ||
importName: Placeholder | ||
config: | ||
layouts: | ||
xl: { x: 0, y: 0, w: 7, h: 4 } | ||
lg: { x: 0, y: 0, w: 7, h: 4 } | ||
md: { x: 0, y: 0, w: 7, h: 4 } | ||
sm: { x: 0, y: 0, w: 12, h: 4 } | ||
xs: { x: 0, y: 0, w: 12, h: 4 } | ||
xxs: { x: 0, y: 0, w: 12, h: 4 } | ||
props: | ||
showBorder: true | ||
debugContent: Home page customization test 2 | ||
- mountPoint: home.page/cards | ||
importName: Placeholder | ||
config: | ||
layouts: | ||
xl: { x: 7, y: 0, w: 5, h: 4 } | ||
lg: { x: 7, y: 0, w: 5, h: 4 } | ||
md: { x: 7, y: 0, w: 5, h: 4 } | ||
sm: { x: 0, y: 0, w: 12, h: 4 } | ||
xs: { x: 0, y: 0, w: 12, h: 4 } | ||
xxs: { x: 0, y: 0, w: 12, h: 4 } | ||
props: | ||
showBorder: true | ||
debugContent: Home page customization test 3 | ||
- mountPoint: home.page/cards | ||
importName: Headline | ||
config: | ||
layouts: | ||
xl: { w: 12, h: 1 } | ||
lg: { w: 12, h: 1 } | ||
md: { w: 12, h: 1 } | ||
sm: { w: 12, h: 1 } | ||
xs: { w: 12, h: 1 } | ||
xxs: { w: 12, h: 1 } | ||
props: | ||
title: Markdown tests | ||
align: center | ||
|
||
- mountPoint: home.page/cards | ||
importName: MarkdownCard | ||
config: | ||
layouts: | ||
xl: { w: 6, h: 4 } | ||
lg: { w: 6, h: 4 } | ||
md: { w: 6, h: 4 } | ||
sm: { w: 6, h: 4 } | ||
xs: { w: 6, h: 4 } | ||
xxs: { w: 6, h: 4 } | ||
props: | ||
title: Company links | ||
content: | | ||
### RHDH | ||
* [Website](https://developers.redhat.com/rhdh/overview) | ||
* [Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/) | ||
* [GitHub Showcase](https://github.com/janus-idp/backstage-showcase) | ||
* [GitHub Plugins](https://github.com/janus-idp/backstage-plugins) | ||
- mountPoint: home.page/cards | ||
importName: Markdown | ||
config: | ||
layouts: | ||
xl: { w: 6, h: 4, x: 6 } | ||
lg: { w: 6, h: 4, x: 6 } | ||
md: { w: 6, h: 4, x: 6 } | ||
sm: { w: 6, h: 4, x: 6 } | ||
xs: { w: 6, h: 4, x: 6 } | ||
xxs: { w: 6, h: 4, x: 6 } | ||
props: | ||
title: Important company links | ||
content: | | ||
### RHDH | ||
* [Website](https://developers.redhat.com/rhdh/overview) | ||
* [Documentation](https://docs.redhat.com/en/documentation/red_hat_developer_hub/) | ||
* [GitHub Showcase](https://github.com/janus-idp/backstage-showcase) | ||
* [GitHub Plugins](https://github.com/janus-idp/backstage-plugins) | ||
- mountPoint: home.page/cards | ||
importName: FeaturedDocsCard | ||
- mountPoint: home.page/cards | ||
importName: JokeCard | ||
default.main-menu-items: | ||
menuItems: | ||
default.list: | ||
title: References | ||
icon: bookmarks | ||
default.apis: | ||
parent: default.list | ||
default.learning-path: | ||
parent: default.list | ||
backstage.plugin-techdocs: | ||
menuItems: | ||
favorites: | ||
title: Favorites | ||
icon: star | ||
priority: 10 | ||
docs: | ||
parent: favorites | ||
priority: 1 | ||
pataknight.backstage-plugin-rhdh-qe-theme: | ||
appIcons: | ||
- importName: LightIcon | ||
name: lightIcon | ||
- importName: DarkIcon | ||
name: darkIcon | ||
themes: | ||
- icon: lightIcon | ||
id: light-dynamic | ||
importName: lightThemeProvider | ||
title: Light Dynamic | ||
variant: light | ||
- icon: darkIcon | ||
id: dark-dynamic | ||
importName: darkThemeProvider | ||
title: Dark Dynamic | ||
variant: dark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { test } from "@playwright/test"; | ||
import { UIhelper } from "../utils/ui-helper"; | ||
import { Common } from "../utils/common"; | ||
|
||
test.describe("Home page customization", () => { | ||
let common: Common; | ||
let uiHelper: UIhelper; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
uiHelper = new UIhelper(page); | ||
common = new Common(page); | ||
await common.loginAsGuest(); | ||
}); | ||
|
||
test("Verify that home page is customized", async () => { | ||
await uiHelper.verifyTextinCard("Quick Access", "Quick Access"); | ||
await uiHelper.verifyTextinCard( | ||
"Your Starred Entities", | ||
"Your Starred Entities", | ||
); | ||
await uiHelper.verifyHeading("Placeholder tests"); | ||
await uiHelper.verifyDivHasText("Home page customization test 1"); | ||
await uiHelper.verifyDivHasText("Home page customization test 2"); | ||
await uiHelper.verifyDivHasText("Home page customization test 3"); | ||
await uiHelper.verifyHeading("Markdown tests"); | ||
await uiHelper.verifyTextinCard("Company links", "Company links"); | ||
await uiHelper.verifyHeading("Important company links"); | ||
await uiHelper.verifyHeading("RHDH"); | ||
await uiHelper.verifyTextinCard("Featured Docs", "Featured Docs"); | ||
await uiHelper.verifyTextinCard("Random Joke", "Random Joke"); | ||
await uiHelper.clickButton("Reroll"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters