-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore(deps): Updating electron to v18 + node v16.13.2 #21418
Changes from 4 commits
736ce36
f5f14ed
eaf48f2
294e968
e4d0e0d
9a2326a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.5.0 | ||
16.13.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ macWorkflowFilters: &mac-workflow-filters | |
or: | ||
- equal: [ develop, << pipeline.git.branch >> ] | ||
- equal: [ check-results-for-env, << pipeline.git.branch >> ] | ||
- equal: [ tbiethman/chore/electron-18-update, << pipeline.git.branch >> ] | ||
- matches: | ||
pattern: "-release$" | ||
value: << pipeline.git.branch >> | ||
|
@@ -49,6 +50,7 @@ windowsWorkflowFilters: &windows-workflow-filters | |
- equal: [ master, << pipeline.git.branch >> ] | ||
- equal: [ develop, << pipeline.git.branch >> ] | ||
- equal: [ check-results-for-env, << pipeline.git.branch >> ] | ||
- equal: [ tbiethman/chore/electron-18-update, << pipeline.git.branch >> ] | ||
- matches: | ||
pattern: "-release$" | ||
value: << pipeline.git.branch >> | ||
|
@@ -60,7 +62,7 @@ executors: | |
# the Docker image with Cypress dependencies and Chrome browser | ||
cy-doc: | ||
docker: | ||
- image: cypress/browsers:node16.5.0-chrome94-ff93 | ||
- image: cypress/browsers:node16.13.2-chrome100-ff98 | ||
# by default, we use "small" to save on CI costs. bump on a per-job basis if needed. | ||
resource_class: small | ||
environment: | ||
|
@@ -69,7 +71,7 @@ executors: | |
# Docker image with non-root "node" user | ||
non-root-docker-user: | ||
docker: | ||
- image: cypress/browsers:node16.5.0-chrome94-ff93 | ||
- image: cypress/browsers:node16.13.2-chrome100-ff98 | ||
user: node | ||
environment: | ||
PLATFORM: linux | ||
|
@@ -371,8 +373,10 @@ commands: | |
npm install yarn -g # ensure yarn is installed with the correct node engine | ||
yarn check-node-version | ||
- run: | ||
name: Check Node | ||
command: yarn check-node-version | ||
name: Check Node | ||
command: | | ||
[ -s "${HOME}/.nvm/nvm.sh" ] && \. "${HOME}/.nvm/nvm.sh" | ||
yarn check-node-version | ||
|
||
install-chrome: | ||
description: Install Google Chrome | ||
|
@@ -589,7 +593,11 @@ commands: | |
## by default, assert that at least 1 test ran | ||
default: 0 | ||
steps: | ||
- run: yarn verify:mocha:results <<parameters.expectedResultCount>> | ||
- run: | ||
name: 'Verify Mocha Results' | ||
command: | | ||
[ -s "${HOME}/.nvm/nvm.sh" ] && \. "${HOME}/.nvm/nvm.sh" | ||
yarn verify:mocha:results <<parameters.expectedResultCount>> | ||
|
||
clone-repo-and-checkout-release-branch: | ||
description: | | ||
|
@@ -896,7 +904,9 @@ commands: | |
yarn binary-build --platform $PLATFORM --version $(node ./scripts/get-next-version.js) | ||
- run: | ||
name: Zip the binary | ||
command: yarn binary-zip --platform $PLATFORM | ||
command: | | ||
apt-get update && apt-get install -y zip | ||
yarn binary-zip --platform $PLATFORM | ||
- store-npm-logs | ||
- persist_to_workspace: | ||
root: ~/ | ||
|
@@ -1247,7 +1257,7 @@ jobs: | |
|
||
runner-integration-tests-firefox: | ||
<<: *defaults | ||
resource_class: medium | ||
resource_class: medium+ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The resources were bumped for the Firefox tests due to increased memory consumption. #21319 was logged to investigate further. |
||
parallelism: 2 | ||
steps: | ||
- run-runner-integration-tests: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -589,13 +589,10 @@ describe('src/cy/commands/actions/trigger', () => { | |
}) | ||
|
||
it('passes options.animationDistanceThreshold to cy.ensureElementIsNotAnimating', () => { | ||
const $btn = cy.$$('button:first') | ||
|
||
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn) | ||
|
||
cy.spy(cy, 'ensureElementIsNotAnimating') | ||
|
||
cy.get('button:first').trigger('tap', { animationDistanceThreshold: 1000 }).then(() => { | ||
cy.get('button:first').trigger('tap', { animationDistanceThreshold: 1000 }).then(($btn) => { | ||
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests related to Firefox reports positions/scroll offsets with something like 13 digits of precision. We do a lot rounding in our coordinate logic that could be impacted by this. These tests also seem to be influenced by how the AUT is being scaled; I can get them to pass/fail in develop by running the tests with the AUT scaled at different sizes. I updated these tests to grab the reference element window coordinates after the element has been scrolled into position, which makes us less susceptible to variances within Firefox's reported scroll position. This allows them to pass consistently without need to add 1px buffers to our assertions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we can use a similar technique to remove this 1px hack for Firefox in 10.0-release? https://github.com/cypress-io/cypress/blob/10.0-release/packages/driver/cypress/e2e/commands/actions/type.cy.js#L360-L377 |
||
const { args } = cy.ensureElementIsNotAnimating.firstCall | ||
|
||
expect(args[1]).to.deep.eq([fromElWindow, fromElWindow]) | ||
|
@@ -606,13 +603,10 @@ describe('src/cy/commands/actions/trigger', () => { | |
it('passes config.animationDistanceThreshold to cy.ensureElementIsNotAnimating', () => { | ||
const animationDistanceThreshold = Cypress.config('animationDistanceThreshold') | ||
|
||
const $btn = cy.$$('button:first') | ||
|
||
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn) | ||
|
||
cy.spy(cy, 'ensureElementIsNotAnimating') | ||
|
||
cy.get('button:first').trigger('mouseover').then(() => { | ||
cy.get('button:first').trigger('mouseover').then(($btn) => { | ||
const { fromElWindow } = Cypress.dom.getElementCoordinatesByPosition($btn) | ||
const { args } = cy.ensureElementIsNotAnimating.firstCall | ||
|
||
expect(args[1]).to.deep.eq([fromElWindow, fromElWindow]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,18 @@ context('cy.origin navigation', () => { | |
cy.get('a[data-cy="dom-link"]').click() | ||
|
||
cy.origin('http://foobar.com:3500', () => { | ||
cy.get(':checkbox[name="colors"][value="blue"]').check().should('be.checked') | ||
cy.window().then((localWindow) => { | ||
// Define a custom property on window that we can assert the presence of. | ||
// After reloading, this property should not exist. | ||
// @ts-ignore | ||
localWindow.cy_testCustomValue = true | ||
}) | ||
|
||
cy.window().should('have.prop', 'cy_testCustomValue', true) | ||
|
||
cy.reload() | ||
cy.get(':checkbox[name="colors"][value="blue"]').should('not.be.checked') | ||
|
||
cy.window().should('not.have.prop', 'cy_testCustomValue', true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Firefox now caches input values between reloads, causing this test to fail. Updated to use a window prop that we can be certain will be reset between reloads. |
||
}) | ||
}) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
describe('cy.origin', () => { | ||
afterEach(() => { | ||
// FIXME: Tests that end with a cy.origin command and enqueue no further cy | ||
// commands may have origin's unload event bleed into subsequent tests | ||
// and prevent stability from being reached, causing those tests to hang. | ||
// We enqueue another cy command after each test to ensure stability | ||
// is reached for the next test. This additional command can be removed with the | ||
// completion of: https://github.com/cypress-io/cypress/issues/21300 | ||
cy.then(() => { /* ensuring stability */ }) | ||
}) | ||
|
||
it('passes viewportWidth/Height state to the secondary origin', () => { | ||
const expectedViewport = [320, 480] | ||
|
||
|
@@ -237,12 +247,13 @@ describe('cy.origin', () => { | |
expect(err.message).not.to.include(`The following error originated from your application code, not from Cypress`) | ||
expect(err.codeFrame).to.exist | ||
expect(err.codeFrame!.frame).to.include('cy.origin') | ||
|
||
done() | ||
}) | ||
|
||
const variable = () => {} | ||
|
||
cy.origin('http://idp.com:3500', { args: variable }, (variable) => { | ||
cy.origin('http://foobar.com:3500', { args: variable }, (variable) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This spec would hang across all browsers when visiting idp.com; switching to foobar.com like all other specs in this file caused the test to pass (well, fail in the way we expect it too). This is odd, but not sure if it's indicative of a larger problem or the same problem recorded in #21300. |
||
variable() | ||
}) | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zip
was removed from our base image generator in a recent slimming down effort. We can add it back/generate a new image if there's a concern with pulling it in here.