Migrated LibraryInfo functional test to Vitest+Playwright+MSW#1536
Migrated LibraryInfo functional test to Vitest+Playwright+MSW#1536carterworks wants to merge 7 commits into
Conversation
|
|
| Filename | Overview |
|---|---|
| packages/browser/test/integration/specs/LibraryInfo/libraryInfo.spec.js | New integration spec migrating C2589 from TestCafe to Vitest+Playwright+MSW; adds sendConversationEvent to expected commands (reflecting current API state), switches config assertion to toMatchObject, and correctly tests function serialization and postMessage clonability. |
Sequence Diagram
sequenceDiagram
participant Test as Vitest Test
participant Fixture as alloy fixture (extend.js)
participant Alloy as window.alloy
participant MSW as MSW Worker
Fixture->>Fixture: clear kndctr_/AMCV_ cookies
Fixture->>Fixture: setupBaseCode() + setupAlloy()
Fixture->>Test: use(alloy)
Test->>Alloy: "configure({orgId, datastreamId, ...})"
Alloy-->>Test: resolved
Test->>Alloy: getLibraryInfo()
Alloy-->>Test: "{ libraryInfo }"
Note over Test: delete libraryInfo.configs.edgeBasePath
Test->>Test: expect(version).toBe(LIBRARY_VERSION)
Test->>Test: expect(commands).toEqual(EXPECTED_COMMANDS)
Test->>Test: "expect(configs).toMatchObject({...})"
Test-->>Fixture: done
Fixture->>Fixture: cleanAlloy()
Reviews (2): Last reviewed commit: "test(integration): migrate library info ..." | Re-trigger Greptile
19ba2a4 to
f847fde
Compare
6d4a68b to
71ad5f5
Compare
f847fde to
c698d64
Compare
71ad5f5 to
10f1006
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.
30223eb to
a721189
Compare
a721189 to
b06f1f9
Compare
3341ffb to
31fe886
Compare
Keep the original testcafe functional specs alongside the new Vitest+Playwright+MSW integration suite until these migration branches merge, so reviewers retain the pre-migration signal.
Changed Packages
Description
Migrates the LibraryInfo functional test to the new Vitest+Playwright+MSW 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/LibraryInfo/C2589.jsTypes of changes
Checklist:
Stack