Skip to content

Commit

Permalink
test: fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
katharinawuensche committed Sep 24, 2024
1 parent 1bad27d commit 5b33175
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e2e/tests/app/i18n.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ test.describe("i18n", () => {

test("with unsupported locale", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveURL("/en");
await expect(page).toHaveURL("/de");
});
});

test("should display not-found page for unknown locale", async ({ page }) => {
const response = await page.goto("/unknown");
expect(response?.status()).toBe(404);
await expect(page.getByRole("heading", { name: "Page not found" })).toBeVisible();
await expect(page.getByRole("heading", { name: "Seite nicht gefunden" })).toBeVisible();
});

test("should display localised not-found page for unknown pathname", async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/app/metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test("should set a canonical url", async ({ page }) => {

test("should set document title on not-found page", async ({ page }) => {
await page.goto("/unknown");
await expect(page).toHaveTitle("Page not found | SiCProD");
await expect(page).toHaveTitle("Seite nicht gefunden | SiCProD");

await page.goto("/de/unknown");
await expect(page).toHaveTitle("Seite nicht gefunden | SiCProD");
Expand Down

0 comments on commit 5b33175

Please sign in to comment.