File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
dev-packages/browser-integration-tests/suites/replay/slowClick/windowOpen Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,14 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr
2828
2929 // Ensure window.open() still works as expected
3030 const context = browser . contexts ( ) [ 0 ] ;
31- const waitForNewPage = context . waitForEvent ( 'page' ) ;
3231
33- await page . locator ( '#windowOpenButton' ) . click ( ) ;
32+ const [ reqResponse1 ] = await Promise . all ( [
33+ reqPromise1 ,
34+ context . waitForEvent ( 'page' ) ,
35+ page . locator ( '#windowOpenButton' ) . click ( ) ,
36+ ] ) ;
3437
35- const { breadcrumbs } = getCustomRecordingEvents ( await reqPromise1 ) ;
38+ const { breadcrumbs } = getCustomRecordingEvents ( reqResponse1 ) ;
3639
3740 // Filter out potential blur breadcrumb, as otherwise this can be flaky
3841 const filteredBreadcrumb = breadcrumbs . filter ( breadcrumb => breadcrumb . category !== 'ui.blur' ) ;
@@ -57,8 +60,6 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr
5760 } ,
5861 ] ) ;
5962
60- await waitForNewPage ;
61-
6263 const pages = context . pages ( ) ;
6364
6465 expect ( pages . length ) . toBe ( 2 ) ;
You can’t perform that action at this time.
0 commit comments