File tree Expand file tree Collapse file tree
test/integration/rewrites-manual-href-as/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 launchApp ,
99 nextBuild ,
1010 nextStart ,
11+ retry ,
1112} from 'next-test-utils'
1213import webdriver from 'next-webdriver'
1314
@@ -26,8 +27,10 @@ const runTests = () => {
2627
2728 await browser . elementByCss ( '#to-modal' ) . click ( )
2829
30+ await retry ( async ( ) => {
31+ expect ( await browser . hasElementByCssSelector ( '#modal' ) ) . toBeTruthy ( )
32+ } )
2933 expect ( await browser . elementByCss ( '#index' ) . text ( ) ) . toBe ( 'index page' )
30- expect ( await browser . hasElementByCssSelector ( '#modal' ) ) . toBeTruthy ( )
3134 expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
3235 expect ( JSON . parse ( await browser . elementByCss ( '#query' ) . text ( ) ) ) . toEqual ( {
3336 imageId : '123' ,
@@ -86,8 +89,10 @@ const runTests = () => {
8689 . click ( )
8790 . waitForElementByCss ( '#index' )
8891
92+ await retry ( async ( ) => {
93+ expect ( await browser . hasElementByCssSelector ( '#modal' ) ) . toBeTruthy ( )
94+ } )
8995 expect ( await browser . elementByCss ( '#index' ) . text ( ) ) . toBe ( 'index page' )
90- expect ( await browser . hasElementByCssSelector ( '#modal' ) ) . toBeTruthy ( )
9196 expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
9297 expect ( JSON . parse ( await browser . elementByCss ( '#query' ) . text ( ) ) ) . toEqual ( {
9398 imageId : '123' ,
You can’t perform that action at this time.
0 commit comments