-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Version
^1.41.1
Steps to reproduce
- Clone my repro repo https://github.com/chekrd/pw-import-bug/tree/master
- npm ci
- npm run playwright
Expected behavior
The project is compiled and the test is OK.
Actual behavior
Module named "Component.uitest.shared.ts" is converted to {"__pw_type": "importRef", "id": "__Component_uitest_shared_componentMock", "property": "content"}
and the runtime is broken.
Any module with a "." in its name, imported into the .uitest.tsx (a script running in NodeJs PW test runtime) is affected.
Additional context
Up to the version 1.41.0 it worked as expected.
Related issue without resolution (the fix was applied, issue closed and later the fix commit was reverted): #29302
Naming modules with aditional context in its name using a dot as a separator is common practice in JS ecosystem. Even Playwright itself uses *.spec.ts(x) as a default.
Environment
System:
OS: macOS 14.3.1
CPU: (10) arm64 Apple M1 Pro
Memory: 82.22 MB / 16.00 GB
Binaries:
Node: 21.6.2 - ~/.nvm/versions/node/v21.6.2/bin/node
npm: 10.2.4 - ~/.nvm/versions/node/v21.6.2/bin/npm
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/experimental-ct-react: 1.42.0 => 1.42.0
@playwright/test: 1.42.0 => 1.42.0
pavelfeldman and SimonGolms
Metadata
Metadata
Assignees
Labels
No labels