Tests: the page's live updates #404
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
web/src/events.ts is at 61% of its lines under the browser suite: the live updates for a download in progress (its bar and the count line, lines 29-34), a download finished (the toast and the row, 37-41), a download that failed (its toast naming the item, 52-55) and Signals' new hits (59-61) never run. They are what someone sees while a file downloads.
Tests to add:
progressevents arrive, the count line says how far, and when it is done the toast names the file and the row shows it downloadedSeen with the coverage of both suites merged line by line (cargo:
sh scripts/coverage.sh, browser:sh scripts/coverage.sh api; reports in target/coverage/cargo, api and page; #390, #394), as of 2026-11-07. A test added here shows in Grafana's Coverage row at the next run.Tests added in
ee5610b. The fixture server serves live.xml: a slow episode (ten parts 200 ms apart) and one that answers 500. A download by hand fills the bar (.dlbar.live), the count line reads 'downloading … N%', the toast names the file and the row shows it downloaded; a second person's page, not subscribed, gets no progress, toast or failure (#294); the failed one's toast names the item and says to try again (#304) and its bar stops. A Signal open on its page shows new hits and its sidebar count without a reload (signal_hits). Whole browser suite: 104 passed.