From a86767cdc62b895ac9ebb131c1db86fbdea7206c Mon Sep 17 00:00:00 2001 From: LucaP Date: Wed, 2 Sep 2026 05:36:59 +0300 Subject: [PATCH] test: lock journey lifecycle and static fallback --- scripts/verify-artifacts.mjs | 2 + src/components/SceneCanvas.vue | 3 +- src/composables/useMotionPreferences.ts | 9 +- src/composables/useSceneController.ts | 2 +- tests/browser/README.md | 35 +++++ tests/browser/bfcache-lifecycle.spec.ts | 57 ++++++++ tests/browser/journey-integration.spec.ts | 101 ++++++++++++++ tests/browser/reduced-motion.spec.ts | 40 ++++++ tests/browser/static-fallback.spec.ts | 68 +++++++++ tests/helpers/scene-instrumentation.ts | 160 ++++++++++++++++++++++ tests/unit/motion-policy.test.ts | 6 +- 11 files changed, 478 insertions(+), 5 deletions(-) create mode 100644 tests/browser/README.md create mode 100644 tests/browser/bfcache-lifecycle.spec.ts create mode 100644 tests/browser/journey-integration.spec.ts create mode 100644 tests/browser/reduced-motion.spec.ts create mode 100644 tests/browser/static-fallback.spec.ts create mode 100644 tests/helpers/scene-instrumentation.ts diff --git a/scripts/verify-artifacts.mjs b/scripts/verify-artifacts.mjs index 535801c..5c84a21 100644 --- a/scripts/verify-artifacts.mjs +++ b/scripts/verify-artifacts.mjs @@ -15,6 +15,8 @@ const canonicalSectionIds = [ ]; const prohibitedSurfaces = [ /__PORTFOLIO_INPUTS__/iu, + /__PORTFOLIO_(?:TEST|INSTRUMENTATION)__/iu, + /__portfolio(?:Journey)?Instrumentation/iu, /(?:evidenceId|sourcePath|sourceFingerprint|approvalOwner|privacyClassification|denylist|originalFilename)/iu, /sourceMappingURL/iu, ]; diff --git a/src/components/SceneCanvas.vue b/src/components/SceneCanvas.vue index 83bc681..db5133f 100644 --- a/src/components/SceneCanvas.vue +++ b/src/components/SceneCanvas.vue @@ -21,6 +21,7 @@ const journey = toRef(props, 'journey'); const policy = toRef(props, 'policy'); const quality = toRef(props, 'quality'); const scene = useSceneController({ canvas, journey, policy, quality }); +const sceneState = computed(() => scene.state.value); const showCanvas = computed(() => ( clientReady.value && policy.value.allowSceneRequest @@ -34,7 +35,7 @@ onMounted(() => { clientReady.value = true; });