Skip to content

Commit e482bdc

Browse files
test(registration): refactor popup handling for terms of use test
The test now uses `Promise.all` with `page.waitForEvent('popup')` instead of `context().waitForEvent('page')` to handle the new tab creation. Refs: WPB-24831
1 parent 3b30c56 commit e482bdc

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

apps/webapp/test/e2e_tests/specs/Registration/registration.spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ test.describe('Registration', () => {
4646

4747
await expect(pages.registration().termsLabel).toBeVisible();
4848

49-
const pagePromise = pageManager.page.context().waitForEvent('page');
49+
const [newTab] = await Promise.all([
50+
pageManager.page.waitForEvent('popup'),
51+
pages.registration().termsLabel.click(),
52+
]);
5053

51-
await pages.registration().termsLabel.click();
52-
53-
const newTab = await pagePromise;
54-
await newTab.waitForLoadState();
5554
await expect(newTab).toHaveURL(/legal#terms/);
5655
},
5756
);

0 commit comments

Comments
 (0)