Skip to content

Commit

Permalink
Merge branch 'develop' into unified-desktop-gui
Browse files Browse the repository at this point in the history
* 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]
  ...
  • Loading branch information
tgriesser committed Nov 3, 2021
2 parents e3720df + 28ae1c1 commit cc98a30
Show file tree
Hide file tree
Showing 128 changed files with 2,711 additions and 1,674 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ packages/example/cypress/integration

# from frontend-shared
packages/frontend-shared/cypress/e2e/.projects
packages/frontend-shared/src/public/shiki/themes/cypress.theme.json

# from server
packages/server/.cy
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ Independent packages are automatically released when code is merged into `master
![Select release for PR](https://user-images.githubusercontent.com/1271364/135139641-657015d6-2dca-42d4-a4fb-16478f61d63f.png)
- 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.
![Allow edits from maintainers checkbox](https://user-images.githubusercontent.com/1271181/31393427-b3105d44-ada9-11e7-80f2-0dac51e3919e.png)
- After the PR is approved, the original contributor can merge the PR (if the original contributor has access).
- 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.*

### Dependencies

Expand Down
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"chrome:beta": "95.0.4638.54",
"chrome:stable": "95.0.4638.54"
"chrome:beta": "96.0.4664.27",
"chrome:stable": "95.0.4638.69"
}
10 changes: 5 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ jobs:
fi
- wait-on-circle-jobs:
job-names: >
desktop-gui-integration-tests-2x,
desktop-gui-integration-tests-7x,
desktop-gui-component-tests,
cli-visual-tests,
runner-integration-tests-chrome,
Expand Down Expand Up @@ -1298,9 +1298,9 @@ jobs:
- run-driver-integration-tests:
browser: electron

desktop-gui-integration-tests-2x:
desktop-gui-integration-tests-7x:
<<: *defaults
parallelism: 2
parallelism: 7
steps:
- restore_cached_workspace
- run:
Expand Down Expand Up @@ -2208,7 +2208,7 @@ linux-workflow: &linux-workflow
# context: test-runner:launchpad-tests
# requires:
# - build
- desktop-gui-integration-tests-2x:
- desktop-gui-integration-tests-7x:
requires:
- build
- desktop-gui-component-tests:
Expand Down Expand Up @@ -2279,7 +2279,7 @@ linux-workflow: &linux-workflow
- reporter-integration-tests
- Linux lint
- desktop-gui-component-tests
- desktop-gui-integration-tests-2x
- desktop-gui-integration-tests-7x
- runner-ct-integration-tests-chrome
- runner-integration-tests-firefox
- runner-integration-tests-chrome
Expand Down
16 changes: 10 additions & 6 deletions cli/lib/cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check
const _ = require('lodash')
const R = require('ramda')
const commander = require('commander')
const { stripIndent } = require('common-tags')
const logSymbols = require('log-symbols')
Expand Down Expand Up @@ -283,12 +282,17 @@ const castCypressRunOptions = (opts) => {
// only properties that have type "string | false" in our TS definition
// require special handling, because CLI parsing takes care of purely
// boolean arguments
const result = R.evolve({
port: coerceAnyStringToInt,
configFile: coerceFalseOrString,
})(opts)
const castOpts = { ...opts }

return result
if (_.has(opts, 'port')) {
castOpts.port = coerceAnyStringToInt(opts.port)
}

if (_.has(opts, 'configFile')) {
castOpts.configFile = coerceFalseOrString(opts.configFile)
}

return castOpts
}

module.exports = {
Expand Down
3 changes: 1 addition & 2 deletions cli/lib/errors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const chalk = require('chalk')
const { stripIndent, stripIndents } = require('common-tags')
const { merge } = require('ramda')
const la = require('lazy-ass')
const is = require('check-more-types')

Expand Down Expand Up @@ -241,7 +240,7 @@ const CYPRESS_RUN_BINARY = {

function addPlatformInformation (info) {
return util.getPlatformInfo().then((platform) => {
return merge(info, { platform })
return { ...info, platform }
})
}

Expand Down
15 changes: 10 additions & 5 deletions cli/lib/exec/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const os = require('os')
const chalk = require('chalk')
const prettyBytes = require('pretty-bytes')
const _ = require('lodash')
const R = require('ramda')

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

const maskSensitiveVariables = R.evolve({
CYPRESS_RECORD_KEY: R.always('<redacted>'),
})
const maskSensitiveVariables = (obj) => {
const masked = { ...obj }

if (masked.CYPRESS_RECORD_KEY) {
masked.CYPRESS_RECORD_KEY = '<redacted>'
}

return masked
}

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

return R.pickBy(isCyVariable)(process.env)
return _.pickBy(process.env, isCyVariable)
}

const formatCypressVariables = () => {
Expand Down
5 changes: 3 additions & 2 deletions cli/lib/logger.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const R = require('ramda')
const chalk = require('chalk')

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

R.forEach(log, lines)
for (const line of lines) {
log(line)
}
}

const print = () => {
Expand Down
7 changes: 3 additions & 4 deletions cli/lib/tasks/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const _ = require('lodash')
const os = require('os')
const path = require('path')
const untildify = require('untildify')
const R = require('ramda')
const debug = require('debug')('cypress:cli')

const fs = require('../fs')
Expand Down Expand Up @@ -179,9 +178,9 @@ const getBinaryPkgAsync = (binaryDir) => {
})
}

const getBinaryPkgVersion = R.propOr(null, 'version')
const getBinaryElectronVersion = R.propOr(null, 'electronVersion')
const getBinaryElectronNodeVersion = R.propOr(null, 'electronNodeVersion')
const getBinaryPkgVersion = (o) => _.get(o, 'version', null)
const getBinaryElectronVersion = (o) => _.get(o, 'electronVersion', null)
const getBinaryElectronNodeVersion = (o) => _.get(o, 'electronNodeVersion', null)

module.exports = {
getPathToExecutable,
Expand Down
17 changes: 9 additions & 8 deletions cli/lib/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const _ = require('lodash')
const R = require('ramda')
const os = require('os')
const ospath = require('ospath')
const crypto = require('crypto')
Expand Down Expand Up @@ -114,10 +113,9 @@ const logBrokenGtkDisplayWarning = () => {
}

function stdoutLineMatches (expectedLine, stdout) {
const lines = stdout.split('\n').map(R.trim)
const lineMatches = R.equals(expectedLine)
const lines = stdout.split('\n').map((val) => val.trim())

return lines.some(lineMatches)
return lines.some((line) => line === expectedLine)
}

/**
Expand Down Expand Up @@ -232,11 +230,14 @@ const parseOpts = (opts) => {

// some options might be quoted - which leads to unexpected results
// remove double quotes from certain options
const removeQuotes = {
group: dequote,
ciBuildId: dequote,
const cleanOpts = { ...opts }
const toDequote = ['group', 'ciBuildId']

for (const prop of toDequote) {
if (_.has(opts, prop)) {
cleanOpts[prop] = dequote(opts[prop])
}
}
const cleanOpts = R.evolve(removeQuotes, opts)

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

Expand Down
1 change: 0 additions & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"ospath": "^1.2.2",
"pretty-bytes": "^5.6.0",
"proxy-from-env": "1.0.0",
"ramda": "~0.27.1",
"request-progress": "^3.0.0",
"supports-color": "^8.1.1",
"tmp": "~0.2.1",
Expand Down
5 changes: 5 additions & 0 deletions cli/schema/cypress.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
"default": null,
"description": "The reporter options used. Supported options depend on the reporter. See https://on.cypress.io/reporters#Reporter-Options"
},
"slowTestThreshold": {
"type": "number",
"default": 10000,
"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"
},
"testFiles": {
"type": [
"string",
Expand Down
3 changes: 1 addition & 2 deletions cli/test/lib/build_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ const makeUserPackageFile = require('../../scripts/build')
const snapshot = require('../support/snapshot')
const la = require('lazy-ass')
const is = require('check-more-types')
const R = require('ramda')

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

const changeVersion = R.assoc('version', 'x.y.z')
const changeVersion = (o) => ({ ...o, version: 'x.y.z' })

describe('package.json build', () => {
beforeEach(function () {
Expand Down
8 changes: 3 additions & 5 deletions cli/test/lib/cypress_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require('../spec_helper')

const os = require('os')
const path = require('path')
const R = require('ramda')
const _ = require('lodash')
const snapshot = require('../support/snapshot')
const Promise = require('bluebird')
const tmp = Promise.promisifyAll(require('tmp'))
Expand All @@ -27,11 +27,10 @@ describe('cypress', function () {
sinon.stub(open, 'start').resolves()
})

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

return getCallArgs(open.start)
return _.get(open.start, ['lastCall', 'args', 0])
}

it('calls open#start, passing in options', function () {
Expand Down Expand Up @@ -100,7 +99,6 @@ describe('cypress', function () {
})
})

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

return normalizeCallArgs(getCallArgs(run.start))
return normalizeCallArgs(_.get(run.start, ['lastCall', 'args', 0]))
}

it('calls run#start, passing in options', () => {
Expand Down
4 changes: 4 additions & 0 deletions cli/types/cypress-npm-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ declare namespace CypressCommandLine {
* Specify mocha reporter options
*/
reporterOptions: any
/**
* 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.
*/
slowTestThreshold: number
/**
* Specify the specs to run
*/
Expand Down
7 changes: 6 additions & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2577,6 +2577,11 @@ declare namespace Cypress {
* @default "spec"
*/
reporterOptions: { [key: string]: any }
/**
* 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.
* @default 10000
*/
slowTestThreshold: number
/**
* Whether Cypress will watch and restart tests on test file changes
* @default true
Expand Down Expand Up @@ -5672,7 +5677,7 @@ declare namespace Cypress {
xhr: XMLHttpRequest
}

type Encodings = 'ascii' | 'base64' | 'binary' | 'hex' | 'latin1' | 'utf8' | 'utf-8' | 'ucs2' | 'ucs-2' | 'utf16le' | 'utf-16le'
type Encodings = 'ascii' | 'base64' | 'binary' | 'hex' | 'latin1' | 'utf8' | 'utf-8' | 'ucs2' | 'ucs-2' | 'utf16le' | 'utf-16le' | null
type PositionType = 'topLeft' | 'top' | 'topRight' | 'left' | 'center' | 'right' | 'bottomLeft' | 'bottom' | 'bottomRight'
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'
interface Offset {
Expand Down
7 changes: 7 additions & 0 deletions npm/create-cypress-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [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)


### Bug Fixes

* revive type checker ([#18172](https://github.com/cypress-io/cypress/issues/18172)) ([af472b6](https://github.com/cypress-io/cypress/commit/af472b6419ecb2aec1abdb09df99b2fa5f56e033))

# [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)


Expand Down
14 changes: 14 additions & 0 deletions npm/cypress-schematic/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# [@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)


### Bug Fixes

* remove outdated registry link ([#18710](https://github.com/cypress-io/cypress/issues/18710)) ([e2a869d](https://github.com/cypress-io/cypress/commit/e2a869d2a984abb6703aec966dd9124ee693b8c1))

# [@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)


### Bug Fixes

* revive type checker ([#18172](https://github.com/cypress-io/cypress/issues/18172)) ([af472b6](https://github.com/cypress-io/cypress/commit/af472b6419ecb2aec1abdb09df99b2fa5f56e033))

# [@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)


Expand Down
3 changes: 1 addition & 2 deletions npm/cypress-schematic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
"testing"
],
"publishConfig": {
"access": "public",
"registry": "http://registry.npmjs.org/"
"access": "public"
},
"builders": "./src/builders/builders.json",
"ng-add": {
Expand Down
9 changes: 9 additions & 0 deletions npm/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [@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)


### Bug Fixes

* 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))
* remove outdated registry link ([#18710](https://github.com/cypress-io/cypress/issues/18710)) ([e2a869d](https://github.com/cypress-io/cypress/commit/e2a869d2a984abb6703aec966dd9124ee693b8c1))
* **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))

# [@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)


Expand Down
3 changes: 1 addition & 2 deletions npm/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@
}
},
"publishConfig": {
"access": "public",
"registry": "http://registry.npmjs.org/"
"access": "public"
},
"standard": {
"globals": [
Expand Down
Loading

0 comments on commit cc98a30

Please sign in to comment.