-
Notifications
You must be signed in to change notification settings - Fork 340
fix(testing): Better route interception hierarchy #5673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@clerk/testing': minor | ||
--- | ||
|
||
Switching over our interception of FAPI calls from page.route to context.route as routes set up with page.route() take precedence over browser context routes when request matches both handlers. | ||
|
||
This allows for users to override calls to FAPI more consistently |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,10 +37,15 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withReverification] })( | |
}); | ||
|
||
test.afterAll(async () => { | ||
await fakeOrganization.delete(); | ||
await fakeViewer.deleteIfExists(); | ||
await fakeAdmin.deleteIfExists(); | ||
await app.teardown(); | ||
try { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] While wrapping cleanup functions in a try-catch block prevents test failures during teardown, silently logging errors could mask underlying issues. Consider enhancing error reporting or re-throwing critical failures after logging. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
await fakeOrganization.delete(); | ||
await fakeViewer.deleteIfExists(); | ||
await fakeAdmin.deleteIfExists(); | ||
} catch (error) { | ||
console.error(error); | ||
} finally { | ||
await app.teardown(); | ||
} | ||
}); | ||
|
||
test('reverification prompt on adding new email address', async ({ page, context }) => { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-enabling the test 'clerk-js client fails and status degraded' without addressing its known hotloading issues may lead to unstable behavior. Consider revisiting the underlying flakiness or adding proper conditions to mitigate intermittent failures.
Copilot uses AI. Check for mistakes.