Repository navigation
test(sing): wait for the singer app's state before touching it - #317
Merged
Merged
Conversation
sing.js awaits its translations (top-level await) before exposing window.__sing_state, and page.goto's load event doesn't wait for that. When the message fetch was slow (e.g. right after the make-it tests), evaluate hit an undefined __sing_state. Wait for it in _login and the four direct goto sites, like the consent tests already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RYLVUsjX5ETS5xYmCaam4
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.
Fixes an order-dependent e2e failure (
test_search_step_without_a_name_renders_the_name_screenfailed withCannot set properties of undefined (setting 'name')when run after the make-it tests, on main too).Cause:
sing.jsrunsawait initI18n(...)at the top level before it setswindow.__sing_state. The page'sloadevent doesn't wait for that, sopage.gotocould return before the state existed, and the test lost the race whenever the messages fetch was slow.Fix:
page.wait_for_function("!!window.__sing_state")in_login(used by most singer tests) and at the 4 directgotosites that touch the state, which is how the consent tests already handle it. A scan of all tests found no other unguarded sites.Verified: the failing combination (make_wizard + i18n_footer + frontend) passes twice. Full
tests/e2e: 414 passed. Test-only, so no version bump.@coderabbitai ignore
🤖 Generated with Claude Code
https://claude.ai/code/session_012RYLVUsjX5ETS5xYmCaam4