fix(e2e): replace toPass() retry with waitFor on Minimize button in sql-editor test#53809
Open
mendral-app[bot] wants to merge 5 commits intomasterfrom
Open
fix(e2e): replace toPass() retry with waitFor on Minimize button in sql-editor test#53809mendral-app[bot] wants to merge 5 commits intomasterfrom
mendral-app[bot] wants to merge 5 commits intomasterfrom
Conversation
…ql-editor test
The toPass() wrapper retries the click but does not wait for the button
to stabilize after React reconciliation, exhausting the 90s timeout.
Using waitFor({ state: "visible" }) ensures the button is fully mounted
before clicking.
Contributor
|
Contributor
|
Size Change: 0 B Total Size: 128 MB ℹ️ View Unchanged
|
The scene name header update after saving a view can be slow in CI, causing intermittent timeouts at the default 40s when run 10x in the stability check. Increase to 60s to accommodate slower runners.
Same slow header update issue affects the Materialize view pane test. Apply the same 60s timeout for the scene name assertion.
Instead of increasing the timeout, wait for the URL to change to /sql#view=... which confirms the save + navigation completed. The scene name header renders after the URL update, so this eliminates the race condition where the header element does not exist yet.
waitForURL does not work for hash-only changes. Instead, use toPass() to poll for the scene name header element with a short inner timeout and generous outer timeout. This handles the case where React has not yet rendered the element after the async state update.
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
toPass()retry wrapper on the "Minimize" button click insql-editor.spec.tsdoesn't wait for the button to stabilize after React reconciliation — it just retries the click on the same unstable element, exhausting the 90s timeoutwaitFor({ state: 'visible' })so Playwright waits for the button to be fully mounted before clickingContext
toPass()wrapper but it didn't resolve the flakiness — failures continued across multiple unrelated PRsNote
Created by Mendral. Tag @mendral-app with feedback or questions.