test: match the expect timeout call log from Playwright 1.63 - #325
Open
Ben Atkinson (BenA-SA) wants to merge 1 commit into
Open
Ben Atkinson (BenA-SA) wants to merge 1 commit into
Ben Atkinson (BenA-SA) wants to merge 1 commit into
Conversation
Playwright 1.63 adds the locator to the expect call log line, which now reads
Expect "to_be_visible" locator("#A") with timeout 1111ms. Allow anything
between the action and the timeout, so the test checks the configured
timeout on both the old and new formats.
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.
test_is_able_to_set_expect_timeout_via_conftestfails on every OS and Python version with Playwright 1.63.0, in bothtests/test_sync.pyandtests/test_asyncio.py. CI installs the latest Playwright (playwright>=1.60), so this will affect any PR that runs now.What we think changed
Playwright 1.63 adds the locator to the expect call log line. On 1.62.0 the line read:
On 1.63.0 it reads:
The test matches
*Expect "to_be_visible" with timeout 1111ms*, which no longer fits the new line.The fix
Allow anything between the action and the timeout:
*Expect "to_be_visible"*with timeout 1111ms*. The test still checks what it is there for, thatexpect.set_options(timeout=1111)in a conftest is applied, and it passes on both formats.Checked locally on Python 3.12:
Context
This came up on #324 (allowing python-slugify 9), where these two tests are the only failures. The last green PR, #322, ran on Playwright 1.62.0, and #324's run installed 1.63.0. Once this is merged, #324 should go green on a re-run.