Skip to content

Commit

Permalink
refactor: deprecate Protractor in favor of Cypress
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

Cypress is now the default choice for e2e tests.
  • Loading branch information
sinedied committed Dec 3, 2021
1 parent 6fe85aa commit f5c4538
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -67,7 +67,7 @@ The structure follows [Angular style guide](https://angular.io/guide/styleguide)
```
dist/ app production build
docs/ project docs and coding guides
e2e/ end-to-end tests
cypress/ end-to-end tests
src/ project source code
|- app/ app components
| |- @shared/ shared module (common components, directives, pipes and services)
Expand Down
2 changes: 1 addition & 1 deletion generators/app/index.js
Expand Up @@ -151,7 +151,7 @@ class NgxGenerator extends Generator {
this.props.pwa = this.props.features.includes('pwa');
this.props.auth = this.props.features.includes('auth');
this.props.lazy = this.props.features.includes('lazy');
this.props.e2e = this.props.features.includes('e2e');
this.props.e2e = this.props.tools.includes('protractor'); // legacy e2e
this.props.cypress = this.props.features.includes('cypress');
this.props.angulartics = this.props.features.includes('angulartics');
this.shareProps(this.props);
Expand Down
12 changes: 5 additions & 7 deletions generators/app/prompts.js
Expand Up @@ -137,15 +137,9 @@ module.exports = [
checked: true,
when: true
},
{
value: 'e2e',
name: 'End-to-end tests with Protractor (Wrapper over WebDrivers JS deprecated end 2022)',
checked: false,
when: true
},
{
value: 'cypress',
name: 'End-to-end tests with Cypress (Automated testing framework designed specifically for the modern Web)',
name: 'End-to-end tests with Cypress',
checked: true,
when: true
},
Expand Down Expand Up @@ -213,6 +207,10 @@ module.exports = [
value: 'jest',
name: 'Jest (replaces Jasmine)'
},
{
value: 'protractor',
name: 'Protractor (replaces Cypress) [deprecated soon]',
},
{
value: 'puppeteer',
name: 'Puppeteer (embedded Chrome for testing)'
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/__cypress._cypress.json
Expand Up @@ -6,4 +6,4 @@
"pluginsFile": "cypress/plugins/index.ts",
"fixturesFolder": "cypress/fixtures",
"baseUrl": "http://localhost:4200"
}
}

0 comments on commit f5c4538

Please sign in to comment.