Commit 2864701
committed
test(e2e): un-skip add_row + bulk_remove flakes — root cause was test bugs
Previous "state-machine anomaly" skips (logged in qa-findings.jsonl
2026-05-24) were actually three stacked TEST bugs, not app bugs:
1. **Pagination trap (test_wl_save.py + test_crud_workflow.py)**:
`wl_table.js:776` jumps `currentPage` to the new last page after
add_row. The new row is the LAST visible row on that page (not the
first). Tests filling `set_cell_value(0, ...)` instead overwrote
existing rows on the new page, and the empty new row got filtered
out by `wl_save.js:505` (drops rows where all visible cols are
empty). Net effect: zero row growth + one silent edit of an
unrelated row.
2. **Comment-column gate (test_crud_workflow.py)**: `getAuditComment`
at `wl_save.js:410` does NOT show an audit-comment modal when the
CSV has a `Comment` column. Instead it scans EVERY visible row's
Comment cell — if any cell is empty (including the new row), the
entire save aborts client-side with "Comment field cannot be empty".
Tests must fill the Comment cell on the new row.
3. **Read-only Expires cell (test_wl_save.py)**: the `Expires` column
uses a date-picker overlay; the underlying input is read-only.
`textarea.fill()` fails with "element is not editable". Tests must
skip `Expires` (and any `_`-prefixed reserved cols).
4. **Paginated DOM count assertions (both files)**: assertions like
`final < initial` or `new_count == initial + 1` on paginated tables
are unreliable — `reloadCsvQuiet` after save returns to page 0,
which still shows ROWS_PER_PAGE rows even when the total decreased
by 2. Replaced with REST `get_csv_content` verification of the
true row count.
Fixed tests (all four were skip-marked, now active):
- tests/e2e/test_crud_workflow.py::test_add_row
- tests/e2e/test_crud_workflow.py::test_crud_workflow_end_to_end
- tests/e2e/test_wl_save.py::TestAddRowSave::test_add_row_and_save
- tests/e2e/test_wl_save.py::TestBulkRemoval::test_bulk_remove
Full Python E2E baseline after this commit (playwright 1.60 + chromium 148):
30 passed, 9 skipped, 0 errors
(was: 26 passed, 11 skipped, 2 failed)
Notes:
- The DR55_brute_force_users.csv had 2 polluted rows from prior REST
probe sessions (empty-Comment rows that triggered the
getAuditComment gate). Cleanup was a one-time REST call; the
fixed tests use `backup_csv`/`restore_csv` and won't reintroduce
pollution.
- The 9 remaining skips are unchanged: multi-tab CP iteration flake
(2), multi-user approval flow deferred to .cjs (4), revert UI
flow (3) — the last 3 can be implemented now that save-persistence
works, but that's separate scope.1 parent 24b7bde commit 2864701
2 files changed
Lines changed: 92 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 84 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
117 | 139 | | |
118 | 140 | | |
119 | 141 | | |
| |||
227 | 249 | | |
228 | 250 | | |
229 | 251 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | 252 | | |
236 | 253 | | |
237 | 254 | | |
238 | 255 | | |
239 | | - | |
240 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
241 | 259 | | |
242 | 260 | | |
243 | 261 | | |
| |||
252 | 270 | | |
253 | 271 | | |
254 | 272 | | |
255 | | - | |
| 273 | + | |
| 274 | + | |
256 | 275 | | |
257 | 276 | | |
258 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
259 | 288 | | |
260 | 289 | | |
261 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
321 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
322 | 333 | | |
323 | 334 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | 335 | | |
328 | 336 | | |
329 | 337 | | |
| |||
343 | 351 | | |
344 | 352 | | |
345 | 353 | | |
346 | | - | |
347 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
348 | 357 | | |
349 | 358 | | |
350 | 359 | | |
| |||
484 | 493 | | |
485 | 494 | | |
486 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
487 | 504 | | |
| 505 | + | |
488 | 506 | | |
489 | 507 | | |
490 | | - | |
491 | 508 | | |
492 | 509 | | |
493 | 510 | | |
494 | 511 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
| 512 | + | |
499 | 513 | | |
500 | 514 | | |
501 | 515 | | |
502 | 516 | | |
503 | 517 | | |
504 | 518 | | |
505 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
506 | 525 | | |
507 | 526 | | |
508 | 527 | | |
| |||
516 | 535 | | |
517 | 536 | | |
518 | 537 | | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
525 | 543 | | |
526 | 544 | | |
527 | 545 | | |
| |||
0 commit comments