feat: export saved Week Ahead from overview (Closes #1260)
This commit is contained in:
1 parent
9eac3bb958
commit
f0a966d3a3
7 files changed
+71
-48
No files matched your search
@@ -105,10 +105,11 @@ def test_release_artifact_plans_seven_touch_safe_mobile_dates(
|
||||
expect(cards).to_have_count(7)
|
||||
expect(cards.first).to_contain_text("Next up")
|
||||
expect(cards.first).to_contain_text("Ship mobile capture")
|
||||
expect(page.locator("#week-review-status")).to_have_text(
|
||||
"Week Ahead overview · no changes made."
|
||||
)
|
||||
expect(page.locator("#week-review-status")).to_contain_text("30 min over capacity")
|
||||
expect(page.locator("#confirm-week-plan")).to_be_hidden()
|
||||
blocked_export = page.locator("#export-saved-week-calendar")
|
||||
expect(blocked_export).to_be_visible()
|
||||
expect(blocked_export).to_be_disabled()
|
||||
availability = page.locator("#open-week-availability")
|
||||
expect(availability).to_be_visible()
|
||||
availability_bounds = availability.bounding_box()
|
||||
@@ -192,6 +193,22 @@ def test_release_artifact_plans_seven_touch_safe_mobile_dates(
|
||||
expect(overview).to_be_visible()
|
||||
expect(planned_item).to_be_focused()
|
||||
assert len(saved) == writes_before_reflow + 1, "opening and inspecting Week Ahead must not add a write"
|
||||
export_saved = page.locator("#export-saved-week-calendar")
|
||||
expect(export_saved).to_be_visible()
|
||||
expect(export_saved).to_be_enabled()
|
||||
export_bounds = export_saved.bounding_box()
|
||||
assert export_bounds and export_bounds["height"] >= 44
|
||||
writes_before_export = len(saved)
|
||||
export_saved.click()
|
||||
expect(page.locator("#week-calendar-handoff")).to_be_visible()
|
||||
expect(overview).to_be_hidden()
|
||||
expect(page.locator('[data-week-calendar-preview="issue:acme/mobile:41:"]')).to_have_text(
|
||||
"09:00–09:45 · 45 min"
|
||||
)
|
||||
assert len(saved) == writes_before_export, "exporting a saved week must not add a write"
|
||||
page.locator("#back-to-week-review-from-calendar").click()
|
||||
expect(overview).to_be_visible()
|
||||
expect(export_saved).to_be_focused()
|
||||
for control in (cards.first.locator("[data-week-edit-day]"), edit_week):
|
||||
bounds = control.bounding_box()
|
||||
assert bounds and bounds["height"] >= 44
|
||||
|
||||
Reference in new issue
Block a user