Skip to content

Commit

Permalink
Move search-api test
Browse files Browse the repository at this point in the history
- government-frontend doesn't use search api as of
  alphagov/government-frontend#3419
- frontend uses it now, but also we've removed the
  schema-name identifiers from main, so we have to update
  the locator.
  • Loading branch information
KludgeKML committed Feb 3, 2025
1 parent 46d5761 commit 3885f6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions tests/frontend.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,10 @@ test.describe("Frontend", { tag: ["@app-frontend", "@domain-www"] }, () => {
await page.getByRole("tab", { name: "Gogledd Iwerddon" }).click();
await expect(page.getByRole("heading", { name: "Yr ŵyl banc nesaf yng Ngogledd Iwerddon yw" })).toBeVisible();
});

test("Check the frontend can talk to Search API", { tag: ["@worksonmirror"] }, async ({ page }) => {
await page.goto("/government/get-involved");
await expect(page.getByRole("heading", { name: "Recently opened" })).toBeVisible();
await expect(page.locator("main > div").nth(3).locator(".gem-c-document-list__item-title")).toHaveCount(3);
});
});
6 changes: 0 additions & 6 deletions tests/government-frontend.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ test.describe("Government Frontend", { tag: ["@app-government-frontend"] }, () =
await expect(page.getByText("How often do you want to get emails?")).toBeVisible();
});

test("Check the frontend can talk to Search API", { tag: ["@worksonmirror"] }, async ({ page }) => {
await page.goto("/government/get-involved");
await expect(page.getByRole("heading", { name: "Recently opened" })).toBeVisible();
await expect(page.locator(".get-involved > div").nth(3).locator(".gem-c-document-list__item-title")).toHaveCount(3);
});

test("Check a travel advice country page loads", { tag: ["@worksonmirror"] }, async ({ page }) => {
await page.goto("/foreign-travel-advice/luxembourg");
await expect(page.getByRole("heading", { name: "Luxembourg" })).toBeVisible();
Expand Down

0 comments on commit 3885f6f

Please sign in to comment.