@@ -41,7 +41,7 @@ test.describe('Keyless mode @quickstart', () => {
4141 await app . teardown ( ) ;
4242 } ) ;
4343
44- test ( 'Navigates to non existed page (/_not-found) without a infinite redirect loop.' , async ( { page, context } ) => {
44+ test ( 'Navigates to non-existent page (/_not-found) without a infinite redirect loop.' , async ( { page, context } ) => {
4545 const u = createTestUtils ( { app, page, context } ) ;
4646 await u . page . goToAppHome ( ) ;
4747 await u . page . waitForClerkJsLoaded ( ) ;
@@ -51,9 +51,12 @@ test.describe('Keyless mode @quickstart', () => {
5151
5252 const redirectMap = new Map < string , number > ( ) ;
5353 page . on ( 'request' , request => {
54- const url = request . url ( ) ;
55- redirectMap . set ( url , ( redirectMap . get ( url ) || 0 ) + 1 ) ;
56- expect ( redirectMap . get ( url ) ) . toBeLessThanOrEqual ( 1 ) ;
54+ // Only count GET requests since Next.js server actions are sent with POST requests.
55+ if ( request . method ( ) === 'GET' ) {
56+ const url = request . url ( ) ;
57+ redirectMap . set ( url , ( redirectMap . get ( url ) || 0 ) + 1 ) ;
58+ expect ( redirectMap . get ( url ) ) . toBeLessThanOrEqual ( 1 ) ;
59+ }
5760 } ) ;
5861
5962 await u . page . goToRelative ( '/something' ) ;
0 commit comments