Skip to content

Commit 46b8c01

Browse files
authored
fix: Async issues with UI validation workflow (#921)
1 parent 797568e commit 46b8c01

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/search.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { handleConsentPopup, waitFor } from '../tests/utils/commonUtils.ts'
44
test.describe("Testing search page", () => {
55
test('Searchbar is visible', async ({ page }) => {
66
await page.goto('/');
7-
await waitFor(() => handleConsentPopup(page));
7+
await waitFor(async () => await handleConsentPopup(page));
88

99
const searchBox = page.locator('.CoveoSearchbox').first();
1010
const searchButton = page.locator('.CoveoSearchButton');

tests/utils/commonUtils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export async function handleConsentPopup(page: Page) {
66
const consentContent = page.locator('#truste-consent-content');
77
const isConsentContentVisibile = await consentContent.isVisible();
88
if(isConsentContentVisibile) {
9-
const consentButton = page.locator('#truste-consent-required').first();
10-
console.log((await consentButton.all()).length);
9+
const consentButton = page.locator('#truste-consent-required');
1110
expect(consentButton).toBeVisible();
1211
await consentButton.click();
1312
}

0 commit comments

Comments
 (0)