diff --git a/browser-versions.json b/browser-versions.json index eb4bb16309d3..a123031782e8 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -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" } diff --git a/packages/driver/cypress/e2e/commands/actions/click.cy.js b/packages/driver/cypress/e2e/commands/actions/click.cy.js index 6bf6d3c23338..97fe26a7b6a0 100644 --- a/packages/driver/cypress/e2e/commands/actions/click.cy.js +++ b/packages/driver/cypress/e2e/commands/actions/click.cy.js @@ -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(() => { @@ -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) }) diff --git a/packages/driver/src/cy/mouse.ts b/packages/driver/src/cy/mouse.ts index 2958b03881a8..2a34656ac7ff 100644 --- a/packages/driver/src/cy/mouse.ts +++ b/packages/driver/src/cy/mouse.ts @@ -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 @@ -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 {} } @@ -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 {} } diff --git a/system-tests/projects/e2e/cypress/e2e/headless_old.cy.js b/system-tests/projects/e2e/cypress/e2e/headless_old.cy.js index f9458e537ee8..2c862c4acf93 100644 --- a/system-tests/projects/e2e/cypress/e2e/headless_old.cy.js +++ b/system-tests/projects/e2e/cypress/e2e/headless_old.cy.js @@ -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') }) }) diff --git a/system-tests/test/headless_old_spec.js b/system-tests/test/headless_old_spec.js index feeffc08cae2..0b1d151371d6 100644 --- a/system-tests/test/headless_old_spec.js +++ b/system-tests/test/headless_old_spec.js @@ -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, }, }) })