Skip to content

Commit c86ee3e

Browse files
committed
revert: "test(home-page): remove link tests"
This reverts commit eb350b4.
1 parent 6cdd700 commit c86ee3e

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

tests/home-page.spec.ts

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,55 @@
1-
import { test } from "@playwright/test";
1+
import { expect, test } from "@playwright/test";
2+
3+
const squonkLogo =
4+
"img[alt=\"Squonk \\(animal\\) logo with title text \\'Squonk\\' and subtitle \\'Data Manager\\'\"]";
25

36
test.describe("home page", () => {
47
test("loads", async ({ baseURL, page }) => {
58
await page.goto(baseURL + "/");
69
});
10+
11+
test("links work", async ({ page, baseURL }) => {
12+
baseURL = baseURL ?? "";
13+
14+
// Go to http://localhost:3000/
15+
await page.goto(baseURL);
16+
17+
// Click text=Documentation
18+
await page.locator("text=Documentation").click();
19+
// Click text=Concepts
20+
await page.locator("text=Concepts").click();
21+
await expect(page).toHaveURL(baseURL + "/docs/concepts");
22+
// Click img[alt="Squonk \(animal\) logo with title text \'Squonk\' and subtitle \'Data Manager\'"]
23+
await page.locator(squonkLogo).click();
24+
await expect(page).toHaveURL(baseURL);
25+
// Click text=Documentation
26+
await page.locator("text=Documentation").click();
27+
// Click text=Guided Tour
28+
await page.locator("text=Guided Tour").click();
29+
await expect(page).toHaveURL(baseURL + "/docs/guided-tour");
30+
// Click img[alt="Squonk \(animal\) logo with title text \'Squonk\' and subtitle \'Data Manager\'"]
31+
await page.locator(squonkLogo).click();
32+
await expect(page).toHaveURL(baseURL);
33+
// Click text=Documentation
34+
await page.locator("text=Documentation").click();
35+
// Click text=How To Guides
36+
await page.locator("text=How To Guides").click();
37+
await expect(page).toHaveURL(baseURL + "/docs/how-to");
38+
// Click img[alt="Squonk \(animal\) logo with title text \'Squonk\' and subtitle \'Data Manager\'"]
39+
await page.locator(squonkLogo).click();
40+
await expect(page).toHaveURL(baseURL);
41+
// Click text=Documentation
42+
await page.locator("text=Documentation").click();
43+
// Click text=Deployed jobs
44+
await page.locator("text=Deployed jobs").click();
45+
await expect(page).toHaveURL(baseURL + "/docs/jobs");
46+
// Click img[alt="Squonk \(animal\) logo with title text \'Squonk\' and subtitle \'Data Manager\'"]
47+
await page.locator(squonkLogo).click();
48+
await expect(page).toHaveURL(baseURL);
49+
// Click text=Documentation
50+
await page.locator("text=Documentation").click();
51+
// Click text=Developer docs
52+
await page.locator("text=Developer docs").click();
53+
await expect(page).toHaveURL(baseURL + "/docs/developer");
54+
});
755
});

0 commit comments

Comments
 (0)