Commit 89daf78
committed
fix(repo): Handle backend-added framework query param in Next.js keyless test
The backend automatically adds framework=nextjs query parameter to claim URLs,
which changes the URL structure from:
apps/claim?token=abc
to:
apps/claim?framework=nextjs&token=abc
This breaks the original test logic that used .startsWith() to check for
'apps/claim?token=' since the framework param comes first.
Changes:
- Use .includes() instead of .startsWith() for URL validation
- Check that URL contains 'apps/claim' and 'token=' (in any order)
- Don't explicitly validate framework parameter value
- Handle both regular sign-up and prepare-account flows
This allows the test to pass regardless of query parameter order,
accommodating the backend's automatic framework parameter injection.
Test coverage:
✅ Sign-in redirect URL contains apps/claim and token
✅ Sign-up redirect URL contains apps/claim and token (regular case)
✅ Sign-up redirect URL contains apps/claim and token (prepare-account case)
✅ Backend-added framework parameter doesn't break validation1 parent 42de79d commit 89daf78
1 file changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 100 | + | |
104 | 101 | | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
108 | | - | |
109 | | - | |
| 105 | + | |
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
| |||
0 commit comments