fix: reduce Playwright test flakiness with condition-based waits#2842
Merged
crivetimihai merged 1 commit intomainfrom Feb 11, 2026
Merged
fix: reduce Playwright test flakiness with condition-based waits#2842crivetimihai merged 1 commit intomainfrom
crivetimihai merged 1 commit intomainfrom
Conversation
Replace arbitrary wait_for_timeout calls with proper Playwright condition-based waits (wait_for_visible, wait_for_selector, expect, wait_for_load_state, wait_for_count_change). Fix broken login response handling that used non-existent wait_for_response API (was silently swallowed by broad except Exception). Narrow exception handling from Exception to PlaywrightTimeoutError to surface real errors. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
ja8zyjits
pushed a commit
that referenced
this pull request
Feb 13, 2026
Replace arbitrary wait_for_timeout calls with proper Playwright condition-based waits (wait_for_visible, wait_for_selector, expect, wait_for_load_state, wait_for_count_change). Fix broken login response handling that used non-existent wait_for_response API (was silently swallowed by broad except Exception). Narrow exception handling from Exception to PlaywrightTimeoutError to surface real errors. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
vishu-bh
pushed a commit
that referenced
this pull request
Feb 18, 2026
Replace arbitrary wait_for_timeout calls with proper Playwright condition-based waits (wait_for_visible, wait_for_selector, expect, wait_for_load_state, wait_for_count_change). Fix broken login response handling that used non-existent wait_for_response API (was silently swallowed by broad except Exception). Narrow exception handling from Exception to PlaywrightTimeoutError to surface real errors. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.com>
kcostell06
pushed a commit
to kcostell06/mcp-context-forge
that referenced
this pull request
Feb 24, 2026
…#2842) Replace arbitrary wait_for_timeout calls with proper Playwright condition-based waits (wait_for_visible, wait_for_selector, expect, wait_for_load_state, wait_for_count_change). Fix broken login response handling that used non-existent wait_for_response API (was silently swallowed by broad except Exception). Narrow exception handling from Exception to PlaywrightTimeoutError to surface real errors. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
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
wait_for_timeoutcalls with proper Playwright condition-based waits (wait_for_visible,wait_for_selector,expect,wait_for_load_state,wait_for_count_change)_wait_for_login_responsein conftest.py —page.wait_for_response()doesn't exist in Playwright Python sync API; replaced withpage.expect_response()context manager wrapping login submissionexcept Exceptiontoexcept PlaywrightTimeoutErrorin 4 locations to surface real errors instead of silently swallowing them@pytest.mark.xfailfromtest_create_and_revoke_token(test passes reliably)time.sleep()withpage.wait_for_timeout()inadmin_utils.pywait_for_count_change()helper toBasePagefor search/filter result waitingTest plan