@crvouga/atlas 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +649 -2
- package/dist/bun/src/driver.d.ts +67 -0
- package/dist/bun/src/driver.js +90 -0
- package/dist/bun/src/index.d.ts +2 -0
- package/dist/bun/src/index.js +2 -0
- package/dist/core/src/cli.d.ts +1 -0
- package/dist/core/src/cli.js +177 -0
- package/dist/core/src/config.d.ts +477 -0
- package/dist/core/src/config.js +100 -0
- package/dist/core/src/events/cloudevents.d.ts +56 -0
- package/dist/core/src/events/cloudevents.js +152 -0
- package/dist/core/src/graph.d.ts +113 -0
- package/dist/core/src/graph.js +221 -0
- package/dist/core/src/index.d.ts +17 -0
- package/dist/core/src/index.js +17 -0
- package/dist/core/src/lint.d.ts +53 -0
- package/dist/core/src/lint.js +138 -0
- package/dist/core/src/plan.d.ts +109 -0
- package/dist/core/src/plan.js +324 -0
- package/dist/core/src/privacy.d.ts +8 -0
- package/dist/core/src/privacy.js +42 -0
- package/dist/core/src/report/formats.d.ts +69 -0
- package/dist/core/src/report/formats.js +109 -0
- package/dist/core/src/report/markdown.d.ts +8 -0
- package/dist/core/src/report/markdown.js +140 -0
- package/dist/core/src/run/clients.d.ts +42 -0
- package/dist/core/src/run/clients.js +250 -0
- package/dist/core/src/run/execute.d.ts +854 -0
- package/dist/core/src/run/execute.js +877 -0
- package/dist/core/src/run/frames.d.ts +16 -0
- package/dist/core/src/run/frames.js +52 -0
- package/dist/core/src/run/http.d.ts +41 -0
- package/dist/core/src/run/http.js +71 -0
- package/dist/core/src/run/types.d.ts +248 -0
- package/dist/core/src/run/types.js +39 -0
- package/dist/core/src/signals.d.ts +110 -0
- package/dist/core/src/signals.js +121 -0
- package/dist/core/src/spec/compose.d.ts +28 -0
- package/dist/core/src/spec/compose.js +71 -0
- package/dist/core/src/spec/index.d.ts +5 -0
- package/dist/core/src/spec/index.js +5 -0
- package/dist/core/src/spec/load.d.ts +8 -0
- package/dist/core/src/spec/load.js +46 -0
- package/dist/core/src/spec/parse.d.ts +5 -0
- package/dist/core/src/spec/parse.js +32 -0
- package/dist/core/src/spec/scxml.d.ts +19 -0
- package/dist/core/src/spec/scxml.js +239 -0
- package/dist/core/src/spec/types.d.ts +96 -0
- package/dist/core/src/spec/types.js +25 -0
- package/dist/detox/src/index.d.ts +75 -0
- package/dist/detox/src/index.js +110 -0
- package/dist/playwright/src/driver.d.ts +44 -0
- package/dist/playwright/src/driver.js +82 -0
- package/dist/playwright/src/index.d.ts +3 -0
- package/dist/playwright/src/index.js +3 -0
- package/dist/playwright/src/media.d.ts +68 -0
- package/dist/playwright/src/media.js +283 -0
- package/dist/playwright/src/signals.d.ts +34 -0
- package/dist/playwright/src/signals.js +56 -0
- package/dist/reports/src/browser-navigation.d.ts +2 -0
- package/dist/reports/src/browser-navigation.js +28 -0
- package/dist/reports/src/bundle.d.ts +24 -0
- package/dist/reports/src/bundle.js +114 -0
- package/dist/reports/src/catalog.d.ts +37 -0
- package/dist/reports/src/catalog.js +127 -0
- package/dist/reports/src/clock.d.ts +14 -0
- package/dist/reports/src/clock.js +4 -0
- package/dist/reports/src/completion-order.d.ts +10 -0
- package/dist/reports/src/completion-order.js +76 -0
- package/dist/reports/src/evidence-live.d.ts +40 -0
- package/dist/reports/src/evidence-live.js +118 -0
- package/dist/reports/src/evidence-types.d.ts +90 -0
- package/dist/reports/src/evidence-types.js +15 -0
- package/dist/reports/src/evidence-view.d.ts +68 -0
- package/dist/reports/src/evidence-view.js +113 -0
- package/dist/reports/src/explorer-types.d.ts +56 -0
- package/dist/reports/src/explorer-types.js +0 -0
- package/dist/reports/src/explorer-versions.d.ts +4 -0
- package/dist/reports/src/explorer-versions.js +21 -0
- package/dist/reports/src/export-evidence.d.ts +11 -0
- package/dist/reports/src/export-evidence.js +94 -0
- package/dist/reports/src/fetcher.d.ts +50 -0
- package/dist/reports/src/fetcher.js +205 -0
- package/dist/reports/src/format-date.d.ts +1 -0
- package/dist/reports/src/format-date.js +10 -0
- package/dist/reports/src/format.d.ts +16 -0
- package/dist/reports/src/format.js +71 -0
- package/dist/reports/src/frames.d.ts +46 -0
- package/dist/reports/src/frames.js +245 -0
- package/dist/reports/src/hash.d.ts +17 -0
- package/dist/reports/src/hash.js +43 -0
- package/dist/reports/src/html-frame.d.ts +13 -0
- package/dist/reports/src/html-frame.js +63 -0
- package/dist/reports/src/http.d.ts +3 -0
- package/dist/reports/src/http.js +0 -0
- package/dist/reports/src/junit.d.ts +23 -0
- package/dist/reports/src/junit.js +119 -0
- package/dist/reports/src/keyboard.d.ts +16 -0
- package/dist/reports/src/keyboard.js +135 -0
- package/dist/reports/src/keys.d.ts +53 -0
- package/dist/reports/src/keys.js +122 -0
- package/dist/reports/src/layer-catalog.d.ts +5 -0
- package/dist/reports/src/layer-catalog.js +39 -0
- package/dist/reports/src/layer-merge.d.ts +43 -0
- package/dist/reports/src/layer-merge.js +154 -0
- package/dist/reports/src/layer-source.d.ts +6 -0
- package/dist/reports/src/layer-source.js +32 -0
- package/dist/reports/src/layer-store.d.ts +10 -0
- package/dist/reports/src/layer-store.js +36 -0
- package/dist/reports/src/layer-types.d.ts +32 -0
- package/dist/reports/src/layer-types.js +0 -0
- package/dist/reports/src/layers-route.d.ts +20 -0
- package/dist/reports/src/layers-route.js +259 -0
- package/dist/reports/src/namespace-guard.d.ts +11 -0
- package/dist/reports/src/namespace-guard.js +40 -0
- package/dist/reports/src/navigation.d.ts +8 -0
- package/dist/reports/src/navigation.js +0 -0
- package/dist/reports/src/object-io.d.ts +9 -0
- package/dist/reports/src/object-io.js +41 -0
- package/dist/reports/src/object-store.d.ts +67 -0
- package/dist/reports/src/object-store.js +32 -0
- package/dist/reports/src/performance-part.d.ts +9 -0
- package/dist/reports/src/performance-part.js +42 -0
- package/dist/reports/src/performance.d.ts +13 -0
- package/dist/reports/src/performance.js +45 -0
- package/dist/reports/src/persist.d.ts +10 -0
- package/dist/reports/src/persist.js +38 -0
- package/dist/reports/src/phone.d.ts +5 -0
- package/dist/reports/src/phone.js +18 -0
- package/dist/reports/src/protocol.d.ts +78 -0
- package/dist/reports/src/protocol.js +36 -0
- package/dist/reports/src/publication.d.ts +4 -0
- package/dist/reports/src/publication.js +35 -0
- package/dist/reports/src/publish.d.ts +52 -0
- package/dist/reports/src/publish.js +189 -0
- package/dist/reports/src/read.d.ts +62 -0
- package/dist/reports/src/read.js +214 -0
- package/dist/reports/src/recording-bundle.d.ts +22 -0
- package/dist/reports/src/recording-bundle.js +4 -0
- package/dist/reports/src/recording-keys.d.ts +9 -0
- package/dist/reports/src/recording-keys.js +50 -0
- package/dist/reports/src/remote-report.d.ts +39 -0
- package/dist/reports/src/remote-report.js +304 -0
- package/dist/reports/src/report-loader.d.ts +22 -0
- package/dist/reports/src/report-loader.js +0 -0
- package/dist/reports/src/report-parts.d.ts +10 -0
- package/dist/reports/src/report-parts.js +112 -0
- package/dist/reports/src/report-types.d.ts +194 -0
- package/dist/reports/src/report-types.js +29 -0
- package/dist/reports/src/reports-explorer-route.d.ts +90 -0
- package/dist/reports/src/reports-explorer-route.js +65 -0
- package/dist/reports/src/reports-list-route.d.ts +23 -0
- package/dist/reports/src/reports-list-route.js +55 -0
- package/dist/reports/src/reports-route.d.ts +267 -0
- package/dist/reports/src/reports-route.js +204 -0
- package/dist/reports/src/reports-store.d.ts +11 -0
- package/dist/reports/src/reports-store.js +28 -0
- package/dist/reports/src/resilient-cache.d.ts +3 -0
- package/dist/reports/src/resilient-cache.js +33 -0
- package/dist/reports/src/retention.d.ts +9 -0
- package/dist/reports/src/retention.js +16 -0
- package/dist/reports/src/scenario.d.ts +15 -0
- package/dist/reports/src/scenario.js +35 -0
- package/dist/reports/src/snapshot-bundle.d.ts +18 -0
- package/dist/reports/src/snapshot-bundle.js +94 -0
- package/dist/reports/src/snapshot-surface.d.ts +29 -0
- package/dist/reports/src/snapshot-surface.js +339 -0
- package/dist/reports/src/source-content.d.ts +30 -0
- package/dist/reports/src/source-content.js +63 -0
- package/dist/reports/src/source-entries.d.ts +4 -0
- package/dist/reports/src/source-entries.js +34 -0
- package/dist/reports/src/source-part.d.ts +4 -0
- package/dist/reports/src/source-part.js +66 -0
- package/dist/reports/src/source-reader.d.ts +6 -0
- package/dist/reports/src/source-reader.js +17 -0
- package/dist/reports/src/spec-evidence.d.ts +6 -0
- package/dist/reports/src/spec-evidence.js +20 -0
- package/dist/reports/src/spec-inventory.d.ts +14 -0
- package/dist/reports/src/spec-inventory.js +75 -0
- package/dist/reports/src/status.d.ts +4 -0
- package/dist/reports/src/status.js +8 -0
- package/dist/reports/src/store-prefix.d.ts +21 -0
- package/dist/reports/src/store-prefix.js +53 -0
- package/dist/reports/src/test-catalog-entity.d.ts +3 -0
- package/dist/reports/src/test-catalog-entity.js +34 -0
- package/dist/reports/src/types.d.ts +5 -0
- package/dist/reports/src/types.js +0 -0
- package/dist/reports/src/use-report-nav.d.ts +25 -0
- package/dist/reports/src/use-report-nav.js +181 -0
- package/dist/schema/src/common.d.ts +57 -0
- package/dist/schema/src/common.js +32 -0
- package/dist/schema/src/index.d.ts +5 -0
- package/dist/schema/src/index.js +5 -0
- package/dist/schema/src/manifest.d.ts +457 -0
- package/dist/schema/src/manifest.js +247 -0
- package/dist/schema/src/report-sources.d.ts +68 -0
- package/dist/schema/src/report-sources.js +53 -0
- package/dist/schema/src/runs-index.d.ts +52 -0
- package/dist/schema/src/runs-index.js +24 -0
- package/dist/schema/src/spec.d.ts +245 -0
- package/dist/schema/src/spec.js +133 -0
- package/dist/vitest/src/index.d.ts +22 -0
- package/dist/vitest/src/index.js +33 -0
- package/dist/webdriver/src/driver.d.ts +69 -0
- package/dist/webdriver/src/driver.js +230 -0
- package/dist/webdriver/src/index.d.ts +11 -0
- package/dist/webdriver/src/index.js +10 -0
- package/dist/webdriver/src/protocol.d.ts +60 -0
- package/dist/webdriver/src/protocol.js +146 -0
- package/package.json +181 -4
- package/packages/bun/README.md +69 -0
- package/packages/core/README.md +78 -0
- package/packages/core/bin/atlas.mjs +8 -0
- package/packages/detox/README.md +73 -0
- package/packages/playwright/README.md +77 -0
- package/packages/reports/README.md +47 -0
- package/packages/reports/STORAGE.md +73 -0
- package/packages/schema/README.md +23 -0
- package/packages/schema/schemas/atlas-change.schema.json +34 -0
- package/packages/schema/schemas/atlas.schema.json +32 -0
- package/packages/schema/schemas/cloud-event.schema.json +40 -0
- package/packages/schema/schemas/journeys.schema.json +17 -0
- package/packages/schema/schemas/manifest.schema.json +160 -0
- package/packages/schema/schemas/path-record.schema.json +151 -0
- package/packages/schema/schemas/report-sources.schema.json +95 -0
- package/packages/schema/schemas/run-info.schema.json +176 -0
- package/packages/schema/schemas/run-summary.schema.json +206 -0
- package/packages/schema/schemas/runs-index.schema.json +23 -0
- package/packages/schema/schemas/state-node.schema.json +238 -0
- package/packages/schema/schemas/state-record.schema.json +354 -0
- package/packages/schema/schemas/timeline-entry.schema.json +124 -0
- package/packages/schema/schemas/transition-record.schema.json +125 -0
- package/packages/visualizer/README.md +154 -0
- package/packages/visualizer/bin/atlas-visualizer.mjs +176 -0
- package/packages/visualizer/example/specs/coffee/ordering/checkout.scxml +82 -0
- package/packages/visualizer/example/specs/coffee/ordering/journeys.yaml +129 -0
- package/packages/visualizer/example/specs/coffee/ordering/known-issues.md +14 -0
- package/packages/visualizer/example/specs/coffee/ordering/machine.yaml +158 -0
- package/packages/visualizer/example/specs/coffee/ordering/open-questions.md +25 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/chart.mmd +67 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +245 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +12 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +2003 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/005.vtt +17 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/006.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/007.vtt +17 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/008.vtt +17 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/009.vtt +13 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/010.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/011.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/012.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/013.vtt +9 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.mp4 +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.poster.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.mp4 +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.poster.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/failed-01.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/failed-01.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.webp +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.png +0 -0
- package/packages/visualizer/fixtures/failures/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.webp +0 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/checkout.scxml +82 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/journeys.yaml +129 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/known-issues.md +14 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/machine.yaml +158 -0
- package/packages/visualizer/fixtures/failures/specs/coffee/ordering/open-questions.md +25 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/chart.mmd +67 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/ctrf.json +247 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/junit.xml +12 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-02T09-10-00-000Z-fast/manifest.json +1875 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/chart.mmd +67 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/ctrf.json +244 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/junit.xml +12 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/manifest.json +1977 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/001.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/002.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/003.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/004.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/005.vtt +17 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/captions/006.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-04T16-20-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/chart.mmd +67 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +472 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +16 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +3701 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/005.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/006.vtt +13 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/007.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/008.vtt +13 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/009.vtt +17 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/010.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/011.vtt +13 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/012.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/013.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/014.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/015.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/016.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/017.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/018.vtt +17 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/019.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/020.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/021.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/022.vtt +17 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/023.vtt +17 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/024.vtt +13 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/025.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/026.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/027.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/028.vtt +9 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.mp4 +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.poster.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.mp4 +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/04.poster.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/06.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/06.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/07.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/07.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/08.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/08.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/09.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/09.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/10.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/10.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/11.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/11.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/12.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/12.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/13.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/13.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/14.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/14.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-4/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-5/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-6/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-6/01.webp +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-7/01.png +0 -0
- package/packages/visualizer/fixtures/full/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-7/01.webp +0 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/checkout.scxml +82 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/journeys.yaml +129 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/known-issues.md +14 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/machine.yaml +158 -0
- package/packages/visualizer/fixtures/full/specs/coffee/ordering/open-questions.md +25 -0
- package/packages/visualizer/fixtures/large/runs/2026-10-06T14-40-00-000Z-fast/ctrf.json +1280 -0
- package/packages/visualizer/fixtures/large/runs/2026-10-06T14-40-00-000Z-fast/junit.xml +26 -0
- package/packages/visualizer/fixtures/large/runs/2026-10-06T14-40-00-000Z-fast/manifest.json +28393 -0
- package/packages/visualizer/fixtures/large/specs/accounts/sign-up/identity-check.machine.yaml +397 -0
- package/packages/visualizer/fixtures/large/specs/accounts/sign-up/journeys.yaml +129 -0
- package/packages/visualizer/fixtures/large/specs/accounts/sign-up/machine.yaml +830 -0
- package/packages/visualizer/fixtures/large/specs/atlas.yaml +65 -0
- package/packages/visualizer/fixtures/large/specs/billing/invoices/journeys.yaml +132 -0
- package/packages/visualizer/fixtures/large/specs/billing/invoices/machine.yaml +830 -0
- package/packages/visualizer/fixtures/large/specs/billing/invoices/refund-handling.scxml +288 -0
- package/packages/visualizer/fixtures/large/specs/catalog/browsing/journeys.yaml +126 -0
- package/packages/visualizer/fixtures/large/specs/catalog/browsing/machine.yaml +831 -0
- package/packages/visualizer/fixtures/large/specs/catalog/browsing/product-comparison.machine.yaml +395 -0
- package/packages/visualizer/fixtures/large/specs/orders/checkout/journeys.yaml +120 -0
- package/packages/visualizer/fixtures/large/specs/orders/checkout/machine.yaml +724 -0
- package/packages/visualizer/fixtures/large/specs/orders/checkout/open-questions.md +16 -0
- package/packages/visualizer/fixtures/large/specs/orders/checkout/payment.scxml +288 -0
- package/packages/visualizer/fixtures/large/specs/shipping/deliveries/delivery-scheduling.machine.yaml +397 -0
- package/packages/visualizer/fixtures/large/specs/shipping/deliveries/journeys.yaml +132 -0
- package/packages/visualizer/fixtures/large/specs/shipping/deliveries/known-issues.md +13 -0
- package/packages/visualizer/fixtures/large/specs/shipping/deliveries/machine.yaml +830 -0
- package/packages/visualizer/fixtures/large/specs/support/tickets/escalation.machine.yaml +395 -0
- package/packages/visualizer/fixtures/large/specs/support/tickets/journeys.yaml +123 -0
- package/packages/visualizer/fixtures/large/specs/support/tickets/machine.yaml +720 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T10-00-00-000Z-showcase/manifest.json +68 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T11-00-00-000Z-showcase/ctrf.json +50 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T11-00-00-000Z-showcase/junit.xml +6 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T11-00-00-000Z-showcase/manifest.json +1281 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T12-00-00-000Z-showcase/ctrf.json +50 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T12-00-00-000Z-showcase/junit.xml +6 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T12-00-00-000Z-showcase/manifest.json +1232 -0
- package/packages/visualizer/fixtures/malformed/runs/2026-10-06T13-00-00-000Z-showcase/manifest.json +1244 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/checkout.scxml +82 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/journeys.yaml +134 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/known-issues.md +14 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/loyalty.scxml +4 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/machine.yaml +156 -0
- package/packages/visualizer/fixtures/malformed/specs/coffee/ordering/open-questions.md +25 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/chart.mmd +67 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +149 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +9 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +1718 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +17 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +17 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +9 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/005.vtt +9 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.mp4 +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/03.poster.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.png +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/05.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.png +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-3/01.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/00-start-01.png +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/00-start-01.webp +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
- package/packages/visualizer/fixtures/partial/runs/2026-10-06T15-05-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/checkout.scxml +82 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/journeys.yaml +129 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/known-issues.md +14 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/machine.yaml +158 -0
- package/packages/visualizer/fixtures/partial/specs/coffee/ordering/open-questions.md +25 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/ctrf.json +79 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/junit.xml +7 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/manifest.json +1504 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/001.vtt +9 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/002.vtt +9 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/003.vtt +9 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/captions/004.vtt +17 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.mp4 +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/01.poster.webp +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.mp4 +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/clips/journey-1/02.poster.webp +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.png +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/01.webp +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.png +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/02.webp +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.png +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/03.webp +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.png +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-1/04.webp +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.png +0 -0
- package/packages/visualizer/fixtures/removed/runs/2026-10-06T14-40-00-000Z-showcase/media/paths/journey-2/01.webp +0 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/checkout.scxml +82 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/journeys.yaml +129 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/known-issues.md +14 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/machine.yaml +158 -0
- package/packages/visualizer/fixtures/removed/specs/coffee/ordering/open-questions.md +25 -0
- package/packages/visualizer/fixtures/spec-only/runs/.gitkeep +0 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/checkout.scxml +82 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/journeys.yaml +129 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/known-issues.md +14 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/machine.yaml +158 -0
- package/packages/visualizer/fixtures/spec-only/specs/coffee/ordering/open-questions.md +25 -0
- package/packages/visualizer/index.html +13 -0
- package/packages/visualizer/scripts/make-fixtures.ts +1490 -0
- package/packages/visualizer/scripts/publish-data.ts +22 -0
- package/packages/visualizer/src/app/AppShell.tsx +56 -0
- package/packages/visualizer/src/app/atlas-context.tsx +23 -0
- package/packages/visualizer/src/app/gazetteer.module.css +97 -0
- package/packages/visualizer/src/app/gazetteer.tsx +105 -0
- package/packages/visualizer/src/app/report-sources.tsx +122 -0
- package/packages/visualizer/src/app/router.tsx +69 -0
- package/packages/visualizer/src/app/search-query.tsx +14 -0
- package/packages/visualizer/src/components/DataIssues.module.css +136 -0
- package/packages/visualizer/src/components/DataIssues.tsx +70 -0
- package/packages/visualizer/src/components/Header.module.css +189 -0
- package/packages/visualizer/src/components/Header.tsx +127 -0
- package/packages/visualizer/src/components/Legend.module.css +84 -0
- package/packages/visualizer/src/components/Legend.tsx +50 -0
- package/packages/visualizer/src/components/Screen.module.css +312 -0
- package/packages/visualizer/src/components/Screen.tsx +141 -0
- package/packages/visualizer/src/components/Status.module.css +116 -0
- package/packages/visualizer/src/components/Status.tsx +60 -0
- package/packages/visualizer/src/components/icons.tsx +156 -0
- package/packages/visualizer/src/components/labels.tsx +22 -0
- package/packages/visualizer/src/data/adapters/adapter.ts +112 -0
- package/packages/visualizer/src/data/adapters/context.tsx +11 -0
- package/packages/visualizer/src/data/adapters/index.ts +29 -0
- package/packages/visualizer/src/data/adapters/report-backend.test.ts +96 -0
- package/packages/visualizer/src/data/adapters/report-backend.ts +42 -0
- package/packages/visualizer/src/data/fixtures.test.ts +407 -0
- package/packages/visualizer/src/data/model/build.ts +418 -0
- package/packages/visualizer/src/data/model/event-kind.test.ts +59 -0
- package/packages/visualizer/src/data/model/event-kind.ts +54 -0
- package/packages/visualizer/src/data/model/index.ts +3 -0
- package/packages/visualizer/src/data/model/journeys.test.ts +159 -0
- package/packages/visualizer/src/data/model/journeys.ts +29 -0
- package/packages/visualizer/src/data/model/simulation.test.ts +115 -0
- package/packages/visualizer/src/data/model/simulation.ts +187 -0
- package/packages/visualizer/src/data/model/status.test.ts +34 -0
- package/packages/visualizer/src/data/model/status.ts +43 -0
- package/packages/visualizer/src/data/model/types.ts +280 -0
- package/packages/visualizer/src/data/parse/issues.test.ts +82 -0
- package/packages/visualizer/src/data/parse/issues.ts +114 -0
- package/packages/visualizer/src/data/parse/manifest.ts +173 -0
- package/packages/visualizer/src/data/parse/markdown.test.ts +119 -0
- package/packages/visualizer/src/data/parse/markdown.ts +133 -0
- package/packages/visualizer/src/data/parse/spec.test.ts +106 -0
- package/packages/visualizer/src/data/parse/spec.ts +557 -0
- package/packages/visualizer/src/data/parse/structured.ts +44 -0
- package/packages/visualizer/src/data/queries.ts +369 -0
- package/packages/visualizer/src/data/testing/load-fixture.ts +63 -0
- package/packages/visualizer/src/evidence/api.ts +41 -0
- package/packages/visualizer/src/evidence/check-detail.tsx +257 -0
- package/packages/visualizer/src/evidence/decision-table.tsx +68 -0
- package/packages/visualizer/src/evidence/document-page.tsx +40 -0
- package/packages/visualizer/src/evidence/evidence-context.tsx +159 -0
- package/packages/visualizer/src/evidence/evidence.module.css +877 -0
- package/packages/visualizer/src/evidence/feature-page.tsx +88 -0
- package/packages/visualizer/src/evidence/format.ts +56 -0
- package/packages/visualizer/src/evidence/gherkin.ts +98 -0
- package/packages/visualizer/src/evidence/marks.tsx +118 -0
- package/packages/visualizer/src/evidence/model-page.tsx +60 -0
- package/packages/visualizer/src/evidence/model-trace.tsx +57 -0
- package/packages/visualizer/src/evidence/overview.tsx +134 -0
- package/packages/visualizer/src/evidence/quint.ts +45 -0
- package/packages/visualizer/src/evidence/recording-page.tsx +69 -0
- package/packages/visualizer/src/evidence/recording.module.css +464 -0
- package/packages/visualizer/src/evidence/recording.tsx +197 -0
- package/packages/visualizer/src/evidence/snapshot.tsx +108 -0
- package/packages/visualizer/src/evidence/sources-panel.tsx +134 -0
- package/packages/visualizer/src/evidence/sources.module.css +168 -0
- package/packages/visualizer/src/evidence/spec-header.tsx +64 -0
- package/packages/visualizer/src/evidence/spec-index.tsx +82 -0
- package/packages/visualizer/src/evidence/spec-page.tsx +92 -0
- package/packages/visualizer/src/evidence/spec-snapshot.tsx +26 -0
- package/packages/visualizer/src/layout/graph.test.ts +113 -0
- package/packages/visualizer/src/layout/graph.ts +324 -0
- package/packages/visualizer/src/layout/layout.ts +237 -0
- package/packages/visualizer/src/layout/use-chart-layout.ts +18 -0
- package/packages/visualizer/src/main.tsx +31 -0
- package/packages/visualizer/src/map/ChartMap.tsx +252 -0
- package/packages/visualizer/src/map/EventEdge.tsx +138 -0
- package/packages/visualizer/src/map/map.module.css +546 -0
- package/packages/visualizer/src/map/nodes.tsx +145 -0
- package/packages/visualizer/src/map/path.ts +24 -0
- package/packages/visualizer/src/reachable.test.ts +54 -0
- package/packages/visualizer/src/spec-kind.test.ts +27 -0
- package/packages/visualizer/src/spec-kind.ts +56 -0
- package/packages/visualizer/src/state/ui-store.ts +44 -0
- package/packages/visualizer/src/styles/global.css +105 -0
- package/packages/visualizer/src/styles/tokens.css +80 -0
- package/packages/visualizer/src/views/ChartPage.tsx +52 -0
- package/packages/visualizer/src/views/ProductPage.tsx +35 -0
- package/packages/visualizer/src/views/SidePanel.tsx +339 -0
- package/packages/visualizer/src/views/views.module.css +546 -0
- package/packages/visualizer/vite/atlas-dev-plugin.ts +169 -0
- package/packages/visualizer/vite/atlas-files.test.ts +119 -0
- package/packages/visualizer/vite/atlas-files.ts +199 -0
- package/packages/visualizer/vite/publish.test.ts +52 -0
- package/packages/visualizer/vite/publish.ts +99 -0
- package/packages/visualizer/vite/reports-dev-plugin.ts +82 -0
- package/packages/visualizer/vite.config.ts +13 -0
- package/packages/vitest/README.md +58 -0
- package/packages/webdriver/README.md +77 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
import { afterAll, describe, expect, it } from 'bun:test';
|
|
6
|
+
|
|
7
|
+
import { DEFAULT_FIXTURE, FIXTURES_ROOT, isSpecFile, listSpecFiles, publicReportSources, resolveReportSources, resolveRoots, safeJoin, summarizeRun } from './atlas-files';
|
|
8
|
+
|
|
9
|
+
const tmp = mkdtempSync(path.join(os.tmpdir(), 'atlas-files-'));
|
|
10
|
+
afterAll(() => rmSync(tmp, { recursive: true, force: true }));
|
|
11
|
+
|
|
12
|
+
function touch(file: string, text = '') {
|
|
13
|
+
mkdirSync(path.dirname(path.join(tmp, file)), { recursive: true });
|
|
14
|
+
writeFileSync(path.join(tmp, file), text);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe('resolveRoots', () => {
|
|
18
|
+
const project = path.join(tmp, 'project');
|
|
19
|
+
mkdirSync(path.join(project, 'specs'), { recursive: true });
|
|
20
|
+
|
|
21
|
+
it.each<[string, NodeJS.ProcessEnv, string, string]>([
|
|
22
|
+
['relative roots against INIT_CWD', { INIT_CWD: project, ATLAS_SPECS_ROOT: 'charts', ATLAS_RUNS_ROOT: 'out/runs' }, 'charts', 'out/runs'],
|
|
23
|
+
['absolute roots as they are', { INIT_CWD: '/elsewhere', ATLAS_SPECS_ROOT: path.join(project, 'a'), ATLAS_RUNS_ROOT: path.join(project, 'b') }, 'a', 'b'],
|
|
24
|
+
['specs/ and atlas-runs/ where pnpm ran', { INIT_CWD: project }, 'specs', 'atlas-runs'],
|
|
25
|
+
['only the runs root', { INIT_CWD: project, ATLAS_RUNS_ROOT: 'r' }, 'specs', 'r']
|
|
26
|
+
])('resolves %s', (_label, env, specs, runs) => {
|
|
27
|
+
expect(resolveRoots(env, '/not/used')).toMatchObject({ specs: path.join(project, specs), runs: path.join(project, runs), label: 'configured' });
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('falls back to the current directory without INIT_CWD', () => {
|
|
31
|
+
expect(resolveRoots({ ATLAS_SPECS_ROOT: 'x' }, project).specs).toBe(path.join(project, 'x'));
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('shows the example when nothing is configured and there is no specs/ directory', () => {
|
|
35
|
+
const roots = resolveRoots({ INIT_CWD: path.join(tmp, 'empty') });
|
|
36
|
+
expect(roots.specs).toBe(path.join(FIXTURES_ROOT, DEFAULT_FIXTURE, 'specs'));
|
|
37
|
+
expect(roots.label).toMatch(/^example/);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('reads a named fixture and rejects an unknown one', () => {
|
|
41
|
+
expect(resolveRoots({ ATLAS_FIXTURE: 'spec-only' }).specs).toBe(path.join(FIXTURES_ROOT, 'spec-only', 'specs'));
|
|
42
|
+
expect(() => resolveRoots({ ATLAS_FIXTURE: 'nope' })).toThrow(/No fixture called "nope"/);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
describe('listSpecFiles', () => {
|
|
47
|
+
touch('specs/atlas.yaml');
|
|
48
|
+
touch('specs/README.md');
|
|
49
|
+
touch('specs/a/chart.scxml');
|
|
50
|
+
touch('specs/a/journeys.yaml');
|
|
51
|
+
touch('specs/a/chart.layout.json');
|
|
52
|
+
touch('specs/b/machine.yaml');
|
|
53
|
+
touch('specs/b/open-questions.md');
|
|
54
|
+
touch('specs/c/journeys.yaml');
|
|
55
|
+
touch('specs/node_modules/x/machine.yaml');
|
|
56
|
+
|
|
57
|
+
it('lists charts in both formats, and all specification documents even without a chart', () => {
|
|
58
|
+
expect(listSpecFiles(path.join(tmp, 'specs'))).toEqual([
|
|
59
|
+
'README.md',
|
|
60
|
+
'a/chart.layout.json',
|
|
61
|
+
'a/chart.scxml',
|
|
62
|
+
'a/journeys.yaml',
|
|
63
|
+
'atlas.yaml',
|
|
64
|
+
'b/machine.yaml',
|
|
65
|
+
'b/open-questions.md',
|
|
66
|
+
'c/journeys.yaml'
|
|
67
|
+
]);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it.each<[string, boolean]>([
|
|
71
|
+
['x.scxml', true],
|
|
72
|
+
['x.machine.json', true],
|
|
73
|
+
['machine.yml', true],
|
|
74
|
+
['journeys.yaml', true],
|
|
75
|
+
['x.yaml', true],
|
|
76
|
+
['notes.md', true],
|
|
77
|
+
['domain/behavior.feature', true],
|
|
78
|
+
['domain/model.qnt', true],
|
|
79
|
+
['domain/access.dmn', true],
|
|
80
|
+
['domain/schema.als', true]
|
|
81
|
+
])('%s is a spec file: %s', (file, expected) => {
|
|
82
|
+
expect(isSpecFile(file)).toBe(expected);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
describe('safeJoin', () => {
|
|
87
|
+
it.each<[string, boolean]>([
|
|
88
|
+
['a/b.json', true],
|
|
89
|
+
['../secret', false],
|
|
90
|
+
['%2e%2e/secret', false],
|
|
91
|
+
['%E0%A4%A', false]
|
|
92
|
+
])('%s stays inside the root: %s', (relative, inside) => {
|
|
93
|
+
expect(safeJoin('/root', relative) !== null).toBe(inside);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
describe('report sources and snapshots', () => {
|
|
98
|
+
it('resolves extra directories relative to the source configuration and preserves remote backends', () => {
|
|
99
|
+
touch('config/sources.json', JSON.stringify({ schemaVersion: 1, sources: [
|
|
100
|
+
{ id: 'web', label: 'Web runs', type: 'directory', runs: '../web-runs' },
|
|
101
|
+
{ id: 'ci', label: 'CI', type: 'api', baseUrl: 'https://ci.example.test/atlas/', eventsUrl: 'https://ci.example.test/events' }
|
|
102
|
+
] }));
|
|
103
|
+
const sources = resolveReportSources({ specs: '/specs', runs: '/runs', label: 'test' }, { ATLAS_SOURCES_FILE: path.join(tmp, 'config/sources.json') });
|
|
104
|
+
expect(sources[1]).toMatchObject({ runs: path.join(tmp, 'web-runs') });
|
|
105
|
+
expect(publicReportSources(sources)[1]).toMatchObject({ live: true, baseUrl: '/__atlas/sources/web/' });
|
|
106
|
+
expect(publicReportSources(sources)[2]).toMatchObject({ type: 'api', baseUrl: 'https://ci.example.test/atlas/' });
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('summarizes readable running snapshots with execution progress', () => {
|
|
110
|
+
touch('live/live-run/manifest.json', JSON.stringify({ run: { finishedAt: null, progress: { totalPaths: 3, completedPaths: 1, activePaths: ['path-2'], updatedAt: '2026-10-09T10:00:00Z' } } }));
|
|
111
|
+
expect(summarizeRun(path.join(tmp, 'live'), 'live-run')).toMatchObject({ progress: 'running', hasManifest: true, execution: { totalPaths: 3, completedPaths: 1, activePaths: ['path-2'] } });
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it.each(['null', '[]', '"invalid"'])('isolates a malformed manifest envelope: %s', (raw) => {
|
|
115
|
+
touch('bad/bad-run/manifest.json', raw);
|
|
116
|
+
expect(() => summarizeRun(path.join(tmp, 'bad'), 'bad-run')).not.toThrow();
|
|
117
|
+
expect(summarizeRun(path.join(tmp, 'bad'), 'bad-run')?.hasManifest).toBe(false);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
import { isStatechartFile, ReportSourcesSchema, RunInfoSchema, type Count, type RemoteReportSource, type ReportSource, type RunSummary, type SpecIndex } from '@crvouga/atlas/schema';
|
|
6
|
+
|
|
7
|
+
export const APP_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
8
|
+
export const FIXTURES_ROOT = path.join(APP_ROOT, 'fixtures');
|
|
9
|
+
|
|
10
|
+
/** The fixture shown when no specs directory is configured and none exists where pnpm ran. */
|
|
11
|
+
export const DEFAULT_FIXTURE = 'full';
|
|
12
|
+
export const DEFAULT_SPECS_DIR = 'specs';
|
|
13
|
+
export const DEFAULT_RUNS_DIR = 'atlas-runs';
|
|
14
|
+
|
|
15
|
+
export type AtlasRoots = { specs: string; runs: string; label: string };
|
|
16
|
+
|
|
17
|
+
export function resolveReportSources(roots: AtlasRoots, env: NodeJS.ProcessEnv = process.env): ReportSource[] {
|
|
18
|
+
const workspace: ReportSource = { id: 'workspace', label: 'Workspace runs', type: 'directory', runs: roots.runs };
|
|
19
|
+
if (!env.ATLAS_SOURCES_FILE) return [workspace];
|
|
20
|
+
const file = path.resolve(env.INIT_CWD || process.cwd(), env.ATLAS_SOURCES_FILE);
|
|
21
|
+
const parsed = ReportSourcesSchema.parse(JSON.parse(readFileSync(file, 'utf8')));
|
|
22
|
+
if (parsed.sources.some((source) => source.id === workspace.id)) throw new Error('The source id "workspace" is reserved for --runs.');
|
|
23
|
+
return [workspace, ...parsed.sources.map((source) => source.type === 'directory' ? { ...source, runs: path.resolve(path.dirname(file), source.runs) } : source)];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function publicReportSources(sources: ReportSource[], base = '/__atlas/'): RemoteReportSource[] {
|
|
27
|
+
return sources.map((source) => source.type === 'directory'
|
|
28
|
+
? { id: source.id, label: source.label, type: 'http', live: true, baseUrl: source.id === 'workspace' ? base : `${base}sources/${source.id}/` }
|
|
29
|
+
: source);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** A chart in either open format: W3C SCXML or XState machine config. */
|
|
33
|
+
export function isChartFile(file: string) {
|
|
34
|
+
return /\.scxml$/i.test(file) || /(^|\/)([\w.-]+\.)?machine\.(ya?ml|json)$/.test(file);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Every file the visualizer reads from a specs directory: charts, journeys, notes, layouts. */
|
|
38
|
+
export function isSpecFile(file: string) {
|
|
39
|
+
return isChartFile(file) || isStatechartFile(file) || /\.(feature|qnt|dmn|als|md|ya?ml|json|xml|csv|txt)$/i.test(file);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function fixtureRoots(name: string): AtlasRoots {
|
|
43
|
+
const dir = path.join(FIXTURES_ROOT, name);
|
|
44
|
+
if (!existsSync(dir)) {
|
|
45
|
+
const known = existsSync(FIXTURES_ROOT) ? readdirSync(FIXTURES_ROOT).filter((n) => !n.startsWith('.')).join(', ') : 'none';
|
|
46
|
+
throw new Error(`No fixture called "${name}". Fixtures: ${known}`);
|
|
47
|
+
}
|
|
48
|
+
return { specs: path.join(dir, 'specs'), runs: path.join(dir, 'runs'), label: `fixture: ${name}` };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Where the dev server and the publish script read from, in order: a named fixture
|
|
53
|
+
* (`ATLAS_FIXTURE`), explicit roots (`ATLAS_SPECS_ROOT`, `ATLAS_RUNS_ROOT`), then `specs/` and
|
|
54
|
+
* `atlas-runs/` where the command was run. Relative paths resolve against `INIT_CWD` (where pnpm
|
|
55
|
+
* was run) or the current directory. With nothing configured and no `specs/` there, the bundled
|
|
56
|
+
* example fixture is shown.
|
|
57
|
+
*/
|
|
58
|
+
export function resolveRoots(env: NodeJS.ProcessEnv = process.env, cwd = process.cwd()): AtlasRoots {
|
|
59
|
+
if (env.ATLAS_FIXTURE) return fixtureRoots(env.ATLAS_FIXTURE);
|
|
60
|
+
const base = env.INIT_CWD || cwd;
|
|
61
|
+
const specsSet = Boolean(env.ATLAS_SPECS_ROOT);
|
|
62
|
+
const specs = path.resolve(base, env.ATLAS_SPECS_ROOT || DEFAULT_SPECS_DIR);
|
|
63
|
+
const runs = path.resolve(base, env.ATLAS_RUNS_ROOT || DEFAULT_RUNS_DIR);
|
|
64
|
+
if (!specsSet && !env.ATLAS_RUNS_ROOT && !existsSync(specs)) {
|
|
65
|
+
return { ...fixtureRoots(DEFAULT_FIXTURE), label: `example (no ${DEFAULT_SPECS_DIR}/ in ${base}; set ATLAS_SPECS_ROOT)` };
|
|
66
|
+
}
|
|
67
|
+
return { specs, runs, label: 'configured' };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const SKIP_DIRS = new Set(['node_modules', '.git', 'dist', '.cache']);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Spec documents under the specs root, relative and with forward slashes.
|
|
74
|
+
* Documents remain discoverable even when no statechart exists beside them.
|
|
75
|
+
*/
|
|
76
|
+
export function listSpecFiles(specsRoot: string): string[] {
|
|
77
|
+
if (!existsSync(specsRoot)) return [];
|
|
78
|
+
const out: string[] = [];
|
|
79
|
+
const walk = (dir: string) => {
|
|
80
|
+
let entries: string[];
|
|
81
|
+
try {
|
|
82
|
+
entries = readdirSync(dir);
|
|
83
|
+
} catch {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const files = entries.filter((name) => isSpecFile(name) && statSafe(path.join(dir, name))?.isFile());
|
|
87
|
+
const rel = path.relative(specsRoot, dir).split(path.sep).join('/');
|
|
88
|
+
for (const name of files) {
|
|
89
|
+
const file = rel ? `${rel}/${name}` : name;
|
|
90
|
+
out.push(file);
|
|
91
|
+
}
|
|
92
|
+
for (const name of entries) {
|
|
93
|
+
if (name.startsWith('.') || SKIP_DIRS.has(name)) continue;
|
|
94
|
+
if (statSafe(path.join(dir, name))?.isDirectory()) walk(path.join(dir, name));
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
walk(specsRoot);
|
|
98
|
+
return out.sort();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function statSafe(file: string) {
|
|
102
|
+
try {
|
|
103
|
+
return statSync(file);
|
|
104
|
+
} catch {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function specIndex(specsRoot: string, ref: string | null = null): SpecIndex {
|
|
110
|
+
return { schemaVersion: 1, generatedAt: new Date().toISOString(), ref, files: listSpecFiles(specsRoot) };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** A manifest that doesn't parse yet is taken as still being written for this long. */
|
|
114
|
+
const STILL_WRITING_MS = 60_000;
|
|
115
|
+
|
|
116
|
+
function startedAtFromId(id: string, fallback: Date) {
|
|
117
|
+
const m = id.match(/^(\d{4}-\d{2}-\d{2})T(\d{2})-(\d{2})-(\d{2})-(\d{3})Z/);
|
|
118
|
+
return m ? `${m[1]}T${m[2]}:${m[3]}:${m[4]}.${m[5]}Z` : fallback.toISOString();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function asCount(value: unknown): Count | undefined {
|
|
122
|
+
if (!value || typeof value !== 'object') return undefined;
|
|
123
|
+
const v = value as Record<string, unknown>;
|
|
124
|
+
const n = (k: string) => (typeof v[k] === 'number' ? (v[k] as number) : 0);
|
|
125
|
+
return { total: n('total'), passed: n('passed'), failed: n('failed'), flaky: n('flaky'), notReached: n('notReached') };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function object(value: unknown) {
|
|
129
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value) ? value as Record<string, unknown> : {};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** A run directory's summary: complete once its manifest is readable, running before that. */
|
|
133
|
+
export function summarizeRun(runsRoot: string, id: string): RunSummary | null {
|
|
134
|
+
const dir = path.join(runsRoot, id);
|
|
135
|
+
const stat = statSafe(dir);
|
|
136
|
+
if (!stat?.isDirectory()) return null;
|
|
137
|
+
const manifestFile = path.join(dir, 'manifest.json');
|
|
138
|
+
const running: RunSummary = { id, startedAt: startedAtFromId(id, stat.birthtime), mode: id.endsWith('showcase') ? 'showcase' : 'fast', progress: 'running', hasManifest: false };
|
|
139
|
+
if (!existsSync(manifestFile)) return running;
|
|
140
|
+
let manifest: Record<string, unknown>;
|
|
141
|
+
try {
|
|
142
|
+
const raw: unknown = JSON.parse(readFileSync(manifestFile, 'utf8'));
|
|
143
|
+
if (raw === null || typeof raw !== 'object' || Array.isArray(raw)) return { ...running, progress: 'complete' };
|
|
144
|
+
manifest = object(raw);
|
|
145
|
+
} catch {
|
|
146
|
+
const ageMs = Date.now() - (statSafe(manifestFile)?.mtimeMs ?? 0);
|
|
147
|
+
return ageMs < STILL_WRITING_MS ? running : { ...running, progress: 'complete' };
|
|
148
|
+
}
|
|
149
|
+
const run = object(manifest.run);
|
|
150
|
+
const coverage = object(object(manifest.coverage).overall);
|
|
151
|
+
const paths = Array.isArray(manifest.journeys)
|
|
152
|
+
? manifest.journeys.map(object)
|
|
153
|
+
: Array.isArray(manifest.paths)
|
|
154
|
+
? manifest.paths.map(object).filter((p) => p.kind === 'journey')
|
|
155
|
+
: [];
|
|
156
|
+
const journeys: Count = { total: paths.length, passed: 0, failed: 0, flaky: 0, notReached: 0 };
|
|
157
|
+
for (const p of paths) {
|
|
158
|
+
if (p.status === 'passed') journeys.passed++;
|
|
159
|
+
else if (p.status === 'failed') journeys.failed++;
|
|
160
|
+
else if (p.status === 'flaky') journeys.flaky++;
|
|
161
|
+
else journeys.notReached++;
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
id,
|
|
165
|
+
startedAt: typeof run.startedAt === 'string' ? run.startedAt : running.startedAt,
|
|
166
|
+
mode: typeof run.mode === 'string' ? run.mode : running.mode,
|
|
167
|
+
commit: typeof run.commit === 'string' ? run.commit : null,
|
|
168
|
+
branch: typeof run.branch === 'string' ? run.branch : null,
|
|
169
|
+
durationMs: typeof run.durationMs === 'number' ? run.durationMs : undefined,
|
|
170
|
+
specVersion: typeof run.specVersion === 'string' ? run.specVersion : undefined,
|
|
171
|
+
progress: typeof run.finishedAt === 'string' || run.finishedAt === undefined ? 'complete' : 'running',
|
|
172
|
+
execution: RunInfoSchema.shape.progress.safeParse(run.progress).data,
|
|
173
|
+
hasManifest: true,
|
|
174
|
+
coverage: Object.keys(coverage).length ? { states: asCount(coverage.states), transitions: asCount(coverage.transitions) } : undefined,
|
|
175
|
+
journeys
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function runsIndex(runsRoot: string, keep = Number.POSITIVE_INFINITY) {
|
|
180
|
+
const ids = existsSync(runsRoot) ? readdirSync(runsRoot).filter((name) => !name.startsWith('.')) : [];
|
|
181
|
+
const runs = ids
|
|
182
|
+
.map((id) => summarizeRun(runsRoot, id))
|
|
183
|
+
.filter((r): r is RunSummary => r !== null)
|
|
184
|
+
.sort((a, b) => Date.parse(b.startedAt) - Date.parse(a.startedAt))
|
|
185
|
+
.slice(0, keep);
|
|
186
|
+
return { generatedAt: new Date().toISOString(), runs };
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** `root/relative`, or null when the relative path tries to leave the root. */
|
|
190
|
+
export function safeJoin(root: string, relative: string) {
|
|
191
|
+
let decoded: string;
|
|
192
|
+
try {
|
|
193
|
+
decoded = decodeURIComponent(relative).replace(/^\/+/, '');
|
|
194
|
+
} catch {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
const full = path.resolve(root, decoded);
|
|
198
|
+
return full === root || full.startsWith(`${root}${path.sep}`) ? full : null;
|
|
199
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { afterAll, describe, expect, it } from 'bun:test';
|
|
5
|
+
|
|
6
|
+
import { publishData } from './publish';
|
|
7
|
+
|
|
8
|
+
const tmp = mkdtempSync(path.join(os.tmpdir(), 'atlas-publish-'));
|
|
9
|
+
afterAll(() => rmSync(tmp, { recursive: true, force: true }));
|
|
10
|
+
|
|
11
|
+
function report(root: string, id: string, passed: boolean, finishedAt: string | null = null) {
|
|
12
|
+
mkdirSync(path.join(root, id, 'media'), { recursive: true });
|
|
13
|
+
writeFileSync(
|
|
14
|
+
path.join(root, id, 'manifest.json'),
|
|
15
|
+
JSON.stringify({ schemaVersion: 1, run: { id, startedAt: '2026-10-09T10:00:00Z', finishedAt }, privacy: { passed, findings: [] } })
|
|
16
|
+
);
|
|
17
|
+
writeFileSync(path.join(root, id, 'media', 'screen.png'), 'synthetic');
|
|
18
|
+
mkdirSync(path.join(root, id, '.work'), { recursive: true });
|
|
19
|
+
writeFileSync(path.join(root, id, '.work', 'private'), 'scratch');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
describe('publishing multiple sources', () => {
|
|
23
|
+
it('publishes privacy-checked running snapshots and extra directories with relative backend locations', () => {
|
|
24
|
+
const roots = { specs: path.join(tmp, 'specs'), runs: path.join(tmp, 'runs'), label: 'test' };
|
|
25
|
+
mkdirSync(roots.specs, { recursive: true });
|
|
26
|
+
writeFileSync(path.join(roots.specs, 'machine.json'), '{}');
|
|
27
|
+
const extra = path.join(tmp, 'extra');
|
|
28
|
+
report(roots.runs, 'live', true);
|
|
29
|
+
report(roots.runs, 'unsafe', false, '2026-10-09T10:01:00Z');
|
|
30
|
+
report(extra, 'same', true, '2026-10-09T10:01:00Z');
|
|
31
|
+
const out = path.join(tmp, 'data');
|
|
32
|
+
const result = publishData({
|
|
33
|
+
roots,
|
|
34
|
+
out,
|
|
35
|
+
sources: [
|
|
36
|
+
{ id: 'workspace', label: 'Workspace', type: 'directory', runs: roots.runs },
|
|
37
|
+
{ id: 'mobile', label: 'Mobile', type: 'directory', runs: extra },
|
|
38
|
+
{ id: 'ci', label: 'CI', type: 'api', baseUrl: 'https://ci.example.test/reports/' }
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
expect(result.published).toEqual(['live', 'mobile/same']);
|
|
42
|
+
expect(result.skipped).toEqual(['unsafe']);
|
|
43
|
+
expect(JSON.parse(readFileSync(path.join(out, 'runs/index.json'), 'utf8')).runs[0]).toMatchObject({ id: 'live', progress: 'running' });
|
|
44
|
+
expect(existsSync(path.join(out, 'runs/live/.work'))).toBe(false);
|
|
45
|
+
expect(existsSync(path.join(out, 'runs/unsafe'))).toBe(false);
|
|
46
|
+
expect(existsSync(path.join(out, 'backends/mobile/runs/same/media/screen.png'))).toBe(true);
|
|
47
|
+
const sources = JSON.parse(readFileSync(path.join(out, 'sources.json'), 'utf8')).sources;
|
|
48
|
+
expect(sources[0]).toMatchObject({ baseUrl: './' });
|
|
49
|
+
expect(sources[1]).toMatchObject({ baseUrl: './backends/mobile/' });
|
|
50
|
+
expect(sources[2]).toMatchObject({ type: 'api', baseUrl: 'https://ci.example.test/reports/' });
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
import { cpSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
import type { ReportSource, RunSummary } from '@crvouga/atlas/schema';
|
|
6
|
+
|
|
7
|
+
import { listSpecFiles, resolveReportSources, runsIndex, summarizeRun, type AtlasRoots } from './atlas-files';
|
|
8
|
+
|
|
9
|
+
export type PublishOptions = {
|
|
10
|
+
roots: AtlasRoots;
|
|
11
|
+
/** The directory the static site reads as its data base URL (`./data/` by default). */
|
|
12
|
+
out: string;
|
|
13
|
+
/** How many of the newest complete runs to publish. */
|
|
14
|
+
keep?: number;
|
|
15
|
+
/** The branch or commit the specs came from; the git HEAD of the specs directory when omitted. */
|
|
16
|
+
ref?: string | null;
|
|
17
|
+
sources?: ReportSource[];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type PublishResult = { files: string[]; published: string[]; skipped: string[] };
|
|
21
|
+
|
|
22
|
+
function gitRef(cwd: string) {
|
|
23
|
+
try {
|
|
24
|
+
return execSync('git rev-parse HEAD', { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();
|
|
25
|
+
} catch {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function safeManifest(manifestFile: string) {
|
|
31
|
+
try {
|
|
32
|
+
const text = readFileSync(manifestFile, 'utf8');
|
|
33
|
+
const manifest = JSON.parse(text) as { privacy?: { passed?: unknown } };
|
|
34
|
+
return manifest?.privacy?.passed === true ? text : null;
|
|
35
|
+
} catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function publishRuns(root: string, out: string, keep: number) {
|
|
41
|
+
rmSync(out, { recursive: true, force: true });
|
|
42
|
+
mkdirSync(out, { recursive: true });
|
|
43
|
+
const published: RunSummary[] = [];
|
|
44
|
+
const skipped: string[] = [];
|
|
45
|
+
for (const run of runsIndex(root).runs) {
|
|
46
|
+
if (published.length >= keep) break;
|
|
47
|
+
const manifest = safeManifest(path.join(root, run.id, 'manifest.json'));
|
|
48
|
+
if (!manifest) {
|
|
49
|
+
skipped.push(run.id);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const target = path.join(out, run.id);
|
|
53
|
+
cpSync(path.join(root, run.id), target, {
|
|
54
|
+
recursive: true,
|
|
55
|
+
filter: (file) => !path.relative(path.join(root, run.id), file).split(path.sep).some((part) => part.startsWith('.'))
|
|
56
|
+
});
|
|
57
|
+
writeFileSync(path.join(target, 'manifest.json'), manifest);
|
|
58
|
+
published.push(summarizeRun(out, run.id) ?? run);
|
|
59
|
+
}
|
|
60
|
+
writeFileSync(path.join(out, 'index.json'), `${JSON.stringify({ generatedAt: new Date().toISOString(), runs: published }, null, 2)}\n`);
|
|
61
|
+
return { published: published.map((run) => run.id), skipped };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Lays out the spec and the newest runs for a static host, in the layout the static adapter
|
|
66
|
+
* reads: `specs/index.json`, `specs/<path>`, `runs/index.json`, `runs/<id>/...`. Only `specs/`
|
|
67
|
+
* and `runs/` under `out` are replaced. A run whose privacy check failed or is missing is never
|
|
68
|
+
* published.
|
|
69
|
+
*/
|
|
70
|
+
export function publishData({ roots, out, keep = 30, ref, sources = resolveReportSources(roots) }: PublishOptions): PublishResult {
|
|
71
|
+
const specsOut = path.join(out, 'specs');
|
|
72
|
+
const runsOut = path.join(out, 'runs');
|
|
73
|
+
rmSync(specsOut, { recursive: true, force: true });
|
|
74
|
+
rmSync(runsOut, { recursive: true, force: true });
|
|
75
|
+
mkdirSync(specsOut, { recursive: true });
|
|
76
|
+
mkdirSync(runsOut, { recursive: true });
|
|
77
|
+
|
|
78
|
+
const files = listSpecFiles(roots.specs);
|
|
79
|
+
for (const file of files) {
|
|
80
|
+
const target = path.join(specsOut, file);
|
|
81
|
+
mkdirSync(path.dirname(target), { recursive: true });
|
|
82
|
+
cpSync(path.join(roots.specs, file), target);
|
|
83
|
+
}
|
|
84
|
+
const index = { schemaVersion: 1, generatedAt: new Date().toISOString(), ref: ref === undefined ? gitRef(roots.specs) : ref, files };
|
|
85
|
+
writeFileSync(path.join(specsOut, 'index.json'), `${JSON.stringify(index, null, 2)}\n`);
|
|
86
|
+
|
|
87
|
+
const result = publishRuns(roots.runs, runsOut, keep);
|
|
88
|
+
const descriptors = sources.map((source) => {
|
|
89
|
+
if (source.type !== 'directory') return { ...source, live: false };
|
|
90
|
+
if (source.id !== 'workspace') {
|
|
91
|
+
const published = publishRuns(source.runs, path.join(out, 'backends', source.id, 'runs'), keep);
|
|
92
|
+
result.published.push(...published.published.map((id) => `${source.id}/${id}`));
|
|
93
|
+
result.skipped.push(...published.skipped.map((id) => `${source.id}/${id}`));
|
|
94
|
+
}
|
|
95
|
+
return { id: source.id, label: source.label, type: 'http', baseUrl: source.id === 'workspace' ? './' : `./backends/${source.id}/` };
|
|
96
|
+
});
|
|
97
|
+
writeFileSync(path.join(out, 'sources.json'), `${JSON.stringify({ schemaVersion: 1, sources: descriptors }, null, 2)}\n`);
|
|
98
|
+
return { files, ...result };
|
|
99
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// @io-wall-ok — Vite dev server mounts the reports API on the page origin
|
|
2
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
|
+
import type { Plugin, ViteDevServer } from 'vite';
|
|
4
|
+
|
|
5
|
+
export function isReportsApiPath(url: string | undefined): boolean {
|
|
6
|
+
const path = (url ?? '').split('?')[0] ?? '';
|
|
7
|
+
return path === '/api/reports' || path.startsWith('/api/reports/');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function reportsDevPlugin(args: {
|
|
11
|
+
readonly repoRoot: string;
|
|
12
|
+
readonly appModule: string;
|
|
13
|
+
}): Plugin {
|
|
14
|
+
return {
|
|
15
|
+
name: 'atlas-reports-dev',
|
|
16
|
+
apply: 'serve',
|
|
17
|
+
configureServer(server) {
|
|
18
|
+
server.middlewares.use((req, res, next) => {
|
|
19
|
+
if (!isReportsApiPath(req.url)) {
|
|
20
|
+
next();
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
void writeReports(req, res, server, args).catch((err: unknown) => {
|
|
24
|
+
if (res.headersSent || res.writableEnded) return;
|
|
25
|
+
res.statusCode = 500;
|
|
26
|
+
res.end(err instanceof Error ? err.message : 'reports failed');
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async function writeReports(
|
|
34
|
+
req: IncomingMessage,
|
|
35
|
+
res: ServerResponse,
|
|
36
|
+
server: ViteDevServer,
|
|
37
|
+
args: { readonly repoRoot: string; readonly appModule: string }
|
|
38
|
+
): Promise<void> {
|
|
39
|
+
const host = req.headers.host ?? 'localhost';
|
|
40
|
+
const app = (await server.ssrLoadModule(args.appModule)) as {
|
|
41
|
+
reportsDevFetch: (request: Request, repoRoot: string) => Promise<Response>;
|
|
42
|
+
};
|
|
43
|
+
const response = await app.reportsDevFetch(
|
|
44
|
+
new Request(`http://${host}${req.url ?? '/api/reports'}`, {
|
|
45
|
+
method: req.method ?? 'GET',
|
|
46
|
+
headers: requestHeaders(req),
|
|
47
|
+
}),
|
|
48
|
+
args.repoRoot
|
|
49
|
+
);
|
|
50
|
+
res.statusCode = response.status;
|
|
51
|
+
response.headers.forEach((value, key) => {
|
|
52
|
+
if (key === 'transfer-encoding' || key === 'content-length') return;
|
|
53
|
+
res.setHeader(key, value);
|
|
54
|
+
});
|
|
55
|
+
if (response.body === null) {
|
|
56
|
+
res.end();
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const reader = response.body.getReader();
|
|
60
|
+
req.on('close', () => {
|
|
61
|
+
void reader.cancel();
|
|
62
|
+
});
|
|
63
|
+
for (;;) {
|
|
64
|
+
const { done, value } = await reader.read();
|
|
65
|
+
if (done) break;
|
|
66
|
+
if (value !== undefined && !res.write(value)) {
|
|
67
|
+
await new Promise<void>((resolveDrain) => {
|
|
68
|
+
res.once('drain', () => resolveDrain());
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
res.end();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function requestHeaders(req: IncomingMessage): Headers {
|
|
76
|
+
const headers = new Headers();
|
|
77
|
+
for (const [key, value] of Object.entries(req.headers)) {
|
|
78
|
+
if (typeof value === 'string') headers.set(key, value);
|
|
79
|
+
else if (Array.isArray(value)) headers.set(key, value.join(', '));
|
|
80
|
+
}
|
|
81
|
+
return headers;
|
|
82
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import react from '@vitejs/plugin-react';
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
|
|
4
|
+
import { reportsDevPlugin } from './vite/reports-dev-plugin';
|
|
5
|
+
import { atlasDevPlugin } from './vite/atlas-dev-plugin';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
base: './',
|
|
9
|
+
plugins: [react(), atlasDevPlugin(), ...(process.env.ATLAS_REPORTS_MODULE ? [reportsDevPlugin({ repoRoot: process.env.INIT_CWD || process.cwd(), appModule: process.env.ATLAS_REPORTS_MODULE })] : [])],
|
|
10
|
+
worker: { format: 'es' },
|
|
11
|
+
server: { port: Number(process.env.PORT ?? 5180), strictPort: false },
|
|
12
|
+
build: { outDir: 'dist', emptyOutDir: true, chunkSizeWarningLimit: 2_500 }
|
|
13
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @crvouga/atlas/vitest
|
|
2
|
+
|
|
3
|
+
Run an [Atlas](../../README.md) config as a test suite in Vitest, `bun test` or any Jest-style
|
|
4
|
+
runner: one test that the charts are executable, then one test per planned path. The runner's own
|
|
5
|
+
`describe`, `it`, `beforeAll` and `expect` are passed in, so with Bun import them from `bun:test`
|
|
6
|
+
instead of `vitest` and install nothing else.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
bun add -d @crvouga/atlas vitest
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Use
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
// door.test.ts
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
import { defineConfig } from '@crvouga/atlas';
|
|
19
|
+
import { describeAtlas, functionDriver } from '@crvouga/atlas/vitest';
|
|
20
|
+
import { beforeAll, describe, expect, it } from 'vitest';
|
|
21
|
+
|
|
22
|
+
import { Door } from './door';
|
|
23
|
+
|
|
24
|
+
const config = defineConfig<Door>({
|
|
25
|
+
specs: fileURLToPath(new URL('./specs', import.meta.url)),
|
|
26
|
+
driver: functionDriver(() => new Door()),
|
|
27
|
+
implementation: {
|
|
28
|
+
setup: async () => undefined,
|
|
29
|
+
events: {
|
|
30
|
+
Opens: { kind: 'user', how: 'door.open()', run: async (door) => door.open() },
|
|
31
|
+
Closes: { kind: 'user', how: 'door.close()', run: async (door) => door.close() }
|
|
32
|
+
},
|
|
33
|
+
states: {
|
|
34
|
+
Closed: { recognize: async (door) => ({ matched: !door.isOpen, signals: [] }) },
|
|
35
|
+
Open: { recognize: async (door) => ({ matched: door.isOpen, signals: [] }) }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
describeAtlas(config, { describe, it, beforeAll, expect });
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The whole plan runs once in `beforeAll` (so all paths share one manifest), and each test reports its
|
|
44
|
+
own path: a failed path fails its test with the runner's message; a path that could not be reached
|
|
45
|
+
because of a blocked event passes quietly and shows up in the manifest as `not-reached`.
|
|
46
|
+
|
|
47
|
+
`describeAtlas(config, suite, options)` accepts the `atlas run` options (`mode`, `paths`, `retry`,
|
|
48
|
+
`output`, `log`) plus `baseDirectory` (where relative config paths resolve) and `timeoutMs` for the
|
|
49
|
+
`beforeAll` (30 minutes by default).
|
|
50
|
+
|
|
51
|
+
`functionDriver(create)` is re-exported from `@crvouga/atlas`: it drives anything you can reach from
|
|
52
|
+
Node (a domain model, an API client, a CLI), with a fresh context from `create` for every path
|
|
53
|
+
attempt. Running the same spec through a browser driver and through `functionDriver` is a cheap way
|
|
54
|
+
to keep a model and its UI in agreement.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|