tests: the gotos of the networkidle and same-url tests wait 30 s

This commit is contained in:
feder-cr committed 2026-11-16 02:39:13 +01:00
1 parent ab15976bee
commit 610b33834f
2 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -81,14 +81,14 @@ def test_networkidle_goto_leaves_a_quiet_spa_and_answers_for_the_new_page(firefo
with InvisiblePlaywright(seed=4244, binary_path=firefox_binary,
headless=True) as browser:
page = browser.new_context().new_page()
first = page.goto(spa_url, wait_until="networkidle", timeout=20_000)
first = page.goto(spa_url, wait_until="networkidle", timeout=30_000)
assert first is not None and first.status == 200, first
# until the SPA has pushed its last route (a condition with a deadline, not 1 s: its 50 ms timer runs
# late on a loaded machine); after that it has nothing left to do, so the page is quiet
assert wait_until(lambda: page.url.endswith("/spa/later"), 30, lambda: page.wait_for_timeout(50)), page.url
response = page.goto(slow_url, wait_until="networkidle",
timeout=20_000)
timeout=30_000)
assert page.url == slow_url, (
"goto(networkidle) returned while still on %s" % page.url)
assert response is not None, (
+5 -5
View File
@@ -138,11 +138,11 @@ def test_a_goto_to_the_address_the_page_is_at_ends_every_time(firefox_binary, si
_, frames = _body(kind, port)
async def scenario(page):
await page.goto(url, timeout=15000)
await page.goto(url, timeout=30000)
seen = []
for i in range(GOTOS):
began = time.monotonic()
response = await page.goto(url, timeout=15000)
response = await page.goto(url, timeout=30000)
took = time.monotonic() - began
title = await page.title()
seen.append((i, response.status if response else None, page.url, title, len(page.frames), round(took, 2)))
@@ -156,7 +156,7 @@ def test_a_goto_to_the_address_the_page_is_at_ends_every_time(firefox_binary, si
assert address == url, seen[i]
assert title == kind, seen[i]
assert count == frames, seen[i]
# No bound on `took` here: a goto that did not end is the one that raised at its own timeout (15 s), above.
# No bound on `took` here: a goto that did not end is the one that raised at its own timeout (30 s), above.
def test_a_goto_to_the_same_address_with_a_query_ends_the_second_time_too(firefox_binary, site):
@@ -165,10 +165,10 @@ def test_a_goto_to_the_same_address_with_a_query_ends_the_second_time_too(firefo
url = "http://a.test:%d/other-site-frame?x=1" % port
async def scenario(page):
await page.goto("http://a.test:%d/other-site-frame" % port, timeout=15000)
await page.goto("http://a.test:%d/other-site-frame" % port, timeout=30000)
out = []
for _ in range(3):
response = await page.goto(url, timeout=15000)
response = await page.goto(url, timeout=30000)
out.append((response.status if response else None, page.url, len(page.frames)))
return out