webdriverio-schematics icon indicating copy to clipboard operation
webdriverio-schematics copied to clipboard

The `e2e` target is not created

Open chrisvelevitch opened this issue 3 years ago • 2 comments
trafficstars

I created a new empty Angular v13 project and added the package:-

ng add @wdio/schematics --removeProtractor

with the following options:-

✔ Found compatible package version: @wdio/[email protected].
✔ Package information loaded.

The package @wdio/[email protected] will be installed and executed.
Would you like to proceed? Yes
✔ Package successfully installed.

=========================
WDIO Configuration Helper
=========================

? Where is your automation backend located? On my local machine
? Which framework do you want to use? jasmine
? Do you want to use a compiler? TypeScript (https://www.typescriptlang.org/)
? Where are your test specs located? ./test/specs/**/*.ts
? Do you want WebdriverIO to autogenerate some test files? Yes
? Do you want to use page objects (https://martinfowler.com/bliki/PageObject.html)? No
? Which reporter do you want to use? spec
? Do you want to add a plugin to your test setup?
? Do you want to add a service to your test setup? chromedriver
? What is the base url? http://localhost
? Do you want me to run `npm install` Yes

Installing wdio packages:
- @wdio/local-runner
- @wdio/jasmine-framework
- @wdio/spec-reporter
- wdio-chromedriver-service
- ts-node
- typescript
- chromedriver

When I run ng e2e I get:-

Cannot find "e2e" target for the specified project.

I inspected the angular.json file and the e2e target is missing.

Shouldn't ng add @wdio/schematics --removeProtractor update the angular.json file to include the e2e target?

What should the e2e target look like so I can add it myself?

chrisvelevitch avatar Mar 22 '22 05:03 chrisvelevitch

This could be related to the fact that this repository is using @angular-devkit/* v12 which might not be compatible with v13 of Angular. I've been struggling updating this dependency due to type issues. Are you interested helping out?

christian-bromann avatar Mar 22 '22 07:03 christian-bromann

I checked and the project is using v13.3.0 of all the Angular packages and includes @angular-devkit/build-angular installed.

chrisvelevitch avatar Mar 22 '22 14:03 chrisvelevitch