Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { handleConsentPopup, waitFor } from '../tests/utils/commonUtils.ts'
test.describe("Testing search page", () => {
test('Searchbar is visible', async ({ page }) => {
await page.goto('/');
await waitFor(() => handleConsentPopup(page));
await waitFor(async () => await handleConsentPopup(page));

const searchBox = page.locator('.CoveoSearchbox').first();
const searchButton = page.locator('.CoveoSearchButton');
Expand Down
3 changes: 1 addition & 2 deletions tests/utils/commonUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export async function handleConsentPopup(page: Page) {
const consentContent = page.locator('#truste-consent-content');
const isConsentContentVisibile = await consentContent.isVisible();
if(isConsentContentVisibile) {
const consentButton = page.locator('#truste-consent-required').first();
console.log((await consentButton.all()).length);
const consentButton = page.locator('#truste-consent-required');
expect(consentButton).toBeVisible();
await consentButton.click();
}
Expand Down
Loading