Skip to content

Commit 8311cf1

Browse files
authored
chore(deps): Updating electron to v18 + node v16.13.2 (#21418)
* chore: Updating electron to v18 + node v16.13.2 * Updating origin test, it needs to be fixed a different way * Removing origin workaround for config_env specs, it should not be necessary. * Removing now-unused semver dependency
1 parent 770b962 commit 8311cf1

File tree

33 files changed

+153
-155
lines changed

33 files changed

+153
-155
lines changed

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.5.0
1+
16.13.2

circle.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ macWorkflowFilters: &mac-workflow-filters
3939
or:
4040
- equal: [ develop, << pipeline.git.branch >> ]
4141
- equal: [ check-results-for-env, << pipeline.git.branch >> ]
42+
- equal: [ tbiethman/chore/electron-18-update, << pipeline.git.branch >> ]
4243
- matches:
4344
pattern: "-release$"
4445
value: << pipeline.git.branch >>
@@ -49,6 +50,7 @@ windowsWorkflowFilters: &windows-workflow-filters
4950
- equal: [ master, << pipeline.git.branch >> ]
5051
- equal: [ develop, << pipeline.git.branch >> ]
5152
- equal: [ check-results-for-env, << pipeline.git.branch >> ]
53+
- equal: [ tbiethman/chore/electron-18-update, << pipeline.git.branch >> ]
5254
- matches:
5355
pattern: "-release$"
5456
value: << pipeline.git.branch >>
@@ -60,7 +62,7 @@ executors:
6062
# the Docker image with Cypress dependencies and Chrome browser
6163
cy-doc:
6264
docker:
63-
- image: cypress/browsers:node16.5.0-chrome94-ff93
65+
- image: cypress/browsers:node16.13.2-chrome100-ff98
6466
# by default, we use "small" to save on CI costs. bump on a per-job basis if needed.
6567
resource_class: small
6668
environment:
@@ -69,7 +71,7 @@ executors:
6971
# Docker image with non-root "node" user
7072
non-root-docker-user:
7173
docker:
72-
- image: cypress/browsers:node16.5.0-chrome94-ff93
74+
- image: cypress/browsers:node16.13.2-chrome100-ff98
7375
user: node
7476
environment:
7577
PLATFORM: linux
@@ -371,8 +373,10 @@ commands:
371373
npm install yarn -g # ensure yarn is installed with the correct node engine
372374
yarn check-node-version
373375
- run:
374-
name: Check Node
375-
command: yarn check-node-version
376+
name: Check Node
377+
command: |
378+
[ -s "${HOME}/.nvm/nvm.sh" ] && \. "${HOME}/.nvm/nvm.sh"
379+
yarn check-node-version
376380
377381
install-chrome:
378382
description: Install Google Chrome
@@ -589,7 +593,11 @@ commands:
589593
## by default, assert that at least 1 test ran
590594
default: 0
591595
steps:
592-
- run: yarn verify:mocha:results <<parameters.expectedResultCount>>
596+
- run:
597+
name: 'Verify Mocha Results'
598+
command: |
599+
[ -s "${HOME}/.nvm/nvm.sh" ] && \. "${HOME}/.nvm/nvm.sh"
600+
yarn verify:mocha:results <<parameters.expectedResultCount>>
593601
594602
clone-repo-and-checkout-release-branch:
595603
description: |
@@ -896,7 +904,9 @@ commands:
896904
yarn binary-build --platform $PLATFORM --version $(node ./scripts/get-next-version.js)
897905
- run:
898906
name: Zip the binary
899-
command: yarn binary-zip --platform $PLATFORM
907+
command: |
908+
apt-get update && apt-get install -y zip
909+
yarn binary-zip --platform $PLATFORM
900910
- store-npm-logs
901911
- persist_to_workspace:
902912
root: ~/
@@ -1247,7 +1257,7 @@ jobs:
12471257

12481258
runner-integration-tests-firefox:
12491259
<<: *defaults
1250-
resource_class: medium
1260+
resource_class: medium+
12511261
parallelism: 2
12521262
steps:
12531263
- run-runner-integration-tests:

cli/test/lib/util_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ describe('util', () => {
267267
})
268268

269269
it('copy NODE_OPTIONS to ORIGINAL_NODE_OPTIONS', () => {
270-
sandbox.stub(process.versions, 'node').value('v16.5.0')
270+
sandbox.stub(process.versions, 'node').value('v16.13.2')
271271
sandbox.stub(process.versions, 'openssl').value('1.0.0')
272272

273273
restoreEnv = mockedEnv({
@@ -322,7 +322,7 @@ describe('util', () => {
322322

323323
// https://github.com/cypress-io/cypress/issues/18914
324324
it('does not include --openssl-legacy-provider in Node <=16', () => {
325-
sandbox.stub(process.versions, 'node').value('v16.5.0')
325+
sandbox.stub(process.versions, 'node').value('v16.13.2')
326326
sandbox.stub(process.versions, 'openssl').value('1.0.0')
327327

328328
restoreEnv = mockedEnv({})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
"yarn-deduplicate": "3.1.0"
170170
},
171171
"engines": {
172-
"node": ">=16.5.0",
172+
"node": ">=16.13.2",
173173
"yarn": ">=1.17.3"
174174
},
175175
"productName": "Cypress",

packages/driver/cypress/fixtures/dom.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@
114114
width: 60px;
115115
}
116116

117+
/* normalizing li height across supported browsers */
118+
li {
119+
height: 18px;
120+
}
117121
</style>
118122

119123
DOM Fixture

packages/driver/cypress/integration/commands/actions/trigger_spec.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,10 @@ describe('src/cy/commands/actions/trigger', () => {
589589
})
590590

591591
it('passes options.animationDistanceThreshold to cy.ensureElementIsNotAnimating', () => {
592-
const $btn = cy.$$('button:first')
593-
594-
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn)
595-
596592
cy.spy(cy, 'ensureElementIsNotAnimating')
597593

598-
cy.get('button:first').trigger('tap', { animationDistanceThreshold: 1000 }).then(() => {
594+
cy.get('button:first').trigger('tap', { animationDistanceThreshold: 1000 }).then(($btn) => {
595+
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn)
599596
const { args } = cy.ensureElementIsNotAnimating.firstCall
600597

601598
expect(args[1]).to.deep.eq([fromElWindow, fromElWindow])
@@ -606,13 +603,10 @@ describe('src/cy/commands/actions/trigger', () => {
606603
it('passes config.animationDistanceThreshold to cy.ensureElementIsNotAnimating', () => {
607604
const animationDistanceThreshold = Cypress.config('animationDistanceThreshold')
608605

609-
const $btn = cy.$$('button:first')
610-
611-
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn)
612-
613606
cy.spy(cy, 'ensureElementIsNotAnimating')
614607

615-
cy.get('button:first').trigger('mouseover').then(() => {
608+
cy.get('button:first').trigger('mouseover').then(($btn) => {
609+
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn)
616610
const { args } = cy.ensureElementIsNotAnimating.firstCall
617611

618612
expect(args[1]).to.deep.eq([fromElWindow, fromElWindow])

packages/driver/cypress/integration/commands/actions/type_spec.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,10 @@ describe('src/cy/commands/actions/type - #type', () => {
351351
})
352352

353353
it('passes options.animationDistanceThreshold to cy.ensureElementIsNotAnimating', () => {
354-
const $txt = cy.$$(':text:first')
355-
356-
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($txt)
357-
358354
cy.spy(cy, 'ensureElementIsNotAnimating')
359355

360-
cy.get(':text:first').type('foo', { animationDistanceThreshold: 1000 }).then(() => {
356+
cy.get(':text:first').type('foo', { animationDistanceThreshold: 1000 }).then(($txt) => {
357+
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($txt)
361358
const { args } = cy.ensureElementIsNotAnimating.firstCall
362359

363360
expect(args[1]).to.deep.eq([fromElWindow, fromElWindow])
@@ -369,13 +366,10 @@ describe('src/cy/commands/actions/type - #type', () => {
369366
it('passes config.animationDistanceThreshold to cy.ensureElementIsNotAnimating', () => {
370367
const animationDistanceThreshold = Cypress.config('animationDistanceThreshold')
371368

372-
const $txt = cy.$$(':text:first')
373-
374-
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($txt)
375-
376369
cy.spy(cy, 'ensureElementIsNotAnimating')
377370

378-
cy.get(':text:first').type('foo').then(() => {
371+
cy.get(':text:first').type('foo').then(($txt) => {
372+
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($txt)
379373
const { args } = cy.ensureElementIsNotAnimating.firstCall
380374

381375
expect(args[1]).to.deep.eq([fromElWindow, fromElWindow])

packages/driver/cypress/integration/e2e/origin/commands/navigation.spec.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,18 @@ context('cy.origin navigation', () => {
2222
cy.get('a[data-cy="dom-link"]').click()
2323

2424
cy.origin('http://foobar.com:3500', () => {
25-
cy.get(':checkbox[name="colors"][value="blue"]').check().should('be.checked')
25+
cy.window().then((localWindow) => {
26+
// Define a custom property on window that we can assert the presence of.
27+
// After reloading, this property should not exist.
28+
// @ts-ignore
29+
localWindow.cy_testCustomValue = true
30+
})
31+
32+
cy.window().should('have.prop', 'cy_testCustomValue', true)
33+
2634
cy.reload()
27-
cy.get(':checkbox[name="colors"][value="blue"]').should('not.be.checked')
35+
36+
cy.window().should('not.have.prop', 'cy_testCustomValue', true)
2837
})
2938
})
3039

packages/driver/cypress/integration/e2e/origin/commands/spies_stubs_clocks.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ context('cy.origin spies, stubs, and clock', () => {
66
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
77
})
88

9+
afterEach(() => {
10+
// FIXME: Tests that end with a cy.origin command and enqueue no further cy
11+
// commands may have origin's unload event bleed into subsequent tests
12+
// and prevent stability from being reached, causing those tests to hang.
13+
// We enqueue another cy command after each test to ensure stability
14+
// is reached for the next test. This additional command can be removed with the
15+
// completion of: https://github.com/cypress-io/cypress/issues/21300
16+
cy.then(() => { /* ensuring stability */ })
17+
})
18+
919
it('spy()', () => {
1020
cy.origin('http://foobar.com:3500', () => {
1121
const foo = { bar () { } }

packages/driver/cypress/integration/e2e/origin/commands/unsupported_commands.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ context('cy.origin unsupported commands', () => {
44
cy.get('a[data-cy="cross-origin-secondary-link"]').click()
55
})
66

7+
afterEach(() => {
8+
// FIXME: Tests that end with a cy.origin command and enqueue no further cy
9+
// commands may have origin's unload event bleed into subsequent tests
10+
// and prevent stability from being reached, causing those tests to hang.
11+
// We enqueue another cy command after each test to ensure stability
12+
// is reached for the next test. This additional command can be removed with the
13+
// completion of: https://github.com/cypress-io/cypress/issues/21300
14+
cy.then(() => { /* ensuring stability */ })
15+
})
16+
717
it('cy.route() method is deprecated', (done) => {
818
cy.on('fail', (err) => {
919
expect(err.message).to.equal('`cy.route()` has been deprecated and its use is not supported in the `cy.origin()` callback. Consider using `cy.intercept()` (outside of the callback) instead.')

0 commit comments

Comments
 (0)