feat: open Following alerts in changed review (Closes #1317)
CI / lint (pull_request) Successful in 3m29s
CI / build-release (pull_request) Successful in 7s
CI / browser-journey (pull_request) Successful in 5m14s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy committed 2026-08-23 18:37:57 +00:00
1 parent 2b6730288a
commit a2501e47c3
6 files changed
+88 -6

No files matched your search

@@ -80,3 +80,34 @@ def test_following_queue_is_phone_usable_at_narrow_viewport(viewport):
overflow = page.evaluate("document.documentElement.scrollWidth > document.documentElement.clientWidth")
assert overflow is False
browser.close()
def test_following_alert_route_opens_truthful_empty_state_with_one_refresh():
with sync_playwright() as playwright:
browser = playwright.chromium.launch(headless=True)
page = browser.new_page(viewport={"width": 390, "height": 844})
page.set_content((FRONTEND / "index.html").read_text())
page.add_style_tag(path=FRONTEND / "dashboard.css")
page.add_script_tag(path=FRONTEND / "following.js")
result = page.evaluate("""async () => {
let requests=0;
globalThis.fetch=async () => {
requests += 1;
return {ok:true,json:async () => ({revision:2,items:[]})};
};
const queue=attachFollowing(() => {});
await queue.route();
return {requests,open:document.querySelector('#following-sheet').open,
status:document.querySelector('#following-status').textContent};
}""")
assert result == {
"requests": 1,
"open": True,
"status": "No watched items yet. Watch an issue or pull request from Search to keep it here.",
}
expect(page.locator("#following-sheet")).to_be_visible()
assert page.locator("#close-following").bounding_box()["height"] >= 44
browser.close()