Repository navigation
[Fix] Stub Turnstile in the signup smoke test - #1151
Merged
Merged
Conversation
The signup form keeps its submit button disabled until Cloudflare Turnstile returns a token, and Turnstile never issues one to the automated browser, so the registration smoke test has timed out on every pull request since the widget was added. Answer the Turnstile script with a stand-in that reports a made-up token. The register endpoint is already mocked in this test, so nothing verifies it.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Gets the Smoke Tests workflow passing again. It has failed on every pull request since Sept 9 because of one test: "a user can register a new account with an email address".
smoke/auth.spec.tstimed out after 60s, on the first attempt and on the retry.stubTurnstilehelper insmoke/helpers/auth.tsanswers the Turnstile script with a stand-in that reports a made-up token, and the registration test calls it. That test already mocks/api/auth/register/, so nothing verifies the token.NEXT_PUBLIC_TURNSTILE_SITEKEYis unset the form requests no script and the stub is never served.Notes
main.Testing
https://staging.researchhub.com/in local headless Chrome: passes in 3.6s.🤖 Generated with Claude Code