Commit 4537381
fix(behavior-tests): unblock main by fixing 3 failing specs (#2785)
* fix(tests): use findFirstSelectionTarget and drop missing click() call in extract.spec
- Line 40: removed superdoc.click() — the method doesn't exist on the fixture
and the fixture already focuses the editor on setup.
- Line 95: replaceText expects a SelectionTarget; findFirstTextRange returns a
TextAddress, which fails doc.replace() validation. Switch to
findFirstSelectionTarget.
* fix(run-plugin): skip stale lost-keys preservation on accept/reject and mark removal
The SD-2517 lost-keys preservation was re-applying values from
runNode.attrs.runProperties whenever a key in runPropertiesInlineKeys
dropped out of the computed inline props. Two scenarios left stale
values in place:
1. Track-change accept/reject: the restored marks are canonical but
runNode.runProperties still reflects the pre-resolution (suggested)
state, so preservation re-injected the rejected fontFamily/color/etc.
2. User toggles a standalone mark off (bold, italic, underline): the
removed mark's value stayed in the run node's runProperties and
preservation brought it back, causing new paragraphs created via
Enter to inherit stale formatting (SD-2228).
Skip preservation during 'acceptReject' transactions, and skip per-key
when the transaction batch contains a RemoveMarkStep for that mark
type. The SD-2517 heading round-trip case is unaffected (no mark
changes occur during zero-edit import → export).
---------
Co-authored-by: Caio Pizzol <caiopizzol@icloud.com>1 parent 262b6a6 commit 4537381
2 files changed
Lines changed: 30 additions & 4 deletions
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
54 | 72 | | |
55 | 73 | | |
56 | 74 | | |
| |||
154 | 172 | | |
155 | 173 | | |
156 | 174 | | |
157 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
158 | 179 | | |
159 | 180 | | |
160 | 181 | | |
161 | 182 | | |
162 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
163 | 189 | | |
164 | 190 | | |
165 | 191 | | |
166 | 192 | | |
| 193 | + | |
167 | 194 | | |
168 | 195 | | |
169 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
0 commit comments