Skip to content

Commit 8de22c8

Browse files
committed
finished first test
1 parent 53a9f2b commit 8de22c8

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

playwright/example.spec.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,70 @@ import { test, expect } from "@playwright/test";
33
test("Example", async ({ page }) => {
44
await page.goto("");
55
expect(await page.getByRole("main").getByRole("link").all()).toHaveLength(22);
6+
await expect(page.getByRole("main").getByRole("heading").first()).toHaveText(
7+
/Welcome/,
8+
);
9+
10+
await expect(page.locator(".text-lg").first()).toHaveText(
11+
"🧪 Practice Exams Platform",
12+
);
13+
await expect(page.locator(".text-lg").last()).toHaveText(
14+
"Select an exam from the list bellow.",
15+
);
16+
17+
const examHeaders = [
18+
"AWS Certified ANS-C01",
19+
"AWS Certified CLF-C02",
20+
"AWS Certified DAS-C01",
21+
"AWS Certified DBS-C01",
22+
"AWS Certified DVA-C02",
23+
"AWS Certified MLS-C01",
24+
"AWS Certified SAA-C03",
25+
"AWS Certified SCS-C02",
26+
"GCP ACE",
27+
"ITIL 4 Foundation",
28+
"Microsoft Azure AZ-104",
29+
"Microsoft Azure AZ-204",
30+
"Microsoft Azure AZ-305",
31+
"Microsoft Azure AZ-400",
32+
"Microsoft Azure AZ-500",
33+
"Microsoft Azure AZ-800",
34+
"Microsoft Azure AZ-900",
35+
"Microsoft Azure SC-900",
36+
"PSD I",
37+
"PSM I",
38+
"PSM II",
39+
"PSPO I",
40+
];
41+
42+
const examParagraphs = [
43+
"AWS Certified Advanced Networking Specialty",
44+
"AWS Certified Cloud Practitioner",
45+
"AWS Certified Data Analytics Specialty",
46+
"AWS Certified Database Specialty",
47+
"AWS Certified Developer Associate",
48+
"AWS Certified Machine Learning Specialty",
49+
"AWS Certified Solutions Architect Associate",
50+
"AWS Certified Security Specialty",
51+
"GCP Associate Cloud Engineer",
52+
"IT Service Management",
53+
"Microsoft Azure Administrator",
54+
"Developing Solutions for Azure",
55+
"Designing Microsoft Azure Infrastructure Solutions",
56+
"Designing and Implementing Microsoft DevOps Solutions",
57+
"Azure Security Engineer",
58+
"Windows Server Hybrid Administrator",
59+
"Microsoft Azure Fundamentals",
60+
"Microsoft Security, Compliance, and Identity Fundamentals",
61+
"Scrum Developer I for PSD I",
62+
"Scrum Master I for PSM I",
63+
"Scrum Master II for PSM II",
64+
"Scrum Product Owner I for PSPO I",
65+
];
66+
67+
let index = 0;
68+
for (const link of await page.getByRole("main").getByRole("link").all()) {
69+
await expect(link.locator("h2")).toHaveText(examHeaders[index]);
70+
await expect(link.locator("p")).toHaveText(examParagraphs[index++]);
71+
}
672
});

0 commit comments

Comments
 (0)