From 9283ef6731e94b3f2c73e464ee88cc4be52c3d3b Mon Sep 17 00:00:00 2001 From: Ben Atkinson Date: Fri, 2 Oct 2026 08:30:02 +0100 Subject: [PATCH] test: match the expect timeout call log from Playwright 1.63 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. --- tests/test_asyncio.py | 2 +- tests/test_sync.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py index b904c82..675f889 100644 --- a/tests/test_asyncio.py +++ b/tests/test_asyncio.py @@ -853,7 +853,7 @@ async def test_small_timeout(page): result = testdir.runpytest() result.assert_outcomes(passed=0, failed=1, skipped=0) result.stdout.fnmatch_lines("*AssertionError: Locator expected to be visible*") - result.stdout.fnmatch_lines('*Expect "to_be_visible" with timeout 1111ms*') + result.stdout.fnmatch_lines('*Expect "to_be_visible"*with timeout 1111ms*') def test_artifact_collection_should_work_for_manually_created_contexts_keep_open( diff --git a/tests/test_sync.py b/tests/test_sync.py index 6837d47..9c702a3 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -849,7 +849,7 @@ def test_small_timeout(page): result = testdir.runpytest() result.assert_outcomes(passed=0, failed=1, skipped=0) result.stdout.fnmatch_lines("*AssertionError: Locator expected to be visible*") - result.stdout.fnmatch_lines('*Expect "to_be_visible" with timeout 1111ms*') + result.stdout.fnmatch_lines('*Expect "to_be_visible"*with timeout 1111ms*') def test_artifact_collection_should_work_for_manually_created_contexts_keep_open(