test: guard hidden Week Ahead journey sheet (Closes #1264)
This commit is contained in:
parent
306a20c37f
commit
363a97aa5e
|
|
@ -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()
|
||||||
|
|
||||||
|
|
|
||||||
16
tests/test_release_journey_regressions.py
Normal file
16
tests/test_release_journey_regressions.py
Normal 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
|
||||||
Loading…
Reference in New Issue
Block a user