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
Following the Angular CLI setup should create a new test setup
ng add @jscutlery/cypress-angular
ng g @jscutlery/cypress-angular:setup-ct --project my-project
npx ngcc
ng run my-project:ct
Actual Behaviour
Running ng g @jscutlery/cypress-angular:setup-ct --project my-project updates all necessary files but does not update angular.json. The console logs indicate that an update to angular.json was made but version control does not report this.
The new test setup project is not created in angular.json
This leads to my-project:ct not being found when running ng run my-project:ct
% npx ng g @jscutlery/cypress-angular:setup-ct --project webapp
CREATE cypress/plugins/index.ts (241 bytes)
CREATE cypress/support/index.ts (45 bytes)
CREATE src/sample.cy-spec.ts (336 bytes)
CREATE tsconfig.cypress.json (192 bytes)
UPDATE cypress.json (199 bytes)
UPDATE tsconfig.json (676 bytes)
UPDATE angular.json (4780 bytes)
% npx ngcc
% npx ng run webapp:ct
An unhandled exception occurred: Project "webapp" does not exist.
See "/private/var/folders/zc/klzx1g057xl567cy854bz3ph0000gn/T/ng-KGmdeg/angular-errors.log" for further details.
Opening up the log file, we get:
[error] Error: Project "webapp" does not exist.
at WorkspaceNodeModulesArchitectHost.findProjectTarget (/Users/qarunqb/work/webapp/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:123:19)
at WorkspaceNodeModulesArchitectHost.getBuilderNameForTarget (/Users/qarunqb/work/webapp/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:24:39)
at RunCommand.runSingleTarget (/Users/qarunqb/work/webapp/node_modules/@angular/cli/models/architect-command.js:179:55)
at RunCommand.runArchitectTarget (/Users/qarunqb/work/webapp/node_modules/@angular/cli/models/architect-command.js:222:35)
at RunCommand.run (/Users/qarunqb/work/webapp/node_modules/@angular/cli/commands/run-impl.js:15:25)
at RunCommand.validateAndRun (/Users/qarunqb/work/webapp/node_modules/@angular/cli/models/command.js:134:39)
at async Object.runCommand (/Users/qarunqb/work/webapp/node_modules/@angular/cli/models/command-runner.js:198:24)
at async default_1 (/Users/qarunqb/work/webapp/node_modules/@angular/cli/lib/cli/index.js:59:31)
The text was updated successfully, but these errors were encountered:
Expectation
Following the Angular CLI setup should create a new test setup
Actual Behaviour
Running
ng g @jscutlery/cypress-angular:setup-ct --project my-project
updates all necessary files but does not updateangular.json
. The console logs indicate that an update toangular.json
was made but version control does not report this.The new test setup project is not created in
angular.json
This leads to
my-project:ct
not being found when runningng run my-project:ct
Versions
Here are my software versions:
Logs
Opening up the log file, we get:
The text was updated successfully, but these errors were encountered: