test: fix flaky partials opt-out tests by adding waitForNavigation()#3862
Open
SisyphusZheng wants to merge 1 commit into
Open
test: fix flaky partials opt-out tests by adding waitForNavigation()#3862SisyphusZheng wants to merge 1 commit into
SisyphusZheng wants to merge 1 commit into
Conversation
Two tests ('opt out of partial navigation' and 'opt out of partial navigation freshframework#2') were marked \ignore: true\ due to flakiness. Both tests click links with \-client-nav={false}\ which trigger full-page navigations, but neither waited for the navigation to complete before asserting on the new page.
The third test ('opt out of partial navigation in island') uses \Promise.all([page.waitForNavigation(), click])\ and is NOT flaky — confirming the root cause.
Fix: wrap both clicks in \Promise.all([page.waitForNavigation(), click()])\ and remove the \ignore: true\ markers.
Closes freshframework#3858
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.
Two tests in
partials_test.tsxwere markedignore: truedue to flakiness.Root Cause
Both tests click links with
f-client-nav={false}, triggering full-page navigations. Neither waited for the navigation to complete:The third test (
opt out of partial navigation in island) uses the correct pattern and is NOT flaky:Fix
Apply the same
Promise.all([waitForNavigation(), click])pattern to both flaky tests and remove theignore: truemarkers.Closes #3858