New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Angular/Web component tests fail with .ts
or .js
as file extension
#29544
Labels
Comments
7 tasks
This was referenced Apr 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
1.41.1
Steps to reproduce
pnpm i
pnpm test
Expected behavior
the test should pass
Actual behavior
the tests fail
logs: https://github.com/sand4rt/playwright-ct-web/actions/runs/7943833528/job/21688654668?pr=36#step:8:68
Additional context
I'm unable to upgrade the Angular and web/lit component testing libraries from version v1.41.0 to v1.41.1 because the transform process was improved recently. The issue lies in the components not being transformed into refs. This occurs because Angular/Lit components are used as
.ts
files, while the transformation process in playwright-ct-core only handles non-JavaScript imports, as indicated here: https://github.com/microsoft/playwright/blob/main/packages/playwright-ct-core/src/tsxTransform.ts#L78Is it an option to verify if the import is used within the
mount()
instead of verifying the file extension?Related to #27783
The text was updated successfully, but these errors were encountered: