From aa12c4ab9df60bcaa34a4af03b5fb8c11ee94689 Mon Sep 17 00:00:00 2001 From: timmy Date: Sun, 23 Aug 2026 12:26:39 +0000 Subject: [PATCH] test: validate closed Following retirement on phone --- tests/e2e/test_mobile_following_release.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/e2e/test_mobile_following_release.py b/tests/e2e/test_mobile_following_release.py index 1382ecf..9892a25 100644 --- a/tests/e2e/test_mobile_following_release.py +++ b/tests/e2e/test_mobile_following_release.py @@ -19,6 +19,7 @@ def test_following_queue_is_phone_usable_at_narrow_viewport(): page = browser.new_page(viewport={"width": 320, "height": 568}) page.set_content((FRONTEND / "index.html").read_text()) page.add_style_tag(path=FRONTEND / "dashboard.css") + page.add_script_tag(path=FRONTEND / "search-preview.js") row = page.locator('[data-mobile-queue="following"]') expect(row).to_have_count(1) @@ -35,6 +36,22 @@ def test_following_queue_is_phone_usable_at_narrow_viewport(): assert page.locator("#review-following").bounding_box()["height"] >= 44 assert page.locator(".following-card").bounding_box()["height"] >= 44 assert page.locator("#close-following").bounding_box()["height"] >= 44 + + retire = page.locator("#watch-search-result") + page.evaluate("""() => { + document.querySelector('#following-sheet').close(); + document.querySelector('#search-preview').classList.add('open'); + const button = document.querySelector('#watch-search-result'); + renderSearchPreviewWatch( + {repository:'stackchain/api', number:42, kind:'issue', state:'closed', + following:true, watching:true}, + {status:'ready'}, + button + ); + }""") + expect(retire).to_be_visible() + expect(retire).to_have_text("Stop watching & next") + assert retire.bounding_box()["height"] >= 44 overflow = page.evaluate("document.documentElement.scrollWidth > document.documentElement.clientWidth") assert overflow is False browser.close()