Skip to content

Commit 2b68234

Browse files
committed
Replace custom URL wait with Playwright's wait_for_url
Removed the import and usage of the custom wait_for_url_change utility and replaced it with Playwright's built-in page.wait_for_url method for improved reliability and simplicity.
1 parent 8bae4fe commit 2b68234

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/playwright/ai_generated_apps/bookmark/accordion/test_accordion_bookmarking.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
from shiny.playwright import controller
44
from shiny.pytest import create_app_fixture
55
from shiny.run import ShinyAppProc
6-
from tests.playwright.ai_generated_apps.bookmark.bookmark_utils import (
7-
wait_for_url_change,
8-
)
96

107
app = create_app_fixture(["app-express.py"])
118

@@ -27,7 +24,7 @@ def test_accordion_bookmarking_demo(page: Page, app: ShinyAppProc) -> None:
2724
bookmark_button = controller.InputBookmarkButton(page)
2825
bookmark_button.click()
2926

30-
wait_for_url_change(page, existing_url)
27+
page.wait_for_url(lambda url: url != existing_url, timeout=5 * 1000)
3128

3229
# reload page
3330
page.reload()
@@ -42,7 +39,7 @@ def test_accordion_bookmarking_demo(page: Page, app: ShinyAppProc) -> None:
4239

4340
bookmark_button.click()
4441

45-
wait_for_url_change(page, existing_url)
42+
page.wait_for_url(lambda url: url != existing_url, timeout=5 * 1000)
4643

4744
# reload page
4845
page.reload()

0 commit comments

Comments
 (0)