Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions packages/browser/test/integration/specs/Visitor/visitor.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
Copyright 2026 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

// Skipped: requires Visitor.js page injection and VisitorAPI MSW — not available in this harness.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.


import { test, describe } from "../../helpers/testsSetup/extend.js";

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 () => {},
);
Comment on lines +16 to +47

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

});
Loading