Skip to content

Commit bcc48f2

Browse files
committed
merged develop
2 parents 105b13c + 9ac5fe3 commit bcc48f2

File tree

206 files changed

+16041
-12083
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+16041
-12083
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
],
55
"extends": [
66
"plugin:@cypress/dev/general"
7-
]
7+
],
8+
"rules": {
9+
"prefer-spread": "off"
10+
}
811
}

.github/ISSUE_TEMPLATE.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
<!-- Is this a question? Don't open an issue. Ask in our chat https://on.cypress.io/chat -->
1+
<!-- Is this a question? Questions WILL BE CLOSED. Ask in our chat https://on.cypress.io/chat -->
22

33
### Current behavior:
44

5-
<!-- images, stack traces, etc -->
5+
<!-- A description including screenshots, stack traces, DEBUG logs, etc -->
66

77
### Desired behavior:
88

9-
<!-- A clear concise description of what you want to happen -->
9+
<!-- A clear description of what you want to happen -->
1010

11-
### Steps to reproduce: (app code and test code)
11+
### Test code to reproduce
1212

13-
<!-- Issues without reproducible steps WILL BE CLOSED -->
13+
<!-- If we cannot fully run the tests as provided the issue WILL BE CLOSED -->
14+
<!-- Issues without a reproducible example WILL BE CLOSED -->
1415

15-
<!-- You can fork https://github.com/cypress-io/cypress-test-tiny repo, set up a failing test, then tell us the repo/branch to try. -->
16+
<!-- You can fork https://github.com/cypress-io/cypress-test-tiny repo, set up a failing test, then link to your fork -->
1617

1718
### Versions
1819

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.0.0
1+
12.8.1

CONTRIBUTING.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ For some issues, there are places you can check for more information. This may h
8787

8888
### Fill out our Issue Template
8989

90-
When opening an issue, there is a provided [issue template](./ISSUE_TEMPLATE.md). Fill out the information according to the template. This is information needed for Cypress to continue forward with your problem. Any issues that do not follow the issue template will be closed.
90+
When opening an issue, there is a provided [issue template](./.github/ISSUE_TEMPLATE.md). Fill out the information according to the template. This is information needed for Cypress to continue forward with your problem. Any issues that do not follow the issue template will be closed.
9191

9292
### Describe Problems
9393

@@ -148,9 +148,9 @@ If an issue already exists you should:
148148

149149
### Does the issue provide all the information from our issue template?
150150

151-
When opening an issue, there is a provided [issue template](./ISSUE_TEMPLATE.md). If the opened issue does not provide enough information asked from the issue template you should:
151+
When opening an issue, there is a provided [issue template](./.github/ISSUE_TEMPLATE.md). If the opened issue does not provide enough information asked from the issue template you should:
152152

153-
- Explain that we require new issues follow our provided [issue template](./ISSUE_TEMPLATE.md) and that issues that are opened without this information are automatically closed per our [contributing guidelines](#fill-out-our-issue-template).
153+
- Explain that we require new issues follow our provided [issue template](./.github/ISSUE_TEMPLATE.md) and that issues that are opened without this information are automatically closed per our [contributing guidelines](#fill-out-our-issue-template).
154154
- Close the issue.
155155

156156
### Are they running the current version of Cypress?
@@ -268,6 +268,17 @@ You must have [`node`](https://nodejs.org/en/) and [`npm`](https://www.npmjs.com
268268

269269
### Getting Started
270270

271+
> **⚠ Running on Windows?**
272+
>
273+
> Many of the NPM scripts used during development use commands designed for a Linux-like shell.If you are running a Windows operating system, you may encounter many commands that are not working. To fix this behavior, you have to set a Linux-like shell as the default `npm` script shell. If you have Git for Windows installed, you can set Git Bash as the default script shell by using the following command:
274+
> ```bash
275+
> npm config set script-shell "C:\\Program Files (x86)\\git\\bin\\bash.exe"
276+
> ```
277+
> Git Bash may be installed in `Program Files`, if so, use the following command:
278+
>```bash
279+
>npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
280+
>```
281+
271282
**Install all dependencies:**
272283
273284
```bash
@@ -464,7 +475,7 @@ The repository is setup with two main (protected) branches.
464475
465476
### Pull Requests
466477
467-
- When opening a PR for a specific issue already open, please name the branch you are working on using the convention `issue-[issue number]`. For example, if your PR fixes Issue #803, name your branch `issue-803`. If the PR is a larger issue, you can add more context like `issue-803-new-scrollable-area` If there is not an associated open issue, **create an issue using our [Issue Template](./ISSUE_TEMPLATE.md)**.
478+
- When opening a PR for a specific issue already open, please name the branch you are working on using the convention `issue-[issue number]`. For example, if your PR fixes Issue #803, name your branch `issue-803`. If the PR is a larger issue, you can add more context like `issue-803-new-scrollable-area` If there is not an associated open issue, **create an issue using our [Issue Template](./.github/ISSUE_TEMPLATE.md)**.
468479
- PR's can be opened before all the work is finished. In fact we encourage this! Please write `[WIP]` in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the `[WIP]` is removed.
469480
- Fill out the [Pull Request Tempalte](./PULL_REQUEST_TEMPLATE.md) completely within the body of the PR. If you feel some areas are not relevant add `N/A` as opposed to deleteing those sections. PR's will not be reviewed if this template is not filled in.
470481
- Please check the "Allow edits from maintainers" checkbox when submitting your PR. This will make it easier for the maintainers to make minor adjustments, to help with tests or any other changes we may need.

DEPLOY.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ Once the `develop` branch for all test projects are reliably passing with the ne
104104

105105
### Steps to Publish a New Version
106106

107-
0. Make sure that if there is a new [`cypress-example-kitchensink`][https://github.com/cypress-io/cypress-example-kitchensink/releases] version, the corresponding dependency in [`packages/example`](./packages/example) has been updated to that new version.
107+
In the following instructions, "X.Y.Z" is used to denote the version of Cypress being published.
108+
109+
0. Make sure that if there is a new [`cypress-example-kitchensink`](https://github.com/cypress-io/cypress-example-kitchensink/releases) version, the corresponding dependency in [`packages/example`](./packages/example) has been updated to that new version.
108110
1. Make sure that you have the correct environment variables set up before proceeding.
109111
- You'll need Cypress AWS access keys in `aws_credentials_json`, which looks like this:
110112
```text
@@ -123,38 +125,45 @@ Once the `develop` branch for all test projects are reliably passing with the ne
123125
```
124126
3. Publish the new NPM package under the `dev` tag. The unique link to the package file `cypress.tgz` is the one already tested above. You can publish to the NPM registry straight from the URL:
125127
```shell
126-
npm publish https://cdn.../npm/3.4.0/<long sha>/cypress.tgz --tag dev
128+
npm publish https://cdn.../npm/X.Y.Z/<long sha>/cypress.tgz --tag dev
127129
```
128-
4. Double-check that the new version has been published under the `dev` tag using `npm info cypress` or [available-versions](https://github.com/bahmutov/available-versions):
130+
4. Double-check that the new version has been published under the `dev` tag using `npm info cypress` or [available-versions](https://github.com/bahmutov/available-versions). Example output:
129131
```shell
130132
dist-tags:
131133
dev: 3.4.0 latest: 3.3.2
132134
```
133-
5. Test `cypress@3.4.0` again to make sure everything is working. You can trigger test projects from the command line (if you have the appropriate permissions)
135+
5. Test `cypress@X.Y.Z` again to make sure everything is working. You can trigger test projects from the command line (if you have the appropriate permissions)
134136
```
135-
node scripts/test-other-projects.js --npm cypress@3.4.0 --binary 3.4.0
137+
node scripts/test-other-projects.js --npm cypress@X.Y.Z --binary X.Y.Z
136138
```
137139
6. Test the new version of Cypress against the Cypress dashboard repo.
138140
7. Update and publish the changelog and any release-specific documentation changes in [cypress-documentation](https://github.com/cypress-io/cypress-documentation).
139141
8. Make the new NPM version the "latest" version by updating the dist-tag `latest` to point to the new version:
140142
```shell
141-
npm dist-tag add cypress@3.4.0
143+
npm dist-tag add cypress@X.Y.Z
142144
```
143145
9. Run `binary-release` to update the download the server's manifest, set the next CI version, and create an empty version commit:
144146
```shell
145-
npm run binary-release -- --version 3.4.0 --commit`
147+
npm run binary-release -- --version X.Y.Z --commit
146148
```
147149
10. If needed, push out any updated changes to the links manifest to [`on.cypress.io`](https://github.com/cypress-io/cypress-services/tree/develop/packages/on).
148150
11. If needed, deploy the updated [`cypress-example-kitchensink`][cypress-example-kitchensink] to `example.cypress.io` by following [these instructions under "Deployment"](./packages/example/README.md).
149151
12. Update the releases in [ZenHub](https://app.zenhub.com/workspaces/test-runner-5c3ea3baeb1e75374f7b0708/reports/release):
150152
- Close the current release in ZenHub.
151153
- Create a new patch release (and a new minor release, if this is a minor release) in ZenHub, and schedule them both to be completed 2 weeks from the current date.
152-
13. Bump `version` in [`package.json`](package.json) and commit it to `develop` using a commit message like `release 3.4.0 [skip ci]`
153-
14. Tag this commit with `v3.4.0` and push that tag up.
154+
- Move all issues that are still open from the current release to the appropriate future release.
155+
13. Bump `version` in [`package.json`](package.json) and commit it to `develop` using a commit message like `release X.Y.Z [skip ci]`
156+
14. Tag this commit with `vX.Y.Z` and push that tag up.
154157
15. Merge `develop` into `master` and push that branch up.
155-
16. Using [cypress-io/release-automations][release-automations]:
156-
- Publish GitHub release to [cypress-io/cypress/releases](https://github.com/cypress-io/cypress/releases) using package `set-releases` (see its README for details).
157-
- Add a comment to each GH issue that has been resolved with the new published version using package `issues-in-release` (see its README for details)
158+
16. Inside of [cypress-io/release-automations][release-automations]:
159+
- Publish GitHub release to [cypress-io/cypress/releases](https://github.com/cypress-io/cypress/releases) using package `set-releases`:
160+
```shell
161+
cd set-releases && npm run release-log -- --version X.Y.Z
162+
```
163+
- Add a comment to each GH issue that has been resolved with the new published version using package `issues-in-release`:
164+
```shell
165+
cd issues-in-release && npm run do:comment -- --version X.Y.Z
166+
```
158167
17. Publish a new docker image in [`cypress-docker-images`](https://github.com/cypress-io/cypress-docker-images) under `included` for the new cypress version.
159168
18. Decide on the next version that we will work on. For example, if we have just released `3.7.0` we probably will work on `3.7.1` next. Set it on [CI machines](#set-next-version-on-cis).
160169
19. Try updating as many example projects to the new version. You probably want to update by using Renovate dependency issue like [`cypress-example-todomvc` "Update Dependencies (Renovate Bot)](https://github.com/cypress-io/cypress-example-todomvc/issues/99). Try updating at least the following projects:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ branches:
77
# https://www.appveyor.com/docs/lang/nodejs-iojs/
88
environment:
99
# use matching version of Node.js
10-
nodejs_version: "12.0.0"
10+
nodejs_version: "12.8.1"
1111
# encode secure variables which will NOT be used
1212
# in pull requests
1313
# https://www.appveyor.com/docs/build-configuration/#secure-variables

circle.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
version: 2.1
22

3+
# usually we don't build Mac app - it takes a long time
4+
# but sometimes we want to really confirm we are doing the right thing
5+
# so just add your branch to the list here to build and test on Mac
6+
macBuildFilters: &macBuildFilters
7+
filters:
8+
branches:
9+
only:
10+
- develop
11+
312
defaults: &defaults
413
parallelism: 1
514
working_directory: ~/cypress
@@ -19,11 +28,12 @@ defaults: &defaults
1928
COLUMNS: 100
2029
LINES: 24
2130

31+
2232
executors:
2333
# the Docker image with Cypress dependencies and Chrome browser
2434
cy-doc:
2535
docker:
26-
- image: cypress/browsers:node12.0.0-chrome73
36+
- image: cypress/browsers:node12.8.1-chrome78-ff70
2737
environment:
2838
PLATFORM: linux
2939

@@ -960,54 +970,71 @@ linux-workflow: &linux-workflow
960970
requires:
961971
- build
962972
- server-performance-tests:
973+
context: test-runner:performance-tracking
963974
requires:
964975
- build
965976
- server-e2e-tests-chrome-1:
977+
context: test-runner:performance-tracking
966978
requires:
967979
- build
968980
- server-e2e-tests-chrome-2:
981+
context: test-runner:performance-tracking
969982
requires:
970983
- build
971984
- server-e2e-tests-chrome-3:
985+
context: test-runner:performance-tracking
972986
requires:
973987
- build
974988
- server-e2e-tests-chrome-4:
989+
context: test-runner:performance-tracking
975990
requires:
976991
- build
977992
- server-e2e-tests-chrome-5:
993+
context: test-runner:performance-tracking
978994
requires:
979995
- build
980996
- server-e2e-tests-chrome-6:
997+
context: test-runner:performance-tracking
981998
requires:
982999
- build
9831000
- server-e2e-tests-chrome-7:
1001+
context: test-runner:performance-tracking
9841002
requires:
9851003
- build
9861004
- server-e2e-tests-chrome-8:
1005+
context: test-runner:performance-tracking
9871006
requires:
9881007
- build
9891008
- server-e2e-tests-electron-1:
1009+
context: test-runner:performance-tracking
9901010
requires:
9911011
- build
9921012
- server-e2e-tests-electron-2:
1013+
context: test-runner:performance-tracking
9931014
requires:
9941015
- build
9951016
- server-e2e-tests-electron-3:
1017+
context: test-runner:performance-tracking
9961018
requires:
9971019
- build
9981020
- server-e2e-tests-electron-4:
1021+
context: test-runner:performance-tracking
9991022
requires:
10001023
- build
10011024
- server-e2e-tests-electron-5:
1025+
context: test-runner:performance-tracking
10021026
requires:
10031027
- build
10041028
- server-e2e-tests-electron-6:
1029+
context: test-runner:performance-tracking
10051030
requires:
10061031
- build
10071032
- server-e2e-tests-electron-7:
1033+
context: test-runner:performance-tracking
10081034
requires:
10091035
- build
10101036
- server-e2e-tests-electron-8:
1037+
context: test-runner:performance-tracking
10111038
requires:
10121039
- build
10131040
- driver-integration-tests-chrome:
@@ -1059,6 +1086,7 @@ linux-workflow: &linux-workflow
10591086
requires:
10601087
- build-npm-package
10611088
- build-binary:
1089+
context: test-runner:performance-tracking
10621090
requires:
10631091
- build
10641092
- upload-binary:
@@ -1120,20 +1148,14 @@ mac-workflow: &mac-workflow
11201148
- build:
11211149
name: Mac build
11221150
executor: mac
1123-
filters:
1124-
branches:
1125-
only:
1126-
- develop
1151+
<<: *macBuildFilters
11271152

11281153
- lint:
11291154
name: Mac lint
11301155
executor: mac
1156+
<<: *macBuildFilters
11311157
requires:
11321158
- Mac build
1133-
filters:
1134-
branches:
1135-
only:
1136-
- develop
11371159

11381160
# maybe run unit tests?
11391161

@@ -1162,10 +1184,7 @@ mac-workflow: &mac-workflow
11621184
name: Mac binary
11631185
context: org-global
11641186
executor: mac
1165-
filters:
1166-
branches:
1167-
only:
1168-
- develop
1187+
<<: *macBuildFilters
11691188
requires:
11701189
- Mac build
11711190

@@ -1183,10 +1202,7 @@ mac-workflow: &mac-workflow
11831202
- test-kitchensink:
11841203
name: Test Mac Kitchensink
11851204
executor: mac
1186-
filters:
1187-
branches:
1188-
only:
1189-
- develop
1205+
<<: *macBuildFilters
11901206
requires:
11911207
- Mac build
11921208

cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ See `scripts/build.js`. Note that the built npm package will include [NPM_README
2828

2929
## Testing
3030

31-
## Automated
31+
### Automated
3232

3333
You can run unit tests with:
3434

cli/__snapshots__/cli_spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ exports['shows help for run --foo 1'] = `
6969
-e, --env <env> sets environment variables. separate multiple values with a comma. overrides any value in cypress.json or cypress.env.json
7070
--group <name> a named group for recorded runs in the Cypress Dashboard
7171
-k, --key <record-key> your secret Record Key. you can omit this if you set a CYPRESS_RECORD_KEY environment variable.
72-
--headed displays the Electron browser instead of running headlessly
72+
--headed displays the browser instead of running headlessly (defaults to true for Chrome-family browsers)
73+
--headless hide the browser instead of running headed (defaults to true for Electron)
7374
--no-exit keep the browser open after tests finish
7475
--parallel enables concurrent runs and automatic load balancing of specs across multiple machines or processes
7576
-p, --port <port> runs Cypress on a specific port. overrides any value in cypress.json.

cli/__snapshots__/errors_spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ exports['errors individual has the following errors 1'] = [
3232
"childProcessKilled",
3333
"failedDownload",
3434
"failedUnzip",
35+
"incompatibleHeadlessFlags",
3536
"invalidCacheDirectory",
3637
"invalidCypressEnv",
3738
"invalidSmokeTestDisplayError",

cli/lib/cli.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const _ = require('lodash')
22
const commander = require('commander')
33
const { stripIndent } = require('common-tags')
44
const logSymbols = require('log-symbols')
5-
const debug = require('debug')('cypress:cli')
5+
const debug = require('debug')('cypress:cli:cli')
66
const util = require('./util')
77
const logger = require('./logger')
88
const errors = require('./errors')
@@ -82,6 +82,8 @@ const parseVariableOpts = (fnArgs, args) => {
8282
})
8383
}
8484

85+
debug('variable-length opts parsed %o', { args, opts })
86+
8587
return util.parseOpts(opts)
8688
}
8789

@@ -101,7 +103,8 @@ const descriptions = {
101103
forceInstall: 'force install the Cypress binary',
102104
global: 'force Cypress into global mode as if its globally installed',
103105
group: 'a named group for recorded runs in the Cypress Dashboard',
104-
headed: 'displays the Electron browser instead of running headlessly',
106+
headed: 'displays the browser instead of running headlessly (defaults to true for Chrome-family browsers)',
107+
headless: 'hide the browser instead of running headed (defaults to true for Electron)',
105108
key: 'your secret Record Key. you can omit this if you set a CYPRESS_RECORD_KEY environment variable.',
106109
parallel: 'enables concurrent runs and automatic load balancing of specs across multiple machines or processes',
107110
port: 'runs Cypress on a specific port. overrides any value in cypress.json.',
@@ -204,6 +207,7 @@ module.exports = {
204207
.option('--group <name>', text('group'))
205208
.option('-k, --key <record-key>', text('key'))
206209
.option('--headed', text('headed'))
210+
.option('--headless', text('headless'))
207211
.option('--no-exit', text('exit'))
208212
.option('--parallel', text('parallel'))
209213
.option('-p, --port <port>', text('port'))
@@ -215,7 +219,7 @@ module.exports = {
215219
.option('-t, --tag <tag>', text('tag'))
216220
.option('--dev', text('dev'), coerceFalse)
217221
.action((...fnArgs) => {
218-
debug('running Cypress')
222+
debug('running Cypress with args %o', fnArgs)
219223
require('./exec/run')
220224
.start(parseVariableOpts(fnArgs, args))
221225
.then(util.exit)

0 commit comments

Comments
 (0)