Skip to content

Added documented stubs for At.js migration functional tests#1551

Draft
carterworks wants to merge 2 commits into
migrate-integration/00-infrafrom
migrate-integration/19-migration
Draft

Added documented stubs for At.js migration functional tests#1551
carterworks wants to merge 2 commits into
migrate-integration/00-infrafrom
migrate-integration/19-migration

Conversation

@carterworks

@carterworks carterworks commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Changed Packages

  • core
  • reactor-extension

Description

All 8 migration tests preserved as test.skip with detailed explanations. They require At.js 1.x/2.x pages, real Target edge, and cross-page navigation — fundamentally incompatible with the Vitest+Playwright 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/Migration/C8085773.js
  • packages/browser/test/functional/specs/Migration/C8085774.js
  • packages/browser/test/functional/specs/Migration/C8085775.js
  • packages/browser/test/functional/specs/Migration/C8085776.js
  • packages/browser/test/functional/specs/Migration/C8085777.js
  • packages/browser/test/functional/specs/Migration/C8085778.js
  • packages/browser/test/functional/specs/Migration/C8085779.js
  • packages/browser/test/functional/specs/Migration/C8085780.js

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have added a Changeset file with a consumer-facing description of my changes.
  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

Stack

  1. Added MSW handlers, mock fixtures, and Vitest+Playwright test harness for functional test migration #1532
  2. Migrated Install SDK functional tests to Vitest+Playwright+MSW #1533

@carterworks carterworks added the ignore-for-release Do not include this PR in release notes label Jun 12, 2026
@carterworks carterworks self-assigned this Jun 12, 2026
@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7601646

The changes in this PR will be included in the next version bump.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a single integration spec file with 8 test.skip stubs to preserve the test IDs and rationale for the At.js ↔ Web SDK migration test cases that cannot be replicated in the Vitest+MSW harness due to their dependency on live At.js 1.x/2.x pages, a real Target edge, and cross-page navigation.

  • All 8 stubs have empty bodies and descriptive names documenting the blocked infrastructure requirement; no executable test logic is introduced.
  • The original TestCafe source files (C8085773.jsC8085780.js) remain in packages/browser/test/functional/specs/Migration/ and are not deleted in this diff, so both the old suite and the new stubs coexist on the base branch.

Confidence Score: 4/5

Safe to merge; the only change is adding an empty stub file with no executable logic that could affect production behavior.

The added file contains nothing but skipped test stubs with empty bodies, so there is no risk of regression. The two notes — preferring test.todo over test.skip for unimplemented stubs, and the continued presence of the original TestCafe files — are both tracking/clarity concerns rather than functional defects.

No files require special attention; migration.spec.js is the only changed file and it contains no executable code.

Important Files Changed

Filename Overview
packages/browser/test/integration/specs/Migration/migration.spec.js New file adding 8 test.skip stubs for At.js migration tests that require live Target edge infrastructure; no executable logic introduced, but test.todo would be a more semantically accurate marker than test.skip with empty bodies.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[TestCafe Functional Tests\nC8085773–C8085780] -->|"still exist (not deleted)"| B[packages/browser/test/functional/specs/Migration/]
    C[This PR] -->|adds| D[migration.spec.js\n8x test.skip stubs]
    D --> E{test.skip with empty body}
    E -->|skipped in CI| F[Vitest reports: SKIPPED]
    E -.->|alternative| G[test.todo — reports: TODO\nno function body needed]
Loading

Reviews (1): Last reviewed commit: "test(integration): migrate migration fun..." | Re-trigger Greptile

Comment on lines +19 to +57
test.skip(
"C8085773: Web SDK → At.js 1.x: same session ID and edge cluster (requires At.js 1.x page + real Target edge)",
() => {},
);

test.skip(
"C8085774: Web SDK → At.js 2.x: same session ID and edge cluster (requires At.js 2.x page + real Target edge)",
() => {},
);

test.skip(
"C8085775: At.js 1.x → Web SDK: same session ID and edge cluster (requires At.js 1.x start page + real Target edge)",
() => {},
);

test.skip(
"C8085776: At.js 2.x → Web SDK: same session ID and edge cluster (requires At.js 2.x start page + real Target edge)",
() => {},
);

test.skip(
"C8085777: Web SDK profile update → At.js 2.x offer fetch (requires real Target edge + cross-page navigation)",
() => {},
);

test.skip(
"C8085778: Web SDK profile update → At.js 1.x offer fetch (requires real Target edge + cross-page navigation)",
() => {},
);

test.skip(
"C8085779: At.js 1.x profile update → Web SDK proposition fetch (requires real Target edge + cross-page navigation)",
() => {},
);

test.skip(
"C8085780: At.js 2.x profile update → Web SDK proposition fetch (requires real Target edge + cross-page navigation)",
() => {},
);

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.skip vs test.todo for unimplemented stubs

All eight entries use test.skip(() => {}) with empty bodies. Vitest's test.todo is purpose-built for this situation — it marks a test that has not been written yet, shows up distinctly in the test reporter as "todo" (rather than "skipped"), and does not require a function body at all. Using test.skip with () => {} bodies implies the test was once implemented and is now temporarily disabled, which is semantically misleading here. Callers relying on test report counts to track migration progress will see these counted as "skipped" instead of "todo," making it harder to distinguish legitimately-skipped active tests from not-yet-written stubs.

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!

Comment on lines +1 to +16
/*
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.
*/

// These tests require real At.js 1.x/2.x pages and live Target endpoints; skipped
// until suitable end-to-end infrastructure is available.

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

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 Original TestCafe files not removed in this PR

The eight TestCafe functional tests listed in the PR description (C8085773.js through C8085780.js) still exist in packages/browser/test/functional/specs/Migration/. If the migration plan calls for eventually deleting the old suite once the integration counterparts are implemented, the co-existence of both the functional originals and the new (empty) integration stubs could cause confusion about what coverage is actually active. Is removing the TestCafe files planned for this PR or a later step in the stack? Are the original TestCafe functional files (C8085773.jsC8085780.js) intended to be deleted in this PR or in a later PR in the stacked series?

@greptile-apps greptile-apps Bot left a comment

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.

carterworks has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@greptile-apps greptile-apps Bot left a comment

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.

carterworks has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@carterworks carterworks changed the base branch from migrate-integration/18-rules-engine to migrate-integration/00-infra June 12, 2026 17:58

@greptile-apps greptile-apps Bot left a comment

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.

carterworks has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@carterworks carterworks force-pushed the migrate-integration/19-migration branch 4 times, most recently from 7b5ab06 to e93cf01 Compare June 12, 2026 21:20
@carterworks carterworks marked this pull request as draft June 15, 2026 16:38
@carterworks carterworks force-pushed the migrate-integration/19-migration branch from e93cf01 to ce94ec2 Compare June 15, 2026 19:59
carterworks and others added 2 commits June 26, 2026 14:32
@carterworks carterworks force-pushed the migrate-integration/19-migration branch from ce94ec2 to 7601646 Compare June 26, 2026 20:32
@carterworks

Copy link
Copy Markdown
Collaborator Author

Stub PR — structurally sound, parity deferred. Approve.


Checks

# Check Result
1 All 8 cases are genuine test.skip stubs (no logic, no assertions) 🟢 Verified
2 Skip rationale documented 🟢 File-level comment + inline reason in each test title
3 C-number traceability: each stub maps to an old functional file 🟢 1-for-1, see table below
4 Harness wiring: extend.js import resolves, describe/test.skip structure valid, license header present 🟢 All clear
5 Registered in vitest.projects.js 🟢 Glob packages/browser/test/integration/**/*.spec.js picks it up automatically
6 Old functional files deleted 🟢 Correctly retained (stub-only PR, per migration plan)
7 Parity / mock / timing ⬛ N/A — deferred until real infrastructure is available

C-number → functional file → skip reason

Stub (new spec line) Old functional file Why skipped
C8085773 (line 19) Migration/C8085773.js Requires At.js 1.x page + real Target edge
C8085774 (line 21) Migration/C8085774.js Requires At.js 2.x page + real Target edge
C8085775 (line 23) Migration/C8085775.js Requires At.js 1.x start page + real Target edge
C8085776 (line 25) Migration/C8085776.js Requires At.js 2.x start page + real Target edge
C8085777 (line 27) Migration/C8085777.js Requires real Target edge + cross-page navigation (was already test.skip in old suite)
C8085778 (line 29) Migration/C8085778.js Requires real Target edge + cross-page navigation (was already test.skip in old suite)
C8085779 (line 31) Migration/C8085779.js Requires real Target edge + cross-page navigation
C8085780 (line 33) Migration/C8085780.js Requires real Target edge + cross-page navigation

Findings

  • migration.spec.js:13 — File-level block comment states the infrastructure constraint clearly. Each test title also embeds the reason inline. No extraneous what-comments.
  • migration.spec.js:16 — Import is ../../helpers/testsSetup/extend.js (relative from specs/Migration/). Resolves correctly; extend.js exports test and describe from vitest.
  • migration.spec.js:19–33 — All 8 stubs are empty arrow functions (() => {}). Confirmed: no hidden logic, no assertions.
  • C8085777 / C8085778 note: these two were already test.skip in the original TestCafe suite — the stub faithfully preserves that status and the skip reason is consistent.
  • No functional files deleted: packages/browser/test/functional/specs/Migration/ (8 files + helper.js) remains intact, as expected for a stub-only PR.
  • License header: 2026 Adobe, Apache 2.0 — present and correct (migration.spec.js:1–11).

Reviewer: automated stub-PR review. Parity, mock coverage, and timing checks are deferred and not applicable here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release Do not include this PR in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant