Skip to content

Commit

Permalink
fix: Resolved duplicate searchbox for Playwright locator (#242)
Browse files Browse the repository at this point in the history
fix: Playwright locator for search box duplicate
  • Loading branch information
lamATnginx authored Mar 4, 2025
1 parent 7263c52 commit aff90e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test.describe("Testing search page", () => {
await page.goto('/');
await waitFor(() => handleConsentPopup(page));

const searchBox = page.locator('.CoveoSearchbox');
const searchBox = page.locator('.CoveoSearchbox').first();
const searchButton = page.locator('.CoveoSearchButton');
const searchValue = "proxy";
expect(searchBox).toBeVisible();
Expand All @@ -19,7 +19,7 @@ test.describe("Testing search page", () => {
});

test('Search page returns results without error', async ({ page }) => {
await page.goto(`/search.html#q=proxy&sort=relevancy`);
await page.goto("/search.html#q=proxy&sort=relevancy");
await waitFor(() => handleConsentPopup(page));

await page.waitForSelector('div.coveo-result-list-container');
Expand Down

0 comments on commit aff90e0

Please sign in to comment.