test: verify mobile Week Ahead retirement
All checks were successful
CI / lint (pull_request) Successful in 3m10s
CI / build-release (pull_request) Successful in 7s
CI / browser-journey (pull_request) Successful in 5m4s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy 2026-08-21 20:19:20 +00:00
parent 1be9da3685
commit d47205a561

View File

@ -116,19 +116,11 @@ def test_release_artifact_plans_seven_touch_safe_mobile_dates(
expect(page.locator("#issue-sheet")).to_have_class(re.compile(r"\bopen\b"))
expect(page.locator("#issue-sheet-title")).to_have_text("Ship mobile capture")
expect(overview).to_be_visible()
page.once("dialog", lambda dialog: dialog.accept())
page.locator("#close-issue").click()
page.locator("#close-issue-sheet").click()
expect(page.locator("#issue-sheet")).not_to_have_class(re.compile(r"\bopen\b"))
expect(overview).to_be_visible()
expect(cards.first).not_to_contain_text("Ship mobile capture")
expect(cards.first).to_contain_text("0 items · 0 of 60 min")
expect(page.locator("#week-review-status")).to_have_text(
"Ship mobile capture removed and Week Ahead saved."
)
expect(edit_week).to_be_focused()
assert len(saved) == 2, "closing planned work must stage one Week Ahead retirement"
assert saved[-1]["days"][0]["ids"] == []
assert saved[-1]["days"][0]["capacity_minutes"] == 60
expect(planned_item).to_be_focused()
assert len(saved) == 1, "opening and inspecting Week Ahead must not add a write"
for control in (cards.first.locator("[data-week-edit-day]"), edit_week):
bounds = control.bounding_box()
assert bounds and bounds["height"] >= 44
@ -258,6 +250,29 @@ def test_release_artifact_plans_seven_touch_safe_mobile_dates(
assert [day["plan_date"] for day in saved[-1]["days"]] == sorted(
day["plan_date"] for day in saved[-1]["days"]
)
before_retirement = len(saved)
page.locator('[data-mobile-task="queues"]').click()
page.locator('[data-mobile-queue="week"]').click()
expect(overview).to_be_visible()
planned_item = cards.first.locator(
'[data-week-open-item="issue:acme/mobile:41:"]'
)
planned_item.click()
expect(page.locator("#issue-sheet-title")).to_have_text("Ship mobile capture")
page.once("dialog", lambda dialog: dialog.accept())
page.locator("#close-issue").click()
expect(page.locator("#issue-sheet")).not_to_have_class(re.compile(r"\bopen\b"))
expect(cards.first).not_to_contain_text("Ship mobile capture")
expect(cards.first).to_contain_text("Polish desktop filters")
expect(cards.first).to_contain_text("45 of 60 min")
expect(page.locator("#week-review-status")).to_have_text(
"Ship mobile capture removed and Week Ahead saved."
)
expect(edit_week).to_be_focused()
assert len(saved) == before_retirement + 1
assert saved[-1]["days"][0]["ids"] == ["issue:acme/mobile:42:"]
assert saved[-1]["days"][0]["capacity_minutes"] == 60
assert page.evaluate("document.documentElement.scrollWidth <= window.innerWidth")
browser.close()
finally: