Skip to content

Commit

Permalink
chore: Update Chrome (stable) to 117.0.5938.88 and Chrome (beta) to 1…
Browse files Browse the repository at this point in the history
…18.0.5993.11 (#26966)
  • Loading branch information
github-actions[bot] authored Sep 19, 2023
1 parent 2247ffd commit 381b505
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "115.0.5790.13",
"chrome:stable": "114.0.5735.106",
"chrome:beta": "118.0.5993.11",
"chrome:stable": "117.0.5938.88",
"chrome:minimum": "64.0.3282.0"
}
4 changes: 2 additions & 2 deletions packages/driver/cypress/e2e/commands/actions/click.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const getMidPoint = (el) => {

const isFirefox = Cypress.isBrowser('firefox')
const isWebKit = Cypress.isBrowser('webkit')
const isChromium116OrLater = Cypress.isBrowser({ family: 'chromium' }) && Cypress.browserMajorVersion() >= 116

describe('src/cy/commands/actions/click', () => {
beforeEach(() => {
Expand Down Expand Up @@ -4448,13 +4449,12 @@ describe('mouse state', () => {
btn.on('pointerover', onAction)

cy.get('#btn').click()
// cy.wrap(onAction).should('calledOnce')

cy.getAll('btn', 'pointerover pointerenter').each(shouldBeCalledOnce)

// On disabled inputs, pointer events are still fired in chrome, not in firefox or webkit
cy.getAll('btn', 'pointerdown pointerup').each(isFirefox || isWebKit ? shouldNotBeCalled : shouldBeCalledOnce)
cy.getAll('btn', 'mouseover mouseenter').each(isFirefox || isWebKit ? shouldBeCalled : shouldNotBeCalled)
cy.getAll('btn', 'mouseover mouseenter').each(isFirefox || isWebKit || isChromium116OrLater ? shouldBeCalled : shouldNotBeCalled)
cy.getAll('btn', 'mousedown mouseup click').each(shouldNotBeCalled)
})

Expand Down
12 changes: 7 additions & 5 deletions packages/driver/src/cy/mouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ type DefaultMouseOptions = ModifiersEventOptions & CoordsEventOptions & {
export const create = (state: StateFunc, keyboard: Keyboard, focused: IFocused, Cypress: ICypress) => {
const isFirefox = Cypress.browser.family === 'firefox'
const isWebKit = Cypress.isBrowser('webkit')
// Chromium 116+ allows the simulated events to be sent to disabled elements so we need to explicitly exclude them
const isChromium116OrLater = Cypress.isBrowser({ family: 'chromium' }) && Cypress.browserMajorVersion() >= 116

const sendPointerEvent = (el, evtOptions, evtName, bubbles = false, cancelable = false) => {
const constructor = el.ownerDocument.defaultView.PointerEvent
Expand Down Expand Up @@ -103,14 +105,14 @@ export const create = (state: StateFunc, keyboard: Keyboard, focused: IFocused,
}

const sendMouseup = (el, evtOptions) => {
if ((isFirefox || isWebKit) && el.disabled) {
if ((isFirefox || isWebKit || isChromium116OrLater) && el.disabled) {
return {}
}

return sendMouseEvent(el, evtOptions, 'mouseup', true, true)
}
const sendMousedown = (el, evtOptions): {} | SentEvent => {
if ((isFirefox || isWebKit) && el.disabled) {
if ((isFirefox || isWebKit || isChromium116OrLater) && el.disabled) {
return {}
}

Expand All @@ -133,21 +135,21 @@ export const create = (state: StateFunc, keyboard: Keyboard, focused: IFocused,
}
const sendClick = (el, evtOptions, opts: { force?: boolean } = {}) => {
// send the click event if firefox and force (needed for force check checkbox)
if (!opts.force && (isFirefox || isWebKit) && el.disabled) {
if (!opts.force && (isFirefox || isWebKit || isChromium116OrLater) && el.disabled) {
return {}
}

return sendMouseEvent(el, evtOptions, 'click', true, true)
}
const sendDblclick = (el, evtOptions) => {
if ((isFirefox || isWebKit) && el.disabled) {
if ((isFirefox || isWebKit || isChromium116OrLater) && el.disabled) {
return {}
}

return sendMouseEvent(el, evtOptions, 'dblclick', true, true)
}
const sendContextmenu = (el, evtOptions) => {
if ((isFirefox || isWebKit) && el.disabled) {
if ((isFirefox || isWebKit || isChromium116OrLater) && el.disabled) {
return {}
}

Expand Down
6 changes: 5 additions & 1 deletion system-tests/projects/e2e/cypress/e2e/headless_old.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
describe('e2e headless old spec', function () {
it('has expected launch args', function () {
cy.task('get:browser:args').should('contain', '--headless=old')
if (Cypress.isBrowser({ family: 'chromium' }) && Cypress.browserMajorVersion() >= 119) {
cy.fail('headless old is supported in Chromium >= 119, please update this system test.')
}
// TODO: re-enable this once https://bugs.chromium.org/p/chromium/issues/detail?id=1483163 is resolved
// cy.task('get:browser:args').should('contain', '--headless=old')
})
})
4 changes: 3 additions & 1 deletion system-tests/test/headless_old_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ describe('e2e', () => {
spec: 'headless_old.cy.js',
browser: 'chrome',
processEnv: {
CHROMIUM_USE_HEADLESS_OLD: 1,
// TODO: re-enable this once https://bugs.chromium.org/p/chromium/issues/detail?id=1483163
// has been resolved and we have updated to a version of Chromium that includes the fix
// CHROMIUM_USE_HEADLESS_OLD: 1,
},
})
})

4 comments on commit 381b505

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 381b505 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/linux-x64/develop-381b505b6fee949eae078ed80f3153a6d6c96312/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 381b505 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/linux-arm64/develop-381b505b6fee949eae078ed80f3153a6d6c96312/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 381b505 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/darwin-x64/develop-381b505b6fee949eae078ed80f3153a6d6c96312/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 381b505 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/win32-x64/develop-381b505b6fee949eae078ed80f3153a6d6c96312/cypress.tgz

Please sign in to comment.