Commit 4a01c92
authored
fix(test): update tracked-replace assertion to match word-diff behavior (#2851)
PR #2817 added word-level diffing so multi-word tracked replacements
fragment into per-word insert/delete pairs — "a tracked style" → "new
fancy" becomes two tracked changes ("a" → "new" around a preserved
space, then "tracked style" → "fancy"). The `getDocumentText()`
assertion in programmatic-tracked-change.spec.ts still expected the
pre-word-diff behaviour where "new fancy" appeared as one contiguous
string, which produced this on all three browsers:
Expected substring: "new fancy"
Received string: "Here is anew tracked stylefancy change"
Assert the inserted words "new" and "fancy" each appear in the
document text instead, and leave a comment explaining the new
semantics so the next reader doesn't have to retrace this.
Ran tests/comments/programmatic-tracked-change.spec.ts in chromium
locally — all 5 cases pass.1 parent dd3e04a commit 4a01c92
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
0 commit comments