Skip to content

Migrated Install SDK functional tests to Vitest+Playwright+MSW#1533

Open
carterworks wants to merge 1 commit into
migrate-integration/00-infrafrom
migrate-integration/01-install-sdk
Open

Migrated Install SDK functional tests to Vitest+Playwright+MSW#1533
carterworks wants to merge 1 commit into
migrate-integration/00-infrafrom
migrate-integration/01-install-sdk

Conversation

@carterworks

@carterworks carterworks commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Changed Packages

  • core
  • reactor-extension

Description

Migrates the Install SDK functional tests to the new Vitest+Playwright+MSW harness. C2579 (multi-instance) and C1338399 (NPM entry point) are preserved as documented test.skip with explanations.

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/Install SDK/C2560.js
  • packages/browser/test/functional/specs/Install SDK/C2579.js
  • packages/browser/test/functional/specs/Install SDK/C1338399.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 👈 current

@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: 945ac88

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 new Vitest+Playwright+MSW integration spec (installSdk.spec.js) that replaces the three TestCafe files in Install SDK/. C2560 is ported as an active test; C2579 and C1338399 are preserved as documented test.skip stubs with clear rationale for why the current harness cannot support them.

  • C2560 verifies typeof window.alloy === "function" after the alloy auto-fixture loads the SDK — a stronger assertion than the original !!window.alloy boolean check.
  • C2579 (multi-instance isolation) is skipped because initializeStandalone() reads __alloyNS only once and a second load would conflict with the existing instance; the skip comment recommends unit tests as coverage.
  • C1338399 (NPM entry point) is skipped because the harness always loads the standalone build, not the alloyCreateInstance NPM artifact.

Confidence Score: 5/5

Safe to merge — the change adds a single new test file with no modifications to production code or shared test infrastructure.

Only one file is added. The active test (C2560) correctly uses the auto-fixture harness and makes a stronger assertion than the original TestCafe test. The two skipped tests include thorough explanations and are not regressions. No shared helpers or production code are touched.

No files require special attention.

Important Files Changed

Filename Overview
packages/browser/test/integration/specs/Install SDK/installSdk.spec.js New integration spec migrating three TestCafe tests (C2560 active, C2579 and C1338399 skipped with documented rationale) to the Vitest+Playwright+MSW harness — no logic defects found.

Sequence Diagram

sequenceDiagram
    participant Vitest
    participant extend.js (auto fixtures)
    participant MSW Worker
    participant setupBaseCode
    participant setupAlloy
    participant Test (C2560)

    Vitest->>extend.js (auto fixtures): run worker fixture (auto)
    extend.js (auto fixtures)->>MSW Worker: worker.start() (once)
    MSW Worker-->>extend.js (auto fixtures): started

    Vitest->>extend.js (auto fixtures): run alloy fixture (auto)
    extend.js (auto fixtures)->>extend.js (auto fixtures): clear kndctr_/AMCV_ cookies
    extend.js (auto fixtures)->>setupBaseCode: setupBaseCode()
    setupBaseCode-->>extend.js (auto fixtures): window.__alloyNS set
    extend.js (auto fixtures)->>setupAlloy: setupAlloy()
    setupAlloy-->>extend.js (auto fixtures): window.alloy (function)

    extend.js (auto fixtures)->>Test (C2560): use(alloy)
    Test (C2560)->>Test (C2560): expect(typeof window.alloy).toBe("function")
    Test (C2560)->>Test (C2560): expect(alloy).toBeDefined()

    Vitest->>extend.js (auto fixtures): teardown alloy fixture
    extend.js (auto fixtures)->>extend.js (auto fixtures): cleanAlloy()
    Vitest->>extend.js (auto fixtures): teardown worker fixture
    extend.js (auto fixtures)->>MSW Worker: worker.resetHandlers()
Loading

Reviews (2): Last reviewed commit: "test(integration): migrate install sdk f..." | Re-trigger Greptile

@carterworks carterworks force-pushed the migrate-integration/00-infra branch from ba71e37 to ee32880 Compare June 12, 2026 17:31
@carterworks carterworks force-pushed the migrate-integration/01-install-sdk branch from fd74e9f to 9b5328d Compare June 12, 2026 17:31
This was referenced Jun 12, 2026

@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/01-install-sdk branch 2 times, most recently from 2472155 to 168bd38 Compare June 12, 2026 20:22
@carterworks carterworks force-pushed the migrate-integration/01-install-sdk branch 2 times, most recently from 553e412 to 867f8ab Compare June 12, 2026 21:19
@carterworks carterworks marked this pull request as draft June 15, 2026 16:38
@carterworks carterworks force-pushed the migrate-integration/01-install-sdk branch from 867f8ab to 68735d4 Compare June 15, 2026 19:59
@carterworks carterworks marked this pull request as ready for review June 15, 2026 22:02
@carterworks carterworks force-pushed the migrate-integration/01-install-sdk branch from 68735d4 to 945ac88 Compare June 26, 2026 20:17
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