@@ -41,7 +41,7 @@ test.describe('Keyless mode @quickstart', () => {
41
41
await app . teardown ( ) ;
42
42
} ) ;
43
43
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 } ) => {
45
45
const u = createTestUtils ( { app, page, context } ) ;
46
46
await u . page . goToAppHome ( ) ;
47
47
await u . page . waitForClerkJsLoaded ( ) ;
@@ -51,9 +51,12 @@ test.describe('Keyless mode @quickstart', () => {
51
51
52
52
const redirectMap = new Map < string , number > ( ) ;
53
53
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
+ }
57
60
} ) ;
58
61
59
62
await u . page . goToRelative ( '/something' ) ;
0 commit comments