-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathhome-page-customization.spec.ts
More file actions
58 lines (48 loc) · 2.38 KB
/
Copy pathhome-page-customization.spec.ts
File metadata and controls
58 lines (48 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { test } from "@support/coverage/test";
import { HomePage } from "../support/pages/home-page";
import { runAccessibilityTests } from "../utils/accessibility";
test.describe("Home page customization", () => {
let homePage: HomePage;
test.beforeAll(() => {
test.info().annotations.push({
type: "component",
description: "core",
});
});
test.beforeEach(({ guestPage }) => {
homePage = new HomePage(guestPage);
});
test("Verify that home page is customized", async ({ page }, testInfo) => {
await homePage.verifyTextInCard("Quick Access", "Quick Access");
await runAccessibilityTests(page, testInfo);
await homePage.verifyTextInCard("Your Starred Entities", "Your Starred Entities");
await homePage.verifyHeading("Placeholder tests");
await homePage.verifyDivHasText("Home page customization test 1");
await homePage.verifyDivHasText("Home page customization test 2");
await homePage.verifyDivHasText("Home page customization test 3");
await homePage.verifyHeading("Markdown tests");
await homePage.verifyTextInCard("Company links", "Company links");
await homePage.verifyHeading("Important company links");
await homePage.verifyHeading("RHDH");
await homePage.verifyTextInCard("Featured Docs", "Featured Docs");
await homePage.verifyTextInCard("Random Joke", "Random Joke");
await homePage.clickButton("Reroll");
});
test("Verify that the Top Visited card in the Home page renders without an error", async () => {
await homePage.verifyTextInCard("Top Visited", "Top Visited");
await homePage.verifyVisitedCardContent("Top Visited");
});
test("Verify that the Recently Visited card in the Home page renders without an error", async () => {
await homePage.verifyTextInCard("Recently Visited", "Recently Visited");
await homePage.verifyVisitedCardContent("Recently Visited");
});
test("Verify Customized Quick Access", async () => {
// Expanded by default
await homePage.verifyQuickAccess("Developer Tools", "Podman Desktop");
await homePage.verifyQuickAccess("CI/CD Tools", ["ArgoCD", "SonarQube", "Quay.io"]);
await homePage.verifyQuickAccess("OpenShift Clusters", "OpenShift");
// Collapsed by default
await homePage.verifyQuickAccess("Monitoring Tools", "Grafana", true);
await homePage.verifyQuickAccess("Security Tools", ["GitHub Security", "Keycloak"], true);
});
});