test: verify mobile Week Ahead retirement
This commit is contained in:
parent
1be9da3685
commit
d47205a561
|
|
@ -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")).to_have_class(re.compile(r"\bopen\b"))
|
||||||
expect(page.locator("#issue-sheet-title")).to_have_text("Ship mobile capture")
|
expect(page.locator("#issue-sheet-title")).to_have_text("Ship mobile capture")
|
||||||
expect(overview).to_be_visible()
|
expect(overview).to_be_visible()
|
||||||
page.once("dialog", lambda dialog: dialog.accept())
|
page.locator("#close-issue-sheet").click()
|
||||||
page.locator("#close-issue").click()
|
|
||||||
expect(page.locator("#issue-sheet")).not_to_have_class(re.compile(r"\bopen\b"))
|
expect(page.locator("#issue-sheet")).not_to_have_class(re.compile(r"\bopen\b"))
|
||||||
expect(overview).to_be_visible()
|
expect(overview).to_be_visible()
|
||||||
expect(cards.first).not_to_contain_text("Ship mobile capture")
|
expect(planned_item).to_be_focused()
|
||||||
expect(cards.first).to_contain_text("0 items · 0 of 60 min")
|
assert len(saved) == 1, "opening and inspecting Week Ahead must not add a write"
|
||||||
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
|
|
||||||
for control in (cards.first.locator("[data-week-edit-day]"), edit_week):
|
for control in (cards.first.locator("[data-week-edit-day]"), edit_week):
|
||||||
bounds = control.bounding_box()
|
bounds = control.bounding_box()
|
||||||
assert bounds and bounds["height"] >= 44
|
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(
|
assert [day["plan_date"] for day in saved[-1]["days"]] == sorted(
|
||||||
day["plan_date"] for day in saved[-1]["days"]
|
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")
|
assert page.evaluate("document.documentElement.scrollWidth <= window.innerWidth")
|
||||||
browser.close()
|
browser.close()
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user