test(word-addin): e2e proof of the markdown context and marker-quote fallbacks
WHY A MOCK EXTENSION The Office mock's body exposed only text/search - no paragraphs or tables - so the structured read was untestable (it would throw and fall back to flat text in every spec). The seed gains documentBlocks: when present, body.paragraphs/body.tables describe those blocks; when absent (every pre-existing spec) the collections stay undefined, which is exactly the shape of a host without the structure APIs, so the flat-text fallback keeps its coverage for free. WHAT THE THREE TESTS PIN DOWN (each fails on flat body.text) 1. document_context carries "# " headings, list labels with the real Word listString, and pipe tables - flat text contains none of these. 2. An edit whose <original> is "# Definitions" (the renderer's heading marker included) still lands as ONE tracked change on "Definitions": the verbatim search misses, the stripped-marker retry locates the underlying text. On flat-text code this edit dies as "Skipped - source text was not found." 3. A citation chip quoting "a. Affiliate means..." (list label included) still selects the real passage in Word via the same stripped retry; before, both the exact and case-insensitive searches miss and nothing is ever selected. Full suite: 266 passed (chromium + webkit), 6 of them new. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| Repository | open-legal-products/mike |
|---|---|
| Author | Amal <mamalanand3@gmail.com> |
| Authored | |
| Committed | |
| Parents | 7fbd8132 |
| Stats | 2 files changed , +200 |
| Part of | Make Word edit approval reliable across hosts |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-01867ebd.md
from inside the repo you want the change in.