ktg-plugin-marketplace/plugins/voyage/tests
Kjell Tore Guttormsen 97b6f5406e feat(voyage): add export flow + A11Y baseline — v4.2 Step 11 [skip-docs]
Closes Wave 2 (Steps 6-11) of v4.2 implementation. Playground now
delivers the complete annotation pipeline: render -> create gestures
-> sidebar -> export.

Export flow:
  - 'Eksporter batch' button in sidebar export-bar
  - Export modal with role="dialog" aria-modal="true"
  - Generated /trekrevise command-string ready to copy
  - Two paths:
      navigator.clipboard.writeText (modern) with execCommand('copy')
      legacy fallback for cross-browser support
      Blob + URL.createObjectURL download as annotated-{brief|plan|review}.md
  - buildAnnotatedMarkdown injects voyage:anchor comments above target
    lines (mirrors lib/parsers/anchor-parser.mjs addAnchors() behaviour)

Resolve-til-arkiv (Google Docs pattern, per research-06):
  - Post-export marks pending drafts as exported (NOT delete)
  - Tab 2 ('Alle revisjoner') surfaces history with revision-stamp
  - aria-live='polite' toast announces export status

A11Y baseline (per research-06 + llm-security A11Y-RAPPORT.md):
  - aria-live='polite' toast region (Step 1)
  - Skip-to-main link (.visually-hidden + #main target)
  - role='dialog' + aria-modal='true' on form modal (Step 9)
                                    on export modal (Step 11)
  - role='tablist' / role='tab' / aria-selected / tabindex roving (Step 10)
  - aria-controls + aria-labelledby on tabpanels
  - aria-pressed on intent buttons (radiogroup-like)
  - aria-expanded + aria-controls on sidebar FAB
  - aria-hidden='true' on decorative SVG paths
  - aria-label on icon-only buttons
  - .visually-hidden labels for textarea + clipboard helper

Test coverage: tests/playground/voyage-playground.test.mjs +4 cases —
aria-live='polite', Skip to main, Blob, clipboard.writeText.

Verify: node --test tests/playground/voyage-playground.test.mjs ->
22 pass / 0 fail.
Full npm test: 596 pass / 0 fail / 2 skipped (Docker).

Refs plan.md Step 11 + research-06 + llm-security A11Y baseline.
2026-05-09 15:27:01 +02:00
..
commands feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
fixtures test(voyage): add annotation roundtrip + rollback + source_annotations integration — v4.2 Step 7 2026-05-09 15:13:27 +02:00
helpers feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
hooks fix(voyage): permanently block cloud metadata endpoints in OTLP validator (CWE-918) 2026-05-09 10:23:51 +02:00
integration test(voyage): add annotation roundtrip + rollback + source_annotations integration — v4.2 Step 7 2026-05-09 15:13:27 +02:00
lib test(voyage): add annotation roundtrip + rollback + source_annotations integration — v4.2 Step 7 2026-05-09 15:13:27 +02:00
parsers feat(voyage): add annotation-digest.mjs with canonical SHA-256 — v4.2 Step 4 2026-05-09 12:53:36 +02:00
playground feat(voyage): add export flow + A11Y baseline — v4.2 Step 11 [skip-docs] 2026-05-09 15:27:01 +02:00
scripts feat(voyage): vendor markdown-it/highlight.js + playground render-pipeline + scripts/render-artifact.mjs CLI — v4.2 Step 8 [skip-docs] 2026-05-09 15:20:17 +02:00
synthetic test(voyage): extend plan-determinism.test.mjs — SC #10 forward-compat block 2026-05-09 10:00:08 +02:00
validators test(voyage): pin forward-compat for revision/source_annotations/annotation_digest/revision_reason — v4.2 Step 2 2026-05-09 12:50:22 +02:00