Tests: the page's live updates #404

Closed
opened 2026-11-06 19:51:45 -08:00 by rays · 1 comment
Owner

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:

  • downloading an item by hand: its bar fills as progress events arrive, the count line says how far, and when it is done the toast names the file and the row shows it downloaded
  • a download that fails: its bar stops and the toast names the item and says to try again (#304)
  • another person's download sends nothing to this page (#294)
  • a Signal's new hits refresh the Signal's count and its open list

Seen 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.

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: - downloading an item by hand: its bar fills as `progress` events arrive, the count line says how far, and when it is done the toast names the file and the row shows it downloaded - a download that fails: its bar stops and the toast names the item and says to try again (#304) - another person's download sends nothing to this page (#294) - a Signal's new hits refresh the Signal's count and its open list Seen 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.
rays added the enhancement label 2026-11-06 19:51:45 -08:00
Author
Owner

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.

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.
rays closed this issue 2026-11-06 20:37:47 -08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#404