You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting an Angular project with version 16.7.0-beta.x and using Playwright as the e2e test runner, no tests are actually run with the e2e command. They don't fail and no obvious errors are thrown. But, no tests are run.
Expected Behavior
The test runner should find and run at least the default test.
Create a new workspace with npx [email protected] as an integrated monorepo with no initial apps.
Install the Angular plugin with npm install @nx/[email protected] --save-dev.
Create an Angular app with npx nx g @nx/angular:application. Choose all of the default options EXCEPT to use playwright as the e2e test runner. (I named the app "my-app").
Run npx nx e2e my-app-e2e.
Run npx playwright show-report dist/.playwright/apps/my-app-e2e/playwright-report and observe that no tests actually ran
Playwright is looking in ./<> rather than ./src for tests. Changing the folder to ./src fixes the issue. It's possible that #18558 may fix this behavior but I'm not sure. I'm happy to open a PR if not.
The text was updated successfully, but these errors were encountered:
Current Behavior
When starting an Angular project with version 16.7.0-beta.x and using Playwright as the e2e test runner, no tests are actually run with the
e2e
command. They don't fail and no obvious errors are thrown. But, no tests are run.Expected Behavior
The test runner should find and run at least the default test.
GitHub Repo
https://github.com/jafaircl/nx-playwright-bug
Steps to Reproduce
npx [email protected]
as an integrated monorepo with no initial apps.npm install @nx/[email protected] --save-dev
.npx nx g @nx/angular:application
. Choose all of the default options EXCEPT to use playwright as the e2e test runner. (I named the app "my-app").npx nx e2e my-app-e2e
.npx playwright show-report dist/.playwright/apps/my-app-e2e/playwright-report
and observe that no tests actually ranNx Report
Failure Logs
Operating System
Additional Information
I traced the issue to this line of code:
nx/packages/playwright/src/generators/configuration/files/playwright.config.ts.template
Line 19 in 0527925
Playwright is looking in
./<>
rather than./src
for tests. Changing the folder to./src
fixes the issue. It's possible that #18558 may fix this behavior but I'm not sure. I'm happy to open a PR if not.The text was updated successfully, but these errors were encountered: