File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/app/integration-tests/tests Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,17 @@ const SANDBOXES = [
1919 'lp5rjr0z4z' ,
2020 'nOymMxyY' ,
2121] ;
22+
23+ function pageLoaded ( page ) {
24+ return new Promise ( async resolve => {
25+ await page . exposeFunction ( '__puppeteer__' , ( ) => {
26+ if ( resolve ) {
27+ resolve ( ) ;
28+ }
29+ } ) ;
30+ } ) ;
31+ }
32+
2233describe ( 'sandboxes' , ( ) => {
2334 let browser = puppeteer . launch ( {
2435 args : [ '--no-sandbox' , '--disable-setuid-sandbox' ] ,
@@ -36,10 +47,11 @@ describe('sandboxes', () => {
3647 async ( ) => {
3748 browser = await browser ;
3849 const page = await browser . newPage ( ) ;
39- await page . goto ( 'http://localhost:3001/#' + id , {
40- waitUntil : 'networkidle0' ,
50+ const waitFunction = pageLoaded ( page ) ;
51+ page . goto ( 'http://localhost:3001/#' + id , {
4152 timeout : 60000 ,
4253 } ) ;
54+ await waitFunction ;
4355 await page . waitFor ( 2000 ) ;
4456
4557 const screenshot = await page . screenshot ( ) ;
You can’t perform that action at this time.
0 commit comments