Skip to content

test(e2e): measure content width only after the TOC transition ends - #1825

Merged
perber merged 1 commit into
mainfrom
test/e2e-content-width-settle
Nov 15, 2026
Merged

perber merged 1 commit into
mainfrom
test/e2e-content-width-settle

Conversation

@perber

@perber perber commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Related issue

Flaky e2e test from #1821; failed in CI on #1823 and #1824 without either touching the page view.

What changed

e2e/tests/settings-content-width.spec.ts: measureViewer waits until no CSS transition is running before it measures. The TOC pane and the subheader's reserved padding animate their width over 200ms (index.css), and the spec measured once right after the panel became visible, so the content and the header rows could be caught at different points of the animation (3.7px and 25px off). Only CSS transitions are awaited, so endless animations (spinners) can't block it. Test-only change.

How I tested it

  • e2e/run.sh --grep "content width|wide" --repeat-each 10 locally: 170/170 passed.
  • npm run lint and Prettier in e2e, make verify-commits.

Checklist

  • I discussed the approach on the linked issue before starting (or this is a trivial fix: typo, docs, obvious one-liner)
  • This PR is focused on a single change
  • New behaviour plugs into an extension point; no new if feature branches in shared code (rule 1)
  • I updated documentation if needed
  • If users or admins will notice a change in behaviour, the commit carries a Behavior-Change: trailer (commit style)
  • For UI changes: behaviour is covered by automated tests where possible (rule 11)

🤖 Generated with Claude Code

"wide stays aligned next to the expanded TOC side panel" failed in CI on
#1823 (3.7px) and #1824 (25px) without touching the viewer. The TOC pane
and the subheader's reserved padding animate their width over 200ms, and
the spec measured once right after the panel became visible, so content
and header rows could be caught mid-animation. measureViewer now waits
until no CSS transition is running.
@perber
perber merged commit e48bc2f into main Nov 15, 2026
17 of 18 checks passed
@perber
perber deleted the test/e2e-content-width-settle branch November 15, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant