Commit 2d67f41
authored
fix(e2e): add test isolation for note-modal Slate editor tests (#132)
* fix(e2e): add resetProjectInfoNotes for test isolation in note-modal
The note-modal tests were flaky on CI because the "save and persist"
test writes content to the DB, and subsequent tests (slash command,
heading autoformat) inherit that state. Ctrl+A+Backspace to clear
Slate editors is inherently unreliable on slow CI runners.
Fix: add resetProjectInfoNotes() helper that resets note fields to
seed values before each test, ensuring a known starting state.
* fix(e2e): check Slate placeholder visibility for empty editor assertion
When the Plate/Slate editor is empty, it renders a placeholder element
with data-slate-placeholder="true". textContent() captures this
placeholder text, causing the emptiness check to fail. Use placeholder
element visibility instead — a visible placeholder means the editor
is truly empty.1 parent 44aa00c commit 2d67f41
2 files changed
+64
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
303 | 343 | | |
304 | 344 | | |
305 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 244 | + | |
251 | 245 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
256 | 254 | | |
257 | 255 | | |
258 | 256 | | |
| |||
379 | 377 | | |
380 | 378 | | |
381 | 379 | | |
| 380 | + | |
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
| |||
514 | 513 | | |
515 | 514 | | |
516 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
517 | 520 | | |
518 | 521 | | |
519 | 522 | | |
| |||
539 | 542 | | |
540 | 543 | | |
541 | 544 | | |
542 | | - | |
543 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
544 | 551 | | |
545 | 552 | | |
546 | 553 | | |
| |||
0 commit comments