This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new 1f9b760  Fix an intermittent problem with Playwright tests
1f9b760 is described below

commit 1f9b76072822e997d5b0b0a848cbc23904c8a7a9
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Jan 8 17:55:58 2026 +0000

    Fix an intermittent problem with Playwright tests
---
 playwright/test.py | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/playwright/test.py b/playwright/test.py
index ebe6fc2..16cef04 100755
--- a/playwright/test.py
+++ b/playwright/test.py
@@ -27,7 +27,6 @@ import socket
 import subprocess
 import sys
 import time
-import urllib.parse
 from collections.abc import Callable
 from typing import Any, Final
 
@@ -1386,13 +1385,9 @@ def test_tidy_up_releases(page: Page) -> None:
     release_remove(page, f"{TEST_PROJECT}-0.2")
 
 
-def wait_for_path(page: Page, path: str) -> None:
+def wait_for_path(page: Page, path: str, timeout: int = 30000) -> None:
+    page.wait_for_url(f"**{path}", timeout=timeout)
     page.wait_for_load_state()
-    parsed_url = urllib.parse.urlparse(page.url)
-    if parsed_url.path != path:
-        logging.error(f"Expected URL path '{path}', but got 
'{parsed_url.path}'")
-        logging.error(f"Page content:\\n{page.content()}")
-        raise RuntimeError(f"Expected URL path '{path}', but got 
'{parsed_url.path}'")
     logging.info(f"Current URL: {page.url}")
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to