[AZ-461] [AZ-464] [AZ-470] [AZ-472] Batch 5 - detection/bulk-validate/panel-width/classes tests
ci/woodpecker/push/build-arm Pipeline was successful

- AZ-461 sync image detect URL canary (FT-P-11) PASS;
  async-video QUARANTINE (FT-P-12) + X-Refresh-Token drift
  (FT-P-13) recorded as it.fails() with controls.
- AZ-464 bulk-validate URL + UI sync (≤2 s) PASS;
  body shape drift {annotationIds,status} vs contract
  {ids,targetStatus:30} captured as it.fails().
- AZ-470 panel-width debounce + rehydration: entire task
  is Phase-B target (useResizablePanel has no PUT writer
  / no rehydration); 3 ACs as it.fails() with controls.
- AZ-472 DetectionClasses load + click + fallback PASS;
  hotkey arithmetic P=0 PASS, P=20/P=40 it.fails() for
  classes[idx+P]-against-dense-array drift.

Code review: PASS (0 findings). Fast: 18/18 files,
102 passed / 13 skipped. Static: 21/21 PASS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-11 04:38:22 +03:00
parent 1dd25edee3
commit 6d03643c2c
15 changed files with 1644 additions and 4 deletions
@@ -0,0 +1,55 @@
# Test — Bulk-Validate (Dataset)
**Task**: AZ-464_test_bulk_validate
**Name**: Bulk-validate URL + body + UI sync
**Description**: Implement the 3 blackbox tests that pin the dataset bulk-validate path: outbound URL, request body shape, and the post-validate UI sync (≤2 s).
**Complexity**: 2 points
**Dependencies**: AZ-456_test_infrastructure
**Component**: 07_dataset (Blackbox Tests)
**Tracker**: AZ-464
**Epic**: AZ-455
## Problem
Bulk-validate is a single mutation that flips many `mediaStatus` values; getting the URL or the body wrong corrupts an arbitrary number of seeds. A targeted contract test pins both, plus a 2-s sync deadline catches stale-UI regressions.
## Outcome
- 3 scenarios pass per the contract.
## Scope
### Included
| Scenario | Profile | Source file |
|----------|---------|-------------|
| FT-P-20 — bulk-validate request URL and body | fast + e2e | blackbox-tests.md |
| FT-P-21 — bulk-validate UI reflects new status within 2 s | fast + e2e | blackbox-tests.md |
| NFT-PERF-07 — bulk-validate UI reflects new status within 2 s | fast | performance-tests.md |
### Excluded
- Individual annotation status changes (covered in 05_test_annotations_endpoint).
- Dataset filtering / paging (out of scope for the baseline test suite — feature-cycle work).
## Acceptance Criteria
**AC-1: URL canary**
FT-P-20 captures the outbound bulk-validate URL and asserts it equals the contract value.
**AC-2: Body shape**
FT-P-20 captures the outbound body and asserts it carries the expected media-ID set + the target status value.
**AC-3: UI sync deadline**
FT-P-21 / NFT-PERF-07 measure the wall-clock from response receipt to DOM update of the dataset list rows; asserts ≤2 s.
## System Under Test Boundary
- System under test: `<DatasetPage>` + its bulk-validate action handler + `src/api/client.ts`.
- Allowed stubs: MSW for the dataset bulk-validate endpoint; real `annotations/` service for e2e.
- Disallowed: reading React state to assert UI sync — the test reads the rendered DOM (table rows / status badges).
- Expected observables compared against `results_report.md` rows 36-37.
## Constraints
- Use the `seed_media` fixture's 6-row baseline so the bulk operation is bounded.