T-M8PU-notes-chrome-e2e
State: closed/done · Impact: high · Complexity: small
The notes Playwright project covers editing, reading and find but none of the new chrome. This task adds one spec that exercises the toolbar, bubble menu, slash menu, wikilink picker and mode cycle in the real product, and asserts the byte-exact save contract.
| Location | Role today |
|---|---|
solutions/determined/playwright.config.ts | notes project: testDir: 'tests/ui', testMatch: 'notes/**/*.e2e.ts', base URL port 4891 |
solutions/determined/tests/ui/notes/editor.e2e.ts | Editing flows, CAS conflict dialog |
solutions/determined/tests/ui/notes/find.e2e.ts | Find bar flows |
solutions/determined/tests/ui/notes/reading.e2e.ts | Reading view and mode switch |
solutions/determined/tests/ui/serve-notes.ts | Serves the notes product against the fixture vault |
solutions/determined/tests/fixtures/obsidian-vault/ | Fixture vault the notes project reads |
Proposed
Section titled “Proposed”solutions/determined/tests/ui/notes/chrome.e2e.ts with one test per behaviour: toolbar Bold on a
selection wraps it in **; the bubble menu appears on a non-empty selection outside code and
never takes focus; / opens the slash list and choosing Heading 2 inserts ## ; [[ opens
completion over fixture notes and Enter inserts the wikilink; mod+shift+m cycles read, live,
source, read with the cursor line preserved; saving an unedited note leaves the file bytes
unchanged and editing one line changes only that line.
Approach
Section titled “Approach”- Add a fixture note
chrome.mdundersolutions/determined/tests/fixtures/obsidian-vault/with a paragraph, a fenced block and a table. - Write
chrome.e2e.tsusing themd-*test ids from the layer (md-toolbar,md-bubble,md-mode-toggle) and thenotes-editorid; read fixture bytes through the existing serve helper for the byte-diff assertions. - Run
bunx playwright test --project notesfromsolutions/determined; attach the trace on failure. moon run :check :test --affected.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
solutions/determined/tests/ui/notes/chrome.e2e.ts | new | The chrome spec |
solutions/determined/tests/fixtures/obsidian-vault/chrome.md | new | Fixture note |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
chrome.e2e.tsexists andbunx playwright test --project notespasses with it. - AC-2: The spec contains one test each for toolbar Bold, bubble menu,
/,[[,mod+shift+mand byte-diff. - AC-3: The byte-diff test asserts the fixture file’s sha is unchanged after an unedited save and that a one-line edit produces a one-line difference.
- AC-4: The bubble test asserts
document.activeElementstays inside.cm-contentwhile the bubble is open.
Out of scope
Section titled “Out of scope”- Perf specs; they live in the playground harness (T-I630-md-ui-playground-e2e-perf).
- Agent-pants
authoringe2e updates (T-FQ5M-agent-pants-adopts-markdown-ui).
Dependencies
Section titled “Dependencies”- T-3DFJ-notes-adopts-markdown-ui: notes runs on
MdSurfacewith the new test ids. - D-4QGN-markdown-dialect-and-compatibility-profile byte-exact framing is what the byte-diff test asserts.
Discovery context
Section titled “Discovery context”Member of milestone M-931L; the C7 verification step of D-K3EM-markdown-editor-chrome-and-plugin-environment.
Depends on
Section titled “Depends on”T-3DFJ-notes-adopts-markdown-ui