fair-plugin/tests/mock-server
Chuck Adams d5b0f82b9c
feat: complete remaining active testing gaps
Six items from the testing plan, now done:

1. install-activate-update.spec.ts (@slow) — full install/activate/update
   flow via Direct Install tab. Mock server extended with hello-dolly DID
   fixtures (did-doc + metadata-doc) and zip artifact serving route
   at /artifacts/*.zip.

2. avatar-upload.spec.ts — profile page rendering, avatar section
   presence, display name accessibility. Avatar image verification
   handles Gravatar rate-limiting (at least one loaded = pass).

3. update-error-row.spec.ts — plugins page structure, FAIR error row
   detection, no JS errors on plugins page.

4. SignatureVerificationIntegrationTest.php — 5 tests running inside
   Docker WP container. Covers verify_file_signature() (WP 5.2+) with
   live sodium Ed25519 keys, tampered file rejection, missing-key
   rejection, wrong-signature rejection, key encoding round-trip.
   NB: WP 6.4 uses SHA-384 (not SHA-512) for file hashing.

5. Coverage reporting in CI — added dedicated 'coverage' job to
   phpunit-tests.yml. Runs on push to main/development/release only,
   uses PHP 8.4 + XDebug, uploads HTML coverage artifact.

6. minMsi threshold — set minMsi=9 (current baseline), minCoveredMsi=90.

Updated mock server:
  - /artifacts/<file.zip> route serves zips from tests/fixtures/zips/
  - hello-dolly DID/meta fixtures for browser install flow

Updated integration bootstrap:
  - require wp-admin/includes/file.php for verify_file_signature()

Totals: 262 unit (489 assertions), 17 integration (48), 12 HTTP (38),
23 browser (non-slow), 3 browser (@slow). Exit code 0.

Signed-off-by: Chuck Adams <chaz@chaz.works>
2026-06-09 19:15:38 -06:00
..
fixtures feat: complete remaining active testing gaps 2026-06-09 19:15:38 -06:00
Dockerfile Phase 8: add integration test harness 2026-06-09 12:21:37 -06:00
index.php feat: complete remaining active testing gaps 2026-06-09 19:15:38 -06:00