mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-02 21:10:47 -05:00
Fix test script, add Mocha result checks to internal Cypress te… (#7110)
* fix cypress.js script typo * add verify-mocha-results to driver integration test stages * add cypress-multi-reporters * fix circle.yml * fix yarn.lock * cleanup * use working_directory instead of yarn workspace commands * add reports to ui-components and reporter, update circle.yml * fix circle.yml * fix circle.yml * fix circle.yml * add more verify-mocha-results
This commit is contained in:
+54
-62
@@ -86,6 +86,34 @@ commands:
|
||||
else
|
||||
echo "**** Not updating Chrome. Running tests in '<< parameters.browser >>' ****"
|
||||
fi
|
||||
|
||||
run-driver-integration-tests:
|
||||
parameters:
|
||||
browser:
|
||||
description: browser shortname to target
|
||||
type: string
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
command: yarn start
|
||||
background: true
|
||||
working_directory: packages/driver
|
||||
- run:
|
||||
command: yarn wait-on http://localhost:3500
|
||||
- run:
|
||||
command: |
|
||||
CYPRESS_KONFIG_ENV=production \
|
||||
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
|
||||
yarn cypress:run --record --parallel --group 5x-driver-<< parameters.browser >> --browser << parameters.browser >>
|
||||
working_directory: packages/driver
|
||||
- verify-mocha-results
|
||||
- store_test_results:
|
||||
path: /tmp/cypress
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts
|
||||
- store-npm-logs
|
||||
|
||||
run-e2e-tests:
|
||||
parameters:
|
||||
browser:
|
||||
@@ -549,69 +577,22 @@ jobs:
|
||||
<<: *defaults
|
||||
parallelism: 5
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
command: yarn lerna exec --scope @packages/driver "yarn start"
|
||||
background: true
|
||||
- run:
|
||||
command: yarn wait-on http://localhost:3500
|
||||
- run:
|
||||
command: |
|
||||
CYPRESS_KONFIG_ENV=production \
|
||||
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
|
||||
yarn lerna exec --scope @packages/driver "yarn cypress:run --record --parallel --group 5x-driver-chrome --browser chrome"
|
||||
- store_test_results:
|
||||
path: /tmp/cypress
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts
|
||||
- store-npm-logs
|
||||
- run-driver-integration-tests:
|
||||
browser: chrome
|
||||
|
||||
# "driver-integration-tests-electron":
|
||||
# <<: *defaults
|
||||
# parallelism: 5
|
||||
# steps:
|
||||
# - attach_workspace:
|
||||
# at: ~/
|
||||
# - run:
|
||||
# command: npm start
|
||||
# background: true
|
||||
# working_directory: packages/driver
|
||||
# - run:
|
||||
# command: $(npm bin)/wait-on http://localhost:3500
|
||||
# working_directory: packages/driver
|
||||
# - run:
|
||||
# command: |
|
||||
# CYPRESS_KONFIG_ENV=production \
|
||||
# CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
|
||||
# npm run cypress:run --record --parallel --group 5x-driver-electron --browser electron
|
||||
# working_directory: packages/driver
|
||||
# - store_test_results:
|
||||
# path: /tmp/cypress
|
||||
# - store_artifacts:
|
||||
# path: /tmp/artifacts
|
||||
# - store-npm-logs
|
||||
# - run-driver-integration-tests:
|
||||
# browser: electron
|
||||
|
||||
"driver-integration-tests-firefox":
|
||||
<<: *defaults
|
||||
parallelism: 5
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
command: yarn workspace @packages/driver start
|
||||
background: true
|
||||
- run:
|
||||
command: $(yarn bin)/wait-on http://localhost:3500
|
||||
- run:
|
||||
command: |
|
||||
CYPRESS_KONFIG_ENV=production \
|
||||
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
|
||||
yarn lerna exec --scope @packages/driver "yarn cypress:run --record --parallel --group 5x-driver-firefox --browser firefox"
|
||||
- store_test_results:
|
||||
path: /tmp/cypress
|
||||
- store_artifacts:
|
||||
path: /tmp/artifacts
|
||||
- run-driver-integration-tests:
|
||||
browser: firefox
|
||||
|
||||
"desktop-gui-integration-tests-2x":
|
||||
<<: *defaults
|
||||
@@ -620,7 +601,8 @@ jobs:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
command: yarn workspace @packages/desktop-gui build-prod
|
||||
command: yarn build-prod
|
||||
working_directory: packages/desktop-gui
|
||||
- run:
|
||||
name: Desktop GUI server
|
||||
command: yarn start
|
||||
@@ -630,7 +612,9 @@ jobs:
|
||||
command: |
|
||||
CYPRESS_KONFIG_ENV=production \
|
||||
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
|
||||
yarn lerna exec --scope @packages/desktop-gui "yarn cypress:run --record --parallel --group 2x-desktop-gui"
|
||||
yarn cypress:run --record --parallel --group 2x-desktop-gui
|
||||
working_directory: packages/desktop-gui
|
||||
- verify-mocha-results
|
||||
- store_test_results:
|
||||
path: /tmp/cypress
|
||||
- store_artifacts:
|
||||
@@ -644,7 +628,8 @@ jobs:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
command: yarn lerna exec --scope @packages/desktop-gui "yarn build-prod"
|
||||
command: yarn build-prod
|
||||
working_directory: packages/desktop-gui
|
||||
- run:
|
||||
name: Desktop GUI server
|
||||
command: yarn start
|
||||
@@ -654,7 +639,9 @@ jobs:
|
||||
# will use PERCY_TOKEN environment variable if available
|
||||
command: |
|
||||
CYPRESS_KONFIG_ENV=production \
|
||||
yarn lerna exec --scope @packages/desktop-gui "yarn percy exec -- yarn cypress:run --spec cypress/integration/settings_spec.js"
|
||||
yarn percy exec -- yarn cypress:run --spec cypress/integration/settings_spec.js
|
||||
working_directory: packages/desktop-gui
|
||||
- verify-mocha-results
|
||||
# we don't really need any artifacts - we are only interested in visual screenshots
|
||||
- store-npm-logs
|
||||
|
||||
@@ -664,12 +651,15 @@ jobs:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
command: yarn workspace @packages/reporter build-for-tests
|
||||
command: yarn build-for-tests
|
||||
working_directory: packages/reporter
|
||||
- run:
|
||||
command: |
|
||||
CYPRESS_KONFIG_ENV=production \
|
||||
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
|
||||
yarn lerna exec --scope @packages/reporter "yarn cypress:run --record --parallel --group reporter"
|
||||
yarn cypress:run --record --parallel --group reporter
|
||||
working_directory: packages/reporter
|
||||
- verify-mocha-results
|
||||
- store_test_results:
|
||||
path: /tmp/cypress
|
||||
- store_artifacts:
|
||||
@@ -682,12 +672,15 @@ jobs:
|
||||
- attach_workspace:
|
||||
at: ~/
|
||||
- run:
|
||||
command: yarn workspace @packages/ui-components build-for-tests
|
||||
command: yarn build-for-tests
|
||||
working_directory: packages/ui-components
|
||||
- run:
|
||||
command: |
|
||||
CYPRESS_KONFIG_ENV=production \
|
||||
CYPRESS_RECORD_KEY=$PACKAGES_RECORD_KEY \
|
||||
yarn lerna exec --scope @packages/ui-components "yarn cypress:run --record --parallel --group ui-components"
|
||||
yarn cypress:run --record --parallel --group ui-components
|
||||
working_directory: packages/ui-components
|
||||
- verify-mocha-results
|
||||
- store_test_results:
|
||||
path: /tmp/cypress
|
||||
- store_artifacts:
|
||||
@@ -1087,7 +1080,6 @@ jobs:
|
||||
command: "npm run cypress:run"
|
||||
wait-on: "http://localhost:2222"
|
||||
|
||||
|
||||
"test-binary-against-realworld-firefox":
|
||||
<<: *defaults
|
||||
steps:
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
"baseUrl": "http://localhost:5005",
|
||||
"projectId": "ypt4pf",
|
||||
"viewportWidth": 800,
|
||||
"viewportHeight": 850
|
||||
"viewportHeight": 850,
|
||||
"reporter": "../../node_modules/cypress-multi-reporters/index.js",
|
||||
"reporterOptions": {
|
||||
"configFile": "../../mocha-reporter-config.json"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"bootstrap-sass": "3.4.1",
|
||||
"classnames": "2.2.6",
|
||||
"cross-env": "6.0.3",
|
||||
"cypress-multi-reporters": "1.2.4",
|
||||
"fira": "cypress-io/fira#fb63362742eea8cdce0d90825ab9264d77719e3d",
|
||||
"gravatar": "1.8.0",
|
||||
"human-interval": "0.1.6",
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
"clone": "2.1.2",
|
||||
"compression": "1.7.4",
|
||||
"cors": "2.8.5",
|
||||
"cypress-multi-reporters": "1.2.4",
|
||||
"debug": "4.1.1",
|
||||
"errorhandler": "1.5.1",
|
||||
"eventemitter2": "4.1.2",
|
||||
|
||||
@@ -3,5 +3,9 @@
|
||||
"baseUrl": "http://localhost:3500",
|
||||
"hosts": {
|
||||
"*.foobar.com": "127.0.0.1"
|
||||
},
|
||||
"reporter": "../../../node_modules/cypress-multi-reporters/index.js",
|
||||
"reporterOptions": {
|
||||
"configFile": "../../../mocha-reporter-config.json"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,5 +3,9 @@
|
||||
"viewportWidth": 400,
|
||||
"viewportHeight": 450,
|
||||
"supportFile": false,
|
||||
"pluginFile": false
|
||||
"pluginFile": false,
|
||||
"reporter": "../../node_modules/cypress-multi-reporters/index.js",
|
||||
"reporterOptions": {
|
||||
"configFile": "../../mocha-reporter-config.json"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"chai-enzyme": "1.0.0-beta.1",
|
||||
"classnames": "2.2.6",
|
||||
"css-element-queries": "1.2.3",
|
||||
"cypress-multi-reporters": "1.2.4",
|
||||
"enzyme": "3.11.0",
|
||||
"enzyme-adapter-react-16": "1.15.2",
|
||||
"jsdom": "14.1.0",
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{
|
||||
"fixturesFolder": false,
|
||||
"projectId": "ypt4pf"
|
||||
"projectId": "ypt4pf",
|
||||
"reporter": "../../node_modules/cypress-multi-reporters/index.js",
|
||||
"reporterOptions": {
|
||||
"configFile": "../../mocha-reporter-config.json"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
"babel-loader": "8.1.0",
|
||||
"browser-logos": "github:alrra/browser-logos",
|
||||
"classnames": "2.2.6",
|
||||
"cypress-multi-reporters": "1.2.4",
|
||||
"file-loader": "4.3.0",
|
||||
"lodash": "4.17.15",
|
||||
"prop-types": "15.7.2",
|
||||
|
||||
+4
-2
@@ -17,8 +17,10 @@ debug('starting the CLI in dev mode with args %o', {
|
||||
})
|
||||
|
||||
const exit = ({ exitCode }) => {
|
||||
if (typeof code !== 'number') {
|
||||
throw new Error(`missing exit code from execa (received ${exitCode})`)
|
||||
if (typeof exitCode !== 'number') {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`missing exit code from execa (received ${exitCode})`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
process.exit(exitCode)
|
||||
|
||||
@@ -8851,6 +8851,14 @@ cypress-example-kitchensink@1.9.1:
|
||||
npm-run-all "^4.1.2"
|
||||
serve "11.3.0"
|
||||
|
||||
cypress-multi-reporters@1.2.4:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/cypress-multi-reporters/-/cypress-multi-reporters-1.2.4.tgz#bf6c95f39f9d2ce210d83e096f452a306bcd49fc"
|
||||
integrity sha512-JTsF02I2KH1HM+cUEKeJih8EtjFv6jWVrYlRlJAnomwE5UqRQ3M7cAuw+zqBfNSTIvhOzNHtN3LyxomfhycuAQ==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
lodash "^4.17.11"
|
||||
|
||||
d@1, d@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a"
|
||||
|
||||
Reference in New Issue
Block a user