Skip to content

Commit

Permalink
Merge pull request #16149 from vishal423/fix-cypress-interactive-run
Browse files Browse the repository at this point in the history
fix: Update cypress e2e npm scripts
  • Loading branch information
pascalgrimaud authored Sep 3, 2021
2 parents da2794f + a1c97bb commit af5a826
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions generators/client/templates/angular/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@
"e2e": "<%= clientPackageManager %> run e2e:protractor",
"e2e:headless": "<%= clientPackageManager %> run e2e:protractor:headless",
<%_ } else if ((cypressTests && !protractorTests) || (protractorTests && cypressTests)) { _%>
"e2e": "<%= clientPackageManager %> run e2e:cypress",
"e2e:headless": "<%= clientPackageManager %> run e2e:cypress:headless",
"e2e": "<%= clientPackageManager %> run e2e:cypress:headed",
"e2e:headless": "<%= clientPackageManager %> run e2e:cypress",
<%_ } _%>
<%_ if (protractorTests) { _%>
"e2e:protractor:headless": "<%= clientPackageManager %> run e2e:protractor",
"e2e:protractor": "protractor <%= TEST_SRC_DIR %>protractor.conf.js",
<%_ } _%>
<%_ if (cypressTests) { _%>
"e2e:cypress:headless": "<%= clientPackageManager %> run e2e:cypress -- --headless",
"e2e:cypress:headed": "<%= clientPackageManager %> run e2e:cypress -- --headed",
"e2e:cypress": "cypress run --browser chrome --record ${CYPRESS_ENABLE_RECORD:-false}",
"cypress": "cypress open",
<%_ } _%>
Expand Down
6 changes: 3 additions & 3 deletions generators/client/templates/react/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@
"e2e": "<%= clientPackageManager %> run e2e:protractor",
"e2e:headless": "<%= clientPackageManager %> run e2e:protractor:headless",
<%_ } else if ((cypressTests && !protractorTests) || (protractorTests && cypressTests)) { _%>
"e2e": "<%= clientPackageManager %> run e2e:cypress",
"e2e:headless": "<%= clientPackageManager %> run e2e:cypress:headless",
"e2e": "<%= clientPackageManager %> run e2e:cypress:headed",
"e2e:headless": "<%= clientPackageManager %> run e2e:cypress",
<%_ } _%>
<%_ if (protractorTests) { _%>
"e2e:protractor:headless": "<%= clientPackageManager %> run e2e:protractor",
"e2e:protractor": "protractor <%= TEST_SRC_DIR %>protractor.conf.js",
<%_ } _%>
<%_ if (cypressTests) { _%>
"e2e:cypress:headless": "<%= clientPackageManager %> run e2e:cypress -- --headless",
"e2e:cypress:headed": "<%= clientPackageManager %> run e2e:cypress -- --headed",
"e2e:cypress": "cypress run --browser chrome --record ${CYPRESS_ENABLE_RECORD:-false}",
"cypress": "cypress open",
<%_ } _%>
Expand Down
6 changes: 3 additions & 3 deletions generators/client/templates/vue/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@
"e2e": "<%= clientPackageManager %> run e2e:protractor",
"e2e:headless": "<%= clientPackageManager %> run e2e:protractor:headless",
<%_ } else if ((cypressTests && !protractorTests) || (protractorTests && cypressTests)) { _%>
"e2e": "<%= clientPackageManager %> run e2e:cypress",
"e2e:headless": "<%= clientPackageManager %> run e2e:cypress:headless",
"e2e": "<%= clientPackageManager %> run e2e:cypress:headed",
"e2e:headless": "<%= clientPackageManager %> run e2e:cypress",
<%_ } _%>
<%_ if (protractorTests) { _%>
"e2e:protractor:headless": "<%= clientPackageManager %> run e2e:protractor",
"e2e:protractor": "protractor <%= TEST_SRC_DIR %>protractor.conf.js",
<%_ } _%>
<%_ if (cypressTests) { _%>
"e2e:cypress:headless": "<%= clientPackageManager %> run e2e:cypress -- --headless",
"e2e:cypress:headed": "<%= clientPackageManager %> run e2e:cypress -- --headed",
"e2e:cypress": "cypress run --browser chrome --record ${CYPRESS_ENABLE_RECORD:-false}",
"cypress": "cypress open",
<%_ } _%>
Expand Down
4 changes: 2 additions & 2 deletions generators/cypress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ module.exports = class extends BaseBlueprintGenerator {
},
scripts: {
'cypress:audits': 'cypress open --config-file cypress-audits.json',
'e2e:cypress:audits:headless': 'npm run e2e:cypress -- --headless --config-file cypress-audits.json',
'e2e:cypress:audits:headless': 'npm run e2e:cypress --config-file cypress-audits.json',
// eslint-disable-next-line no-template-curly-in-string
'e2e:cypress:audits': 'cypress run --browser chrome --record ${CYPRESS_ENABLE_RECORD:-false} --config-file cypress-audits.json',
},
Expand All @@ -187,7 +187,7 @@ module.exports = class extends BaseBlueprintGenerator {
scripts: {
'clean-coverage': 'rimraf .nyc_output coverage',
'pree2e:cypress:coverage': 'npm run clean coverage && npm run ci:server:await',
'e2e:cypress:coverage': 'npm run e2e:cypress',
'e2e:cypress:coverage': 'npm run e2e:cypress:headed',
'poste2e:cypress:coverage': 'nyc report',
'prewebapp:instrumenter': 'npm run clean-www && npm run clean-coverage',
'webapp:instrumenter': 'ng build --configuration instrumenter',
Expand Down

0 comments on commit af5a826

Please sign in to comment.