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
28
28
29
29
// Ensure window.open() still works as expected
30
30
const context = browser . contexts ( ) [ 0 ] ;
31
- const waitForNewPage = context . waitForEvent ( 'page' ) ;
32
31
33
- await page . locator ( '#windowOpenButton' ) . click ( ) ;
32
+ const [ reqResponse1 ] = await Promise . all ( [
33
+ reqPromise1 ,
34
+ context . waitForEvent ( 'page' ) ,
35
+ page . locator ( '#windowOpenButton' ) . click ( ) ,
36
+ ] ) ;
34
37
35
- const { breadcrumbs } = getCustomRecordingEvents ( await reqPromise1 ) ;
38
+ const { breadcrumbs } = getCustomRecordingEvents ( reqResponse1 ) ;
36
39
37
40
// Filter out potential blur breadcrumb, as otherwise this can be flaky
38
41
const filteredBreadcrumb = breadcrumbs . filter ( breadcrumb => breadcrumb . category !== 'ui.blur' ) ;
@@ -57,8 +60,6 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr
57
60
} ,
58
61
] ) ;
59
62
60
- await waitForNewPage ;
61
-
62
63
const pages = context . pages ( ) ;
63
64
64
65
expect ( pages . length ) . toBe ( 2 ) ;
You can’t perform that action at this time.
0 commit comments