devkit icon indicating copy to clipboard operation
devkit copied to clipboard

Cannot run component tests when project uses Webpack 5

Open kerry-afs opened this issue 3 years ago • 3 comments

Please find the below repository with working example of the failed Angular component test.

I have Nx set up with project.json files for each project (as opposed to the global angular.json file). We are also leveraging Webpack 5, and this appears to cause an issue when firing up the component test.

Steps to reproduce:

  1. Clone the following repository: https://github.com/kerry-afs/cypress-component
  2. Run npm install to install dependencies
  3. Execute ng run web-e2e:ct
  4. You will notice the command begin to execute, and the Cypress runner icon appear. However, the runner will not fully load and the component tests will not execute.

Environment: Nx: 12.10.0 Cypress: 8.5.1 Angular: 12.2.0 OS: macOS Big Sur 11.6

kerry-afs avatar Oct 21 '21 21:10 kerry-afs

It's weird since we already use webpack 5 within the repository without any troubles. I'm gonna check your reproduction asap, thanks for the report.

edbzn avatar Oct 21 '21 22:10 edbzn

Running into this issue as well. Runs fine with watch mode and clicking a test. Just need the headless mode for CI.

logitimate avatar Dec 21 '21 22:12 logitimate

I got same issue. Screen Shot 2022-01-26 at 17 03 13 Screen Shot 2022-01-26 at 17 01 28

See this repository in order to reproduce

albuquerquecesar avatar Jan 26 '22 20:01 albuquerquecesar