Repository navigation
Playwright tests: wait for the client render before opening the timeframe - #2764
Merged
jackstenglein merged 1 commit intoOct 21, 2026
Conversation
…he timeframe select The server renders the timeframe options with today's date while the test freezes the browser clock in 2023, so React renders the page again in the browser. A click that landed before that render hit the server-rendered select and never opened the menu. Wait until the select shows the 2023 date first.
Contributor
Author
|
@jackstenglein , even in this case the pipeline is still failing because of #2759 |
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
Fixes the flaky e2e test "displays correct graduations for other timeframes" in 'recent.spec.ts'. Test-only change.
The test freezes the browser clock at Sept 6, 2023, but the server renders
/recentwith today's date. 'RecentGraduates' builds the timeframe options from 'new Date()', so the server HTML has today's dates, the browser computes 2023 dates, and React throws the server HTML away and renders the page again in the browser. The test clicked the select as soon as the server-rendered one was visible. When that click landed before the browser render, it hit an element with no handlers that was about to be replaced, so the menu never opened and the test timed out waiting for "Graduation of 8/30/2023".The test now first waits for the select to show "Graduation of 9/6/2023". Only the browser render has that date, so once it's there the select responds to the click.
Related Issues
Fixes #2760
Type of change
Testing
Demo
Not applicable: test-only change.