@@ -17,7 +17,9 @@ test.describe('basic test', async () => {
1717 } ) ;
1818
1919 test ( 'Index page' , async ( { page } ) => {
20- await page . goto ( `http://localhost:${ appPort } ` ) ;
20+ await page . goto ( `http://localhost:${ appPort } ` , {
21+ waitUntil : 'networkidle' ,
22+ } ) ;
2123 await expect ( page . locator ( 'h1' ) ) . toContainText ( 'Hello world' ) ;
2224 const headerAnchor = page . locator ( '.rp-header-anchor' ) . first ( ) ;
2325 await expect ( headerAnchor ) . toHaveAttribute ( 'href' , '#hello-world' ) ;
@@ -47,7 +49,9 @@ test.describe('basic test', async () => {
4749 } ) ;
4850
4951 test ( 'Hover over social links' , async ( { page } ) => {
50- await page . goto ( `http://localhost:${ appPort } ` ) ;
52+ await page . goto ( `http://localhost:${ appPort } ` , {
53+ waitUntil : 'networkidle' ,
54+ } ) ;
5155 const socialLinks = page . locator ( '.rp-social-links' ) . first ( ) ;
5256 await socialLinks . hover ( ) ;
5357 await expect (
@@ -56,7 +60,9 @@ test.describe('basic test', async () => {
5660 } ) ;
5761
5862 test ( 'globalStyles should work' , async ( { page } ) => {
59- await page . goto ( `http://localhost:${ appPort } ` ) ;
63+ await page . goto ( `http://localhost:${ appPort } ` , {
64+ waitUntil : 'networkidle' ,
65+ } ) ;
6066 const link = page . locator ( '.rp-doc a' ) . first ( ) ;
6167 await expect ( link ) . toHaveCSS ( 'color' , 'rgb(255, 165, 0)' ) ;
6268 } ) ;
0 commit comments