Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run e2e tests in both Chrome and Electron #5359

Merged
merged 35 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b0f6a17
Update circle.yml to run e2e tests in chrome + electron
flotwig Oct 11, 2019
c779902
Merge branch 'develop' into issue-5357-run-e2e-tests-in-all-browsers
brian-mann Oct 14, 2019
08127df
WIP: create multiple tests per browser, but utilizing the same base s…
brian-mann Oct 14, 2019
5a421ef
Add e2e.coffee to stop-only ignore
flotwig Oct 15, 2019
b240e15
Convert existing x-browser e2e tests to use e2e.it
flotwig Oct 15, 2019
3e4c798
update snapshots
flotwig Oct 15, 2019
68a0322
really add e2e to stop-only skip
flotwig Oct 15, 2019
f7a72c7
Replace screenshot dimensions in all tests, run only in process.env.B…
flotwig Oct 15, 2019
5277f37
add e2e.it to more tests that should be x-browser
flotwig Oct 15, 2019
cf3838c
update snapshots
flotwig Oct 15, 2019
ba33615
PEMDAS
flotwig Oct 15, 2019
3104f99
default e2e browser -> electron
flotwig Oct 15, 2019
8732aad
Revert "default e2e browser -> electron"
flotwig Oct 15, 2019
450c693
Undo
flotwig Oct 15, 2019
62780be
[email protected]
flotwig Oct 16, 2019
95b3af7
Remove snap-shot-it patch
flotwig Oct 16, 2019
c3aaf97
Change e2e snapshot to use allowSharedSnapshot
flotwig Oct 16, 2019
6a3225e
Add keepScreenshotDimensions to screenshot specs
flotwig Oct 16, 2019
322d806
update snapshots
flotwig Oct 16, 2019
36b5c74
fix snapshotit
flotwig Oct 16, 2019
ab00ecd
keepScreenshotDimensions: true -> sanitizeScreenshotDimensions: false
flotwig Oct 16, 2019
c217572
Fix screenshot snapshots
flotwig Oct 16, 2019
9f02b4d
reduce snapshot noise
brian-mann Oct 16, 2019
d735364
rm 0_simple_spec
flotwig Oct 16, 2019
7f77704
deabstract circle.yml command
flotwig Oct 16, 2019
6e89a4a
fix circle.yml
flotwig Oct 16, 2019
ea28829
reduce snapshot noise
brian-mann Oct 16, 2019
1d4ef8f
clean up 6_visit_spec snapshot
flotwig Oct 16, 2019
9055741
use allowSharedSnapshot: true in 5_spec_isolation
flotwig Oct 16, 2019
e76a38a
Fix 5_screenshots, 2_form_submissions
flotwig Oct 16, 2019
81c1bfd
Normalize screenshot sizes in 5_spec_isolation snapshot
flotwig Oct 16, 2019
76bbbae
Add sanitizeScreenshotDimensions only to non-e2e-project tests
flotwig Oct 16, 2019
b55326e
update snapshots
flotwig Oct 16, 2019
44b9992
Use e2e.it for chrome/electron-specific tests
flotwig Oct 16, 2019
ba62c27
handle logic for skipping tests when default browsers do not match sp…
brian-mann Oct 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
220 changes: 139 additions & 81 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ executors:
PLATFORM: mac

commands:
run-e2e-tests:
parameters:
browser:
description: browser shortname to target
type: string
chunk:
description: e2e test chunk number
type: integer
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk << parameters.chunk >> --browser << parameters.browser >>
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs

store-npm-logs:
description: Saves any NPM debug logs as artifacts in case there is a problem
steps:
Expand Down Expand Up @@ -331,101 +349,117 @@ jobs:
path: /tmp/artifacts
- store-npm-logs

"server-e2e-tests-1":
"server-e2e-tests-chrome-1":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 1
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs
- run-e2e-tests:
browser: chrome
chunk: 1

"server-e2e-tests-2":
"server-e2e-tests-chrome-2":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 2
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs
- run-e2e-tests:
browser: chrome
chunk: 2

"server-e2e-tests-3":
"server-e2e-tests-chrome-3":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 3
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- run-e2e-tests:
browser: chrome
chunk: 3

"server-e2e-tests-chrome-4":
<<: *defaults
steps:
- run-e2e-tests:
browser: chrome
chunk: 4

"server-e2e-tests-4":
"server-e2e-tests-chrome-5":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 4
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs
- run-e2e-tests:
browser: chrome
chunk: 5

"server-e2e-tests-5":
"server-e2e-tests-chrome-6":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 5
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs
- run-e2e-tests:
browser: chrome
chunk: 6

"server-e2e-tests-6":
"server-e2e-tests-chrome-7":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 6
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs
- run-e2e-tests:
browser: chrome
chunk: 7

"server-e2e-tests-7":
"server-e2e-tests-chrome-8":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 7
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs
- run-e2e-tests:
browser: chrome
chunk: 8

"server-e2e-tests-8":
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
command: npm run test-e2e -- --chunk 8
working_directory: packages/server
- store_test_results:
path: /tmp/cypress
- store-npm-logs
"server-e2e-tests-electron-1":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 1

"server-e2e-tests-electron-2":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 2

"server-e2e-tests-electron-3":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 3

"server-e2e-tests-electron-4":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 4

"server-e2e-tests-electron-5":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 5

"server-e2e-tests-electron-6":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 6

"server-e2e-tests-electron-7":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 7

"server-e2e-tests-electron-8":
<<: *defaults
steps:
- run-e2e-tests:
browser: electron
chunk: 8

"driver-integration-tests-chrome":
<<: *defaults
Expand Down Expand Up @@ -829,28 +863,52 @@ linux-workflow: &linux-workflow
- server-performance-tests:
requires:
- build
- server-e2e-tests-1:
- server-e2e-tests-chrome-1:
requires:
- build
- server-e2e-tests-chrome-2:
requires:
- build
- server-e2e-tests-chrome-3:
requires:
- build
- server-e2e-tests-chrome-4:
requires:
- build
- server-e2e-tests-chrome-5:
requires:
- build
- server-e2e-tests-chrome-6:
requires:
- build
- server-e2e-tests-chrome-7:
requires:
- build
- server-e2e-tests-chrome-8:
requires:
- build
- server-e2e-tests-electron-1:
requires:
- build
- server-e2e-tests-2:
- server-e2e-tests-electron-2:
requires:
- build
- server-e2e-tests-3:
- server-e2e-tests-electron-3:
requires:
- build
- server-e2e-tests-4:
- server-e2e-tests-electron-4:
requires:
- build
- server-e2e-tests-5:
- server-e2e-tests-electron-5:
requires:
- build
- server-e2e-tests-6:
- server-e2e-tests-electron-6:
requires:
- build
- server-e2e-tests-7:
- server-e2e-tests-electron-7:
requires:
- build
- server-e2e-tests-8:
- server-e2e-tests-electron-8:
requires:
- build
- driver-integration-tests-chrome:
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"proxyquire": "2.1.0",
"shelljs": "0.8.3",
"sinon": "7.2.2",
"snap-shot-it": "7.8.0",
"snap-shot-it": "7.9.0",
"spawn-mock": "1.0.0",
"strip-ansi": "4.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"set-next-ci-version": "node ./scripts/binary.js setNextVersion",
"prestart": "npm run check-deps-pre",
"start": "node ./cli/bin/cypress open --dev --global",
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components,spec_helper.coffee",
"stop-only": "npx stop-only --skip .cy,.publish,.projects,node_modules,dist,dist-test,fixtures,lib,bower_components --exclude e2e.coffee",
"stop-only-all": "npm run stop-only -- --folder packages",
"test": "echo '⚠️ This root monorepo is only for local development and new contributions. There are no tests.'",
"test-debug-package": "node ./scripts/test-debug-package.js",
Expand Down Expand Up @@ -152,7 +152,7 @@
"shelljs": "0.8.3",
"shx": "0.3.2",
"sinon": "7.3.2",
"snap-shot-it": "7.8.0",
"snap-shot-it": "7.9.0",
"stop-only": "3.0.1",
"strip-ansi": "4.0.0",
"terminal-banner": "1.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/server/__snapshots__/1_base_url_spec.coffee.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exports['e2e baseUrl https passes 1'] = `
exports['e2e baseUrl / https / passes'] = `

====================================================================================================

Expand Down Expand Up @@ -59,7 +59,7 @@ exports['e2e baseUrl https passes 1'] = `

`

exports['e2e baseUrl http passes 1'] = `
exports['e2e baseUrl / http / passes'] = `

====================================================================================================

Expand Down
Loading