feat(examples): migrate examples/apps/ packages from Jest+Puppeteer to Playwright#26619
Draft
alexvy86 wants to merge 23 commits intomicrosoft:mainfrom
Draft
feat(examples): migrate examples/apps/ packages from Jest+Puppeteer to Playwright#26619alexvy86 wants to merge 23 commits intomicrosoft:mainfrom
alexvy86 wants to merge 23 commits intomicrosoft:mainfrom
Conversation
…o Playwright Replaces jest, jest-puppeteer, jest-environment-puppeteer, expect-puppeteer, and puppeteer dependencies with @playwright/test across all 9 browser-tested packages in examples/apps/. - Adds playwright.config.ts per package (port via getTestPort from package.json name) - Rewrites test files using Playwright fixtures and locator API - Deletes jest.config.cjs and jest-puppeteer.config.cjs from each package - Updates package.json scripts: test:playwright / test:playwright:verbose - Adds test:playwright to fluidBuild.config.cjs task graph - Adds test:playwright to repoPolicyCheck split test script names - Adds test-results/ to root .gitignore (Playwright last-run artifacts) - Updates tsconfig.json per package: adds playwright.config.ts to include, replaces skipLibCheck workaround with explicit "node" in types array Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adding tests/**/* broke build:compile because tests/index.ts uses extensionless imports that violate --moduleResolution node16. The tests directory was never included in this package's tsconfig (only src/**/*); only playwright.config.ts needed to be added. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nfig Adding @types/node to the types array resolves the original ts-loader failure that occurred when playwright.config.ts (which uses node:module and process) was included in the bundler tsconfig. With @types/node available, both the webpack build and ESLint's project service can parse the test files correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ation Restores rootDir: "./src" to preserve lib/ output at the root (not lib/src/), which is required since data-object-grid depends on collaborative-textarea's lib/index.js. Adds a separate tsconfig.test.json with noEmit: true for type-checking test files and playwright.config.ts without affecting the build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o different versions.
Node.js 20.19.0–20.19.4 ship `cjs-module-lexer` 1.4.1, which fails to
detect `Object.defineProperty(exports, "Name", { get: ... })` as a named
CJS export when imported from ESM. This causes a
`TypeError: Class extends value undefined` when Playwright loads test
files that transitively pull in `@fluid-internal/client-utils` (whose
`typedEventEmitter.js` does `import { EventEmitter } from
"./eventEmitter.cjs"`).
Node.js 20.19.5 bumped `cjs-module-lexer` to 2.1.0 (a major version
bump), which correctly handles this pattern. Requiring 20.19.6 (the
latest patch) ensures a stable fix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Matches the minimum version requirement set in package.json engines. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 03903a1.
alexvy86
commented
Mar 6, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces jest, jest-puppeteer, jest-environment-puppeteer, expect-puppeteer, and puppeteer dependencies with @playwright/test across all 9 browser-tested packages in examples/apps/.
cjs-module-lexer1.4.1, which fails to detectObject.defineProperty-style named CJS exports when imported from ESM — causing aTypeError: Class extends value undefinedwhen Playwright loads test files that transitively import@fluid-internal/client-utils(example). Node.js 20.19.5 bumpedcjs-module-lexerto 2.1.0, fixing the detection. Requiring 20.19.6 (the latest patch) ensures a stable baseline.Reviewer Guidance
The review process is outlined on this wiki page.
Pipeline run for this PR shows 40,800 tests running, vs 40,791 in other PRs, which is due to the fact that the inventory-app mocha tests are currently not running for some reason (see today, vs this PR).