test: surface Week Ahead browser launch errors (Refs #1177)
This commit is contained in:
parent
4fbc9c62d9
commit
5a9cce4a08
|
|
@ -30,6 +30,8 @@ def test_release_artifact_plans_seven_touch_safe_mobile_dates(
|
||||||
with release_server(archives[0], tmp_path, f"http://127.0.0.1:{fake.server_port}") as origin, sync_playwright() as playwright:
|
with release_server(archives[0], tmp_path, f"http://127.0.0.1:{fake.server_port}") as origin, sync_playwright() as playwright:
|
||||||
browser = playwright.chromium.launch(args=["--ignore-certificate-errors"])
|
browser = playwright.chromium.launch(args=["--ignore-certificate-errors"])
|
||||||
page = browser.new_page(viewport={"width": width, "height": height})
|
page = browser.new_page(viewport={"width": width, "height": height})
|
||||||
|
page_errors: list[str] = []
|
||||||
|
page.on("pageerror", lambda error: page_errors.append(str(error)))
|
||||||
|
|
||||||
def week_route(route):
|
def week_route(route):
|
||||||
if route.request.method == "PUT":
|
if route.request.method == "PUT":
|
||||||
|
|
@ -52,7 +54,9 @@ def test_release_artifact_plans_seven_touch_safe_mobile_dates(
|
||||||
page.wait_for_url(origin + "/", wait_until="networkidle")
|
page.wait_for_url(origin + "/", wait_until="networkidle")
|
||||||
page.locator('[data-mobile-task="queues"]').click()
|
page.locator('[data-mobile-task="queues"]').click()
|
||||||
page.locator('[data-mobile-queue="week"]').click()
|
page.locator('[data-mobile-queue="week"]').click()
|
||||||
|
page.wait_for_timeout(100)
|
||||||
|
|
||||||
|
assert not page_errors, f"Week Ahead launch raised: {page_errors}"
|
||||||
expect(page.locator("#plan-today-title")).to_have_text("Plan Week Ahead")
|
expect(page.locator("#plan-today-title")).to_have_text("Plan Week Ahead")
|
||||||
dates = page.locator("#week-plan-dates button")
|
dates = page.locator("#week-plan-dates button")
|
||||||
expect(dates).to_have_count(7)
|
expect(dates).to_have_count(7)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user