#38 · Wait for the fitted view before typing bounds in the summaries test
- timeline-app
- pull request
Fixes the intermittent Firefox failure on #37 (`summaries-browser.mjs:27`, `'-200/1' !== '0'`). **Cause:** importing a timeline fits the view synchronously but writes the bound fields on the next render. The test waited for the title plus one animation frame, then typed a left bound. When Firefox ran the app's render after that frame, the render, a genuine navigation to the fitted view, replaced the typed bound. The app behaves as intended: re-renders keep unapplied typing, while navigation rewrites it. **Fix (test only):** after importing, the helper computes the fitted view with the app's own `Viewport.fit` over the document's moments. It then waits until the exact bound fields (`#exact-left` and `#exact-right`, written in the same pass as the bounds) show it. The wait doesn't depend on the display format and returns as soon as the render has happened. **Testing:** `browser.mjs` and `offline-browser.mjs` pass locally in Chromium and Firefox, and the Firefox offline suite passed four further runs in a row.
Sources
Open #38 · Wait for the fitted view before typing bounds in the summaries test in the timeline