Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr

// Ensure window.open() still works as expected
const context = browser.contexts()[0];
const waitForNewPage = context.waitForEvent('page');

await page.locator('#windowOpenButton').click();
const [reqResponse1] = await Promise.all([
reqPromise1,
context.waitForEvent('page'),
page.locator('#windowOpenButton').click(),
]);

const { breadcrumbs } = getCustomRecordingEvents(await reqPromise1);
const { breadcrumbs } = getCustomRecordingEvents(reqResponse1);

// Filter out potential blur breadcrumb, as otherwise this can be flaky
const filteredBreadcrumb = breadcrumbs.filter(breadcrumb => breadcrumb.category !== 'ui.blur');
Expand All @@ -57,8 +60,6 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr
},
]);

await waitForNewPage;

const pages = context.pages();

expect(pages.length).toBe(2);
Expand Down