From 2fdbd655f401e6ab8ed193c77b4578ea1c83f06d Mon Sep 17 00:00:00 2001 From: Ethan Graf Date: Mon, 3 Aug 2026 20:09:42 -0400 Subject: [PATCH] Add Playwright e2e tests for the editor behaviour vitest cannot reach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vitest suite runs `environment: 'node'` and collects `*.test.ts` only, so nothing depending on layout, geometry or CodeMirror's DOM is testable — and that is precisely where this editor's bugs have been landing. Scroll restoration silently recorded `scrollTop` 0; the heading scroll was dropped because it was dispatched before the view had height; the completion popup's font and footer took three rounds of blind CSS. All four shipped green. Ten tests driving the real app: scroll and cursor restored across a tab switch, `[[Note#Heading]]` putting that heading at the top of the viewport, and the completion popup's note names, heading options with level badges, same-document `[[#`, alias dismissal, and the footer. Two of them assert the exact things that were wrong rather than merely that the feature works: the option list's computed `font-family` is not monospace (CM's base theme hardcodes it and our override lost on specificity twice), and the footer's rendered geometry is below the list (CM re-appends the `