Skip to content

Commit cc98a30

Browse files
committed
Merge branch 'develop' into unified-desktop-gui
* develop: (40 commits) fix(driver): Sticky elements within a fixed container will not prevent an element from being scrolled to (#18441) chore: make `create` function on server.ts obsolete (#18615) docs: Add instructions to squash commits to develop in Contributing (#18728) fix(@cypress/react): throw if using Next.js swc-loader without nodeVersion=system (#18686) refactor: remove Ramda (#18723) chore: Increase paralleled machines for desktop-gui tests (#18725) chore: Update Chrome (stable) to 95.0.4638.69 (#18696) chore: release @cypress/vue-v3.0.4 chore: release @cypress/react-v5.10.2 chore: release @cypress/schematic-v1.5.3 fix: remove outdated registry link (#18710) chore: release @cypress/schematic-v1.5.2 chore: release create-cypress-tests-v1.1.3 chore: Update Chrome (beta) to 96.0.4664.27 (#18676) chore(tests): Remove flaky assertion that relies on png how compression (#18668) fix: make sure to go back to no-specs when delete spec file (#17760) fix: Next.JS 12 components testing failing with ` TypeError: Cannot read property 'traceChild' of undefined` (#18648) Backport .gitignore from unified-desktop-gui chore(docs): add 'Upgrading Electron' instructions (#18594) release 8.7.0 [skip ci] ...
2 parents e3720df + 28ae1c1 commit cc98a30

File tree

128 files changed

+2711
-1674
lines changed

Some content is hidden

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

128 files changed

+2711
-1674
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ packages/example/cypress/integration
5252

5353
# from frontend-shared
5454
packages/frontend-shared/cypress/e2e/.projects
55+
packages/frontend-shared/src/public/shiki/themes/cypress.theme.json
5556

5657
# from server
5758
packages/server/.cy

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,8 @@ Independent packages are automatically released when code is merged into `master
573573
![Select release for PR](https://user-images.githubusercontent.com/1271364/135139641-657015d6-2dca-42d4-a4fb-16478f61d63f.png)
574574
- 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.
575575
![Allow edits from maintainers checkbox](https://user-images.githubusercontent.com/1271181/31393427-b3105d44-ada9-11e7-80f2-0dac51e3919e.png)
576+
- After the PR is approved, the original contributor can merge the PR (if the original contributor has access).
577+
- When you merge a PR into `develop`, select [**Squash and merge**](https://docs.github.com/en/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-pull-request-commits). This will squash all commits into a single commit. *The only exception to squashing is when converting files to another language and there is a clear commit history needed to maintain from the file conversion.*
576578
577579
### Dependencies
578580

browser-versions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"chrome:beta": "95.0.4638.54",
3-
"chrome:stable": "95.0.4638.54"
2+
"chrome:beta": "96.0.4664.27",
3+
"chrome:stable": "95.0.4638.69"
44
}

circle.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ jobs:
10201020
fi
10211021
- wait-on-circle-jobs:
10221022
job-names: >
1023-
desktop-gui-integration-tests-2x,
1023+
desktop-gui-integration-tests-7x,
10241024
desktop-gui-component-tests,
10251025
cli-visual-tests,
10261026
runner-integration-tests-chrome,
@@ -1298,9 +1298,9 @@ jobs:
12981298
- run-driver-integration-tests:
12991299
browser: electron
13001300

1301-
desktop-gui-integration-tests-2x:
1301+
desktop-gui-integration-tests-7x:
13021302
<<: *defaults
1303-
parallelism: 2
1303+
parallelism: 7
13041304
steps:
13051305
- restore_cached_workspace
13061306
- run:
@@ -2208,7 +2208,7 @@ linux-workflow: &linux-workflow
22082208
# context: test-runner:launchpad-tests
22092209
# requires:
22102210
# - build
2211-
- desktop-gui-integration-tests-2x:
2211+
- desktop-gui-integration-tests-7x:
22122212
requires:
22132213
- build
22142214
- desktop-gui-component-tests:
@@ -2279,7 +2279,7 @@ linux-workflow: &linux-workflow
22792279
- reporter-integration-tests
22802280
- Linux lint
22812281
- desktop-gui-component-tests
2282-
- desktop-gui-integration-tests-2x
2282+
- desktop-gui-integration-tests-7x
22832283
- runner-ct-integration-tests-chrome
22842284
- runner-integration-tests-firefox
22852285
- runner-integration-tests-chrome

cli/lib/cli.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// @ts-check
22
const _ = require('lodash')
3-
const R = require('ramda')
43
const commander = require('commander')
54
const { stripIndent } = require('common-tags')
65
const logSymbols = require('log-symbols')
@@ -283,12 +282,17 @@ const castCypressRunOptions = (opts) => {
283282
// only properties that have type "string | false" in our TS definition
284283
// require special handling, because CLI parsing takes care of purely
285284
// boolean arguments
286-
const result = R.evolve({
287-
port: coerceAnyStringToInt,
288-
configFile: coerceFalseOrString,
289-
})(opts)
285+
const castOpts = { ...opts }
290286

291-
return result
287+
if (_.has(opts, 'port')) {
288+
castOpts.port = coerceAnyStringToInt(opts.port)
289+
}
290+
291+
if (_.has(opts, 'configFile')) {
292+
castOpts.configFile = coerceFalseOrString(opts.configFile)
293+
}
294+
295+
return castOpts
292296
}
293297

294298
module.exports = {

cli/lib/errors.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const chalk = require('chalk')
22
const { stripIndent, stripIndents } = require('common-tags')
3-
const { merge } = require('ramda')
43
const la = require('lazy-ass')
54
const is = require('check-more-types')
65

@@ -241,7 +240,7 @@ const CYPRESS_RUN_BINARY = {
241240

242241
function addPlatformInformation (info) {
243242
return util.getPlatformInfo().then((platform) => {
244-
return merge(info, { platform })
243+
return { ...info, platform }
245244
})
246245
}
247246

cli/lib/exec/info.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const os = require('os')
66
const chalk = require('chalk')
77
const prettyBytes = require('pretty-bytes')
88
const _ = require('lodash')
9-
const R = require('ramda')
109

1110
// color for numbers and show values
1211
const g = chalk.green
@@ -22,14 +21,20 @@ methods.findProxyEnvironmentVariables = () => {
2221
return _.pick(process.env, ['HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY'])
2322
}
2423

25-
const maskSensitiveVariables = R.evolve({
26-
CYPRESS_RECORD_KEY: R.always('<redacted>'),
27-
})
24+
const maskSensitiveVariables = (obj) => {
25+
const masked = { ...obj }
26+
27+
if (masked.CYPRESS_RECORD_KEY) {
28+
masked.CYPRESS_RECORD_KEY = '<redacted>'
29+
}
30+
31+
return masked
32+
}
2833

2934
methods.findCypressEnvironmentVariables = () => {
3035
const isCyVariable = (val, key) => key.startsWith('CYPRESS_')
3136

32-
return R.pickBy(isCyVariable)(process.env)
37+
return _.pickBy(process.env, isCyVariable)
3338
}
3439

3540
const formatCypressVariables = () => {

cli/lib/logger.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const R = require('ramda')
21
const chalk = require('chalk')
32

43
let logs = []
@@ -36,7 +35,9 @@ const always = (...messages) => {
3635
const logLines = (text) => {
3736
const lines = text.split('\n')
3837

39-
R.forEach(log, lines)
38+
for (const line of lines) {
39+
log(line)
40+
}
4041
}
4142

4243
const print = () => {

cli/lib/tasks/state.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const _ = require('lodash')
22
const os = require('os')
33
const path = require('path')
44
const untildify = require('untildify')
5-
const R = require('ramda')
65
const debug = require('debug')('cypress:cli')
76

87
const fs = require('../fs')
@@ -179,9 +178,9 @@ const getBinaryPkgAsync = (binaryDir) => {
179178
})
180179
}
181180

182-
const getBinaryPkgVersion = R.propOr(null, 'version')
183-
const getBinaryElectronVersion = R.propOr(null, 'electronVersion')
184-
const getBinaryElectronNodeVersion = R.propOr(null, 'electronNodeVersion')
181+
const getBinaryPkgVersion = (o) => _.get(o, 'version', null)
182+
const getBinaryElectronVersion = (o) => _.get(o, 'electronVersion', null)
183+
const getBinaryElectronNodeVersion = (o) => _.get(o, 'electronNodeVersion', null)
185184

186185
module.exports = {
187186
getPathToExecutable,

cli/lib/util.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const _ = require('lodash')
2-
const R = require('ramda')
32
const os = require('os')
43
const ospath = require('ospath')
54
const crypto = require('crypto')
@@ -114,10 +113,9 @@ const logBrokenGtkDisplayWarning = () => {
114113
}
115114

116115
function stdoutLineMatches (expectedLine, stdout) {
117-
const lines = stdout.split('\n').map(R.trim)
118-
const lineMatches = R.equals(expectedLine)
116+
const lines = stdout.split('\n').map((val) => val.trim())
119117

120-
return lines.some(lineMatches)
118+
return lines.some((line) => line === expectedLine)
121119
}
122120

123121
/**
@@ -232,11 +230,14 @@ const parseOpts = (opts) => {
232230

233231
// some options might be quoted - which leads to unexpected results
234232
// remove double quotes from certain options
235-
const removeQuotes = {
236-
group: dequote,
237-
ciBuildId: dequote,
233+
const cleanOpts = { ...opts }
234+
const toDequote = ['group', 'ciBuildId']
235+
236+
for (const prop of toDequote) {
237+
if (_.has(opts, prop)) {
238+
cleanOpts[prop] = dequote(opts[prop])
239+
}
238240
}
239-
const cleanOpts = R.evolve(removeQuotes, opts)
240241

241242
debug('parsed cli options %o', cleanOpts)
242243

cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"ospath": "^1.2.2",
5656
"pretty-bytes": "^5.6.0",
5757
"proxy-from-env": "1.0.0",
58-
"ramda": "~0.27.1",
5958
"request-progress": "^3.0.0",
6059
"supports-color": "^8.1.1",
6160
"tmp": "~0.2.1",

cli/schema/cypress.schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"default": null,
4545
"description": "The reporter options used. Supported options depend on the reporter. See https://on.cypress.io/reporters#Reporter-Options"
4646
},
47+
"slowTestThreshold": {
48+
"type": "number",
49+
"default": 10000,
50+
"description": "Slow test threshold in milliseconds. Only affects the visual output of some reporters. For example, the spec reporter will display the test time in yellow if over the threshold. See https://on.cypress.io/configuration#Timeouts"
51+
},
4752
"testFiles": {
4853
"type": [
4954
"string",

cli/test/lib/build_spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ const makeUserPackageFile = require('../../scripts/build')
55
const snapshot = require('../support/snapshot')
66
const la = require('lazy-ass')
77
const is = require('check-more-types')
8-
const R = require('ramda')
98

109
const hasVersion = (json) => {
1110
return la(is.semver(json.version), 'cannot find version', json)
1211
}
1312

14-
const changeVersion = R.assoc('version', 'x.y.z')
13+
const changeVersion = (o) => ({ ...o, version: 'x.y.z' })
1514

1615
describe('package.json build', () => {
1716
beforeEach(function () {

cli/test/lib/cypress_spec.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require('../spec_helper')
22

33
const os = require('os')
44
const path = require('path')
5-
const R = require('ramda')
5+
const _ = require('lodash')
66
const snapshot = require('../support/snapshot')
77
const Promise = require('bluebird')
88
const tmp = Promise.promisifyAll(require('tmp'))
@@ -27,11 +27,10 @@ describe('cypress', function () {
2727
sinon.stub(open, 'start').resolves()
2828
})
2929

30-
const getCallArgs = R.path(['lastCall', 'args', 0])
3130
const getStartArgs = () => {
3231
expect(open.start).to.be.called
3332

34-
return getCallArgs(open.start)
33+
return _.get(open.start, ['lastCall', 'args', 0])
3534
}
3635

3736
it('calls open#start, passing in options', function () {
@@ -100,7 +99,6 @@ describe('cypress', function () {
10099
})
101100
})
102101

103-
const getCallArgs = R.path(['lastCall', 'args', 0])
104102
const normalizeCallArgs = (args) => {
105103
expect(args.outputPath).to.equal(outputPath)
106104
delete args.outputPath
@@ -110,7 +108,7 @@ describe('cypress', function () {
110108
const getStartArgs = () => {
111109
expect(run.start).to.be.called
112110

113-
return normalizeCallArgs(getCallArgs(run.start))
111+
return normalizeCallArgs(_.get(run.start, ['lastCall', 'args', 0]))
114112
}
115113

116114
it('calls run#start, passing in options', () => {

cli/types/cypress-npm-api.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ declare namespace CypressCommandLine {
9191
* Specify mocha reporter options
9292
*/
9393
reporterOptions: any
94+
/**
95+
* Slow test threshold in milliseconds. Only affects the visual output of some reporters. For example, the spec reporter will display the test time in yellow if over the threshold.
96+
*/
97+
slowTestThreshold: number
9498
/**
9599
* Specify the specs to run
96100
*/

cli/types/cypress.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2577,6 +2577,11 @@ declare namespace Cypress {
25772577
* @default "spec"
25782578
*/
25792579
reporterOptions: { [key: string]: any }
2580+
/**
2581+
* Slow test threshold in milliseconds. Only affects the visual output of some reporters. For example, the spec reporter will display the test time in yellow if over the threshold.
2582+
* @default 10000
2583+
*/
2584+
slowTestThreshold: number
25802585
/**
25812586
* Whether Cypress will watch and restart tests on test file changes
25822587
* @default true
@@ -5672,7 +5677,7 @@ declare namespace Cypress {
56725677
xhr: XMLHttpRequest
56735678
}
56745679

5675-
type Encodings = 'ascii' | 'base64' | 'binary' | 'hex' | 'latin1' | 'utf8' | 'utf-8' | 'ucs2' | 'ucs-2' | 'utf16le' | 'utf-16le'
5680+
type Encodings = 'ascii' | 'base64' | 'binary' | 'hex' | 'latin1' | 'utf8' | 'utf-8' | 'ucs2' | 'ucs-2' | 'utf16le' | 'utf-16le' | null
56765681
type PositionType = 'topLeft' | 'top' | 'topRight' | 'left' | 'center' | 'right' | 'bottomLeft' | 'bottom' | 'bottomRight'
56775682
type ViewportPreset = 'macbook-16' | 'macbook-15' | 'macbook-13' | 'macbook-11' | 'ipad-2' | 'ipad-mini' | 'iphone-xr' | 'iphone-x' | 'iphone-6+' | 'iphone-se2' | 'iphone-8' | 'iphone-7' | 'iphone-6' | 'iphone-5' | 'iphone-4' | 'iphone-3' | 'samsung-s10' | 'samsung-note9'
56785683
interface Offset {

npm/create-cypress-tests/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [create-cypress-tests-v1.1.3](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v1.1.2...create-cypress-tests-v1.1.3) (2021-10-29)
2+
3+
4+
### Bug Fixes
5+
6+
* revive type checker ([#18172](https://github.com/cypress-io/cypress/issues/18172)) ([af472b6](https://github.com/cypress-io/cypress/commit/af472b6419ecb2aec1abdb09df99b2fa5f56e033))
7+
18
# [create-cypress-tests-v1.1.2](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v1.1.1...create-cypress-tests-v1.1.2) (2021-06-17)
29

310

npm/cypress-schematic/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [@cypress/schematic-v1.5.3](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.2...@cypress/schematic-v1.5.3) (2021-10-29)
2+
3+
4+
### Bug Fixes
5+
6+
* remove outdated registry link ([#18710](https://github.com/cypress-io/cypress/issues/18710)) ([e2a869d](https://github.com/cypress-io/cypress/commit/e2a869d2a984abb6703aec966dd9124ee693b8c1))
7+
8+
# [@cypress/schematic-v1.5.2](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.1...@cypress/schematic-v1.5.2) (2021-10-29)
9+
10+
11+
### Bug Fixes
12+
13+
* revive type checker ([#18172](https://github.com/cypress-io/cypress/issues/18172)) ([af472b6](https://github.com/cypress-io/cypress/commit/af472b6419ecb2aec1abdb09df99b2fa5f56e033))
14+
115
# [@cypress/schematic-v1.5.1](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.0...@cypress/schematic-v1.5.1) (2021-09-10)
216

317

npm/cypress-schematic/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
"testing"
5353
],
5454
"publishConfig": {
55-
"access": "public",
56-
"registry": "http://registry.npmjs.org/"
55+
"access": "public"
5756
},
5857
"builders": "./src/builders/builders.json",
5958
"ng-add": {

npm/react/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# [@cypress/react-v5.10.2](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.10.1...@cypress/react-v5.10.2) (2021-10-29)
2+
3+
4+
### Bug Fixes
5+
6+
* Next.JS 12 components testing failing with ` TypeError: Cannot read property 'traceChild' of undefined` ([#18648](https://github.com/cypress-io/cypress/issues/18648)) ([cb0cbdf](https://github.com/cypress-io/cypress/commit/cb0cbdf4c35da09a7dedcc4563a242cb4748e994))
7+
* remove outdated registry link ([#18710](https://github.com/cypress-io/cypress/issues/18710)) ([e2a869d](https://github.com/cypress-io/cypress/commit/e2a869d2a984abb6703aec966dd9124ee693b8c1))
8+
* **cypress/react:** disable react-refresh for craco setups ([#18517](https://github.com/cypress-io/cypress/issues/18517)) ([ea10795](https://github.com/cypress-io/cypress/commit/ea1079559473fc672b5e0e188b5b54bf8ebe2f98))
9+
110
# [@cypress/react-v5.10.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.10.0...@cypress/react-v5.10.1) (2021-10-04)
211

312

npm/react/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@
178178
}
179179
},
180180
"publishConfig": {
181-
"access": "public",
182-
"registry": "http://registry.npmjs.org/"
181+
"access": "public"
183182
},
184183
"standard": {
185184
"globals": [

0 commit comments

Comments
 (0)