Skip to content

Commit

Permalink
fix: minor tweaks to home-lookup e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Liam Stanley <me@liamstanley.io>
  • Loading branch information
lrstanley committed Dec 17, 2022
1 parent a779924 commit ac57053
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions public/tests/home-lookup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ test("validate home lookup IP", async ({ page, requests }) => {
await input.fill(request.body.query)
await input.press("Enter")

const result = page.locator("div.geo-result", {
has: page.locator(`button:has-text("${request.body.query}")`),
})
const result = page.locator("div.geo-result", { hasText: request.body.query })
await expect(result).toBeVisible()

// Validate we can click the query and copy to clipboard.
Expand All @@ -21,7 +19,6 @@ test("validate home lookup IP", async ({ page, requests }) => {
page.locator("div.n-notification", { hasText: `copied "${request.body.query}"` })
).toBeVisible()

await result.locator('[aria-label="Zoom in"]').click()
await result.locator('[aria-label="Zoom out"]').click()

// Validate the flag image is working properly.
Expand Down

0 comments on commit ac57053

Please sign in to comment.