Skip to content

Commit

Permalink
Merge pull request #61 from alphagov/site-search
Browse files Browse the repository at this point in the history
Finder Frontend: Update site search test
  • Loading branch information
csutter authored Oct 23, 2024
2 parents dde095e + 67bddf1 commit f2ab527
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/finder-frontend.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ test.describe("Finder frontend", { tag: ["@app-finder-frontend"] }, () => {
await expect(page.getByText("How often do you want to get emails?")).toBeVisible();
});

test("Check the frontend can talk to Search API", async ({ page }) => {
test("Can use site search and receive results", async ({ page }) => {
await page.goto("/");
const searchBox = page.getByRole("search");
await searchBox.getByRole("searchbox", { name: "Search" }).fill("Universal Credit");
await searchBox.getByRole("button", { name: "Search" }).click();
await expect(page.getByRole("region", { name: "Search search results" })).toBeVisible();
await expect(page.getByRole("link", { name: "Sign in to your Universal Credit account" })).toBeVisible();
});
});

0 comments on commit f2ab527

Please sign in to comment.