test: guard hidden Week Ahead journey sheet (Closes #1264)
All checks were successful
CI / lint (pull_request) Successful in 5m1s
CI / build-release (pull_request) Successful in 10s
CI / browser-journey (pull_request) Successful in 6m48s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy 2026-08-22 13:22:21 +00:00
parent 306a20c37f
commit 363a97aa5e
2 changed files with 20 additions and 1 deletions

View File

@ -69,7 +69,10 @@ def test_release_artifact_reschedules_active_today_into_week_ahead(
expect(page.locator("#issue-sheet-title")).to_have_text("Ship mobile capture") expect(page.locator("#issue-sheet-title")).to_have_text("Ship mobile capture")
if page.locator("#plan-today-sheet").is_visible(): if page.locator("#plan-today-sheet").is_visible():
page.locator("#cancel-plan-today").click() page.locator("#cancel-plan-today").click()
page.locator("#close-issue-sheet").click() issue_sheet = page.locator("#issue-sheet")
if issue_sheet.is_visible():
page.locator("#close-issue-sheet").click()
expect(issue_sheet).to_be_hidden()
if page.locator("#plan-today-sheet").is_visible(): if page.locator("#plan-today-sheet").is_visible():
page.locator("#cancel-plan-today").click() page.locator("#cancel-plan-today").click()

View File

@ -0,0 +1,16 @@
from pathlib import Path
ROOT = Path(__file__).parents[1]
def test_week_reschedule_journey_closes_only_a_visible_issue_sheet():
journey = (
ROOT / "tests" / "e2e" / "test_mobile_today_week_reschedule_release.py"
).read_text()
assert 'issue_sheet = page.locator("#issue-sheet")' in journey
assert "if issue_sheet.is_visible():" in journey
guarded_close = journey.split("if issue_sheet.is_visible():", 1)[1].split("\n", 2)[1]
assert 'page.locator("#close-issue-sheet").click()' in guarded_close
assert "expect(issue_sheet).to_be_hidden()" in journey