Added documented stubs for Visitor ID migration functional tests#1552
Added documented stubs for Visitor ID migration functional tests#1552carterworks wants to merge 5 commits into
Conversation
|
|
| Filename | Overview |
|---|---|
| packages/browser/test/integration/specs/Visitor/visitor.spec.js | New file registering four fully-skipped Visitor ID migration test stubs; tests require Visitor.js injection and OptIn mock not yet available in the Vitest+MSW harness. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Visitor ID Migration Tests<br/>C35448, C35450, C36908, C36909] -->|needs| B{Required Infrastructure}
B -->|missing| C[Visitor.js Page Injection]
B -->|missing| D[VisitorAPI MSW Handler]
B -->|missing| E[OptIn Mock]
C & D & E --> F[test.skip stubs registered no execution]
F --> G[Integration Test Suite visitor.spec.js]
Reviews (1): Last reviewed commit: "test(integration): migrate visitor funct..." | Re-trigger Greptile
|
|
||
| describe("Visitor ID migration", () => { | ||
| test.skip( | ||
| "C35448 - ID migration enabled: Alloy waits for Visitor to get ECID and uses that value " + | ||
| "(skipped: requires Visitor.js injection infrastructure and VisitorAPI MSW handler)", | ||
| // eslint-disable-next-line no-empty-function | ||
| async () => {}, | ||
| ); | ||
|
|
||
| test.skip( | ||
| "C35450 - ID migration + consent pending: when consent is given to both, " + | ||
| "Alloy waits for Visitor ECID " + | ||
| "(skipped: requires Visitor.js injection infrastructure and OptIn mock)", | ||
| // eslint-disable-next-line no-empty-function | ||
| async () => {}, | ||
| ); | ||
|
|
||
| test.skip( | ||
| "C36908 - ID migration + consent pending: Visitor denied, Alloy approved — " + | ||
| "Alloy ECID matches Visitor ECID " + | ||
| "(skipped: requires Visitor.js injection infrastructure and OptIn mock)", | ||
| // eslint-disable-next-line no-empty-function | ||
| async () => {}, | ||
| ); | ||
|
|
||
| test.skip( | ||
| "C36909 - ID migration disabled + consent pending: Visitor denied, Alloy approved — " + | ||
| "Alloy goes ahead with its own ECID " + | ||
| "(skipped: requires Visitor.js injection infrastructure and OptIn mock)", | ||
| // eslint-disable-next-line no-empty-function | ||
| async () => {}, | ||
| ); |
There was a problem hiding this comment.
test.todo more idiomatic for unwritten stubs than test.skip with empty bodies
Vitest's test.todo is purpose-built for "planned but not yet written" tests — it takes only a title string and signals to Vitest (and readers) that no implementation exists yet. test.skip with async () => {} bodies implies an implementation that has been temporarily disabled, which is semantically misleading. Using test.todo would also remove the need for the four // eslint-disable-next-line no-empty-function suppressions.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| // Skipped: requires Visitor.js page injection and VisitorAPI MSW — not available in this harness. |
There was a problem hiding this comment.
No tracking reference for unblocking these tests
The comment documents why the tests are skipped but gives no pointer to a ticket, issue, or follow-up PR that will provide Visitor.js injection infrastructure and the OptIn mock. Without a reference, these stubs risk becoming permanently skipped — especially notable given that C35448 was tagged SEVERITY: "P0" in the original functional suite. Consider linking a tracking issue so the infrastructure gap stays visible.
e439ac3 to
bd0c3d7
Compare
20efce8 to
2219b1e
Compare
There was a problem hiding this comment.
carterworks has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
bd0c3d7 to
f97659c
Compare
2219b1e to
6d95acb
Compare
There was a problem hiding this comment.
carterworks has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
carterworks has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
b36c72a to
003c8db
Compare
003c8db to
e4a5ce2
Compare
e4a5ce2 to
bece161
Compare
|
Stub PR review — Visitor ID migration ( All four cases are confirmed Stub traceability
Checks🟢 All stubs genuine — each 🟢 Skip rationale documented — file-level comment at 🟢 C-number traceability — all four C-numbers from 🟢 Harness wiring — import 🟢 License header — present, year 2026 matches surrounding new files. 🟢 Functional files not deleted — correct for a stub PR. 🟡 Inherited bug in source material (informational, not a PR defect): N/A for stub PRs: mock fidelity, timing, network handler coverage, parity with functional assertions — none applicable until implementation. Looks good to merge as-is. The stub-then-implement pattern is being followed correctly here. |
0e20d53 to
2f1a8ed
Compare
087c0dd to
a128ad9
Compare
Changed Packages
Description
All 4 visitor tests preserved as test.skip — require Visitor.js injection infrastructure and OptIn mock not available in the current harness.
Related Issue
Part of the functional test → integration test migration. See
packages/browser/test/FUNCTIONAL_MIGRATION_PLAN.md.Motivation and Context
The existing TestCafe functional test suite is being migrated to Vitest+Playwright+MSW to enable faster, more reliable CI testing without a running server. This PR is part of a stacked series — each PR migrates one test file.
Functional tests replaced:
packages/browser/test/functional/specs/Visitor/C35448.jspackages/browser/test/functional/specs/Visitor/C35450.jspackages/browser/test/functional/specs/Visitor/C36908.jspackages/browser/test/functional/specs/Visitor/C36909.jsTypes of changes
Checklist:
Stack