From 19ffdba811f4c0dd9c3fd3e076ab9f71da12d91d Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 3 Dec 2024 16:30:00 -0500 Subject: [PATCH 01/23] chore: release @cypress/vite-plugin-cypress-esm-v1.1.2 [skip ci] --- npm/vite-plugin-cypress-esm/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npm/vite-plugin-cypress-esm/CHANGELOG.md b/npm/vite-plugin-cypress-esm/CHANGELOG.md index a1fa76ee5d5..57c5cb56625 100644 --- a/npm/vite-plugin-cypress-esm/CHANGELOG.md +++ b/npm/vite-plugin-cypress-esm/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/vite-plugin-cypress-esm-v1.1.2](https://github.com/cypress-io/cypress/compare/@cypress/vite-plugin-cypress-esm-v1.1.1...@cypress/vite-plugin-cypress-esm-v1.1.2) (2024-12-03) + + +### Bug Fixes + +* support multiple imports of one module with multiple lines ([#30314](https://github.com/cypress-io/cypress/issues/30314)) ([12df40e](https://github.com/cypress-io/cypress/commit/12df40ed8c1101c5c4053a1fe63c06fcd2809bc7)) + # [@cypress/vite-plugin-cypress-esm-v1.1.1](https://github.com/cypress-io/cypress/compare/@cypress/vite-plugin-cypress-esm-v1.1.0...@cypress/vite-plugin-cypress-esm-v1.1.1) (2024-05-10) From cdc9fe083d92e4b3e85a4a24d6495e137d8720be Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Wed, 4 Dec 2024 11:14:53 -0700 Subject: [PATCH 02/23] test: normalize Firefox CDP spawn message (#30711) --- system-tests/lib/normalizeStdout.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system-tests/lib/normalizeStdout.ts b/system-tests/lib/normalizeStdout.ts index 168e258f662..ea3cc016f9c 100644 --- a/system-tests/lib/normalizeStdout.ts +++ b/system-tests/lib/normalizeStdout.ts @@ -164,6 +164,8 @@ export const normalizeStdout = function (str: string, options: any = {}) { .replace(crossOriginErrorRe, '[Cross origin error message]') // Replaces connection warning since Chrome or Firefox sometimes take longer to connect .replace(/Still waiting to connect to .+, retrying in 1 second \(attempt .+\/.+\)\n/g, '') + // Replaces CDP connection error message in Firefox since Cypress will retry + .replace(/Failed to spawn CDP with Firefox. Retrying.*\.\.\./, '') if (options.browser === 'webkit') { // WebKit throws for lookups on undefined refs with "Can't find variable: " From 241088ae5446cc3dbc009c41c43951e76e515067 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:09:42 -0500 Subject: [PATCH 03/23] chore: Update Chrome (stable) to 131.0.6778.108 and Chrome (beta) to 132.0.6834.32 (#30712) * chore: Update Chrome (stable) to 131.0.6778.108 * empty commit * chore: Update Chrome (stable) to 131.0.6778.108 and Chrome (beta) to 132.0.6834.32 --------- Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Jennifer Shehane --- browser-versions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser-versions.json b/browser-versions.json index b01fbd439e4..d402b7236bb 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,5 +1,5 @@ { - "chrome:beta": "132.0.6834.15", - "chrome:stable": "131.0.6778.85", + "chrome:beta": "132.0.6834.32", + "chrome:stable": "131.0.6778.108", "chrome:minimum": "64.0.3282.0" } From 02db483962ee20a6c2bc02a0243168c9255f6e6e Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Thu, 5 Dec 2024 08:49:23 -0700 Subject: [PATCH 04/23] test: fix proxy spec flake (#30717) --- .../test/integration/proxy_spec.js | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/https-proxy/test/integration/proxy_spec.js b/packages/https-proxy/test/integration/proxy_spec.js index 957b56c6676..15268c09e04 100644 --- a/packages/https-proxy/test/integration/proxy_spec.js +++ b/packages/https-proxy/test/integration/proxy_spec.js @@ -90,29 +90,31 @@ describe('Proxy', () => { }) }) - it('closes outgoing connections when client disconnects', function () { + it('closes outgoing connections when client disconnects', async function () { this.sandbox.spy(net, 'connect') - return request({ + await request({ strictSSL: false, url: 'https://localhost:8444/replace', proxy: 'http://localhost:3333', resolveWithFullResponse: true, }) - .then(() => { - // ensure the outgoing socket created for this connection was destroyed - expect(net.connect).calledOnce - const socket = net.connect.getCalls()[0].returnValue + // ensure the outgoing socket created for this connection was destroyed + expect(net.connect).calledOnce - return new Promise((resolve) => { + const socket = net.connect.getCalls()[0].returnValue + + // sometimes the close event happens before we can attach the listener, causing this test to flake + if (!socket.destroyed || !socket.readyState === 'closed') { + await new Promise((resolve) => { socket.on('close', () => { expect(socket.destroyed).to.be.true resolve() }) }) - }) + } }) it('can boot the httpServer', () => { @@ -127,7 +129,9 @@ describe('Proxy', () => { }) }) - context('generating certificates', () => { + context('generating certificates', function () { + this.retries(4) + it('reuses existing certificates', function () { return request({ strictSSL: false, @@ -270,13 +274,13 @@ describe('Proxy', () => { process.env.npm_config_noproxy = 'just,some,nonsense' process.env.NO_PROXY = '' - process.env.HTTP_PROXY = process.env.HTTPS_PROXY = 'http://localhost:9001' + process.env.HTTP_PROXY = process.env.HTTPS_PROXY = 'http://localhost:2222' this.upstream = new DebugProxy({ keepRequests: true, }) - return this.upstream.start(9001) + return this.upstream.start(2222) }) it('passes a request to an https server through the upstream', function () { @@ -309,7 +313,7 @@ describe('Proxy', () => { return true } - process.env.HTTP_PROXY = (process.env.HTTPS_PROXY = 'http://foo:bar@localhost:9001') + process.env.HTTP_PROXY = process.env.HTTPS_PROXY = 'http://foo:bar@localhost:2222' return request({ strictSSL: false, @@ -335,10 +339,9 @@ describe('Proxy', () => { expect(net.connect).calledOnce const socket = net.connect.getCalls()[0].returnValue - // sometimes the close event happens before we can attach the listener, - // causing this test to flake + // sometimes the close event happens before we can attach the listener, causing this test to flake if (!socket.destroyed || !socket.readyState === 'closed') { - return new Promise((resolve) => { + await new Promise((resolve) => { socket.on('close', () => { expect(socket.destroyed).to.be.true From e96593bb1e692f102a300c1c94fe0e950e8a130b Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Mon, 9 Dec 2024 09:44:05 -0700 Subject: [PATCH 05/23] fix: hang when Network.enable is not implemented for a target (#30727) --- cli/CHANGELOG.md | 8 +++ .../server/lib/browsers/browser-cri-client.ts | 5 +- packages/server/lib/browsers/cri-client.ts | 16 +++--- .../test/unit/browsers/cri-client_spec.ts | 51 +++++++++++++++---- 4 files changed, 61 insertions(+), 19 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index b12efca2179..1d097168271 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,4 +1,12 @@ +## 13.16.2 + +_Released 12/17/2024 (PENDING)_ + +**Bugfixes:** + +- Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). + ## 13.16.1 _Released 12/03/2024_ diff --git a/packages/server/lib/browsers/browser-cri-client.ts b/packages/server/lib/browsers/browser-cri-client.ts index c4f53cb8785..9af893a31a9 100644 --- a/packages/server/lib/browsers/browser-cri-client.ts +++ b/packages/server/lib/browsers/browser-cri-client.ts @@ -342,9 +342,8 @@ export class BrowserCriClient { try { await browserClient.send('Runtime.runIfWaitingForDebugger', undefined, sessionId) } catch (error) { - // it's possible that the target was closed before we could enable - // network and continue, in that case, just ignore - debug('error running Runtime.runIfWaitingForDebugger:', error) + // it's possible that the target was closed before we could tell it to run, in that case, just ignore + debug('error running Runtime.runIfWaitingForDebugger: %o', error) } } diff --git a/packages/server/lib/browsers/cri-client.ts b/packages/server/lib/browsers/cri-client.ts index 36e123eb3f1..47cd110e5e6 100644 --- a/packages/server/lib/browsers/cri-client.ts +++ b/packages/server/lib/browsers/cri-client.ts @@ -161,8 +161,7 @@ export class CriClient implements ICriClient { this._isChildTarget = !!this.host if (this._isChildTarget) { - // If crash listeners are added at the browser level, tabs/page connections do not - // emit them. + // If crash listeners are added at the browser level, tabs/page connections do not emit them. this.cdpConnection.on('Target.targetCrashed', async (event) => { debug('crash event detected', event) if (event.targetId !== this.targetId) { @@ -368,13 +367,18 @@ export class CriClient implements ICriClient { if (event.targetInfo.type !== 'service_worker' && event.targetInfo.type !== 'page' && event.targetInfo.type !== 'other') { await this.cdpConnection.send('Network.enable', this.protocolManager?.networkEnableOptions ?? DEFAULT_NETWORK_ENABLE_OPTIONS, event.sessionId) } + } catch (error) { + // it's possible that the target was closed before we could enable network, in that case, just ignore + debug('error attaching to target cri: %o', { error, event }) + } - if (event.waitingForDebugger) { + if (event.waitingForDebugger) { + try { await this.cdpConnection.send('Runtime.runIfWaitingForDebugger', undefined, event.sessionId) + } catch (error) { + // it's possible that the target was closed before we could tell it to run, in that case, just ignore + debug('error running Runtime.runIfWaitingForDebugger: %o', { error, event }) } - } catch (error) { - // it's possible that the target was closed before we could enable network and continue, in that case, just ignore - debug('error attaching to target cri', error) } } diff --git a/packages/server/test/unit/browsers/cri-client_spec.ts b/packages/server/test/unit/browsers/cri-client_spec.ts index 608cfcf2e55..e6300e3de77 100644 --- a/packages/server/test/unit/browsers/cri-client_spec.ts +++ b/packages/server/test/unit/browsers/cri-client_spec.ts @@ -3,6 +3,7 @@ import EventEmitter from 'events' import { ProtocolManagerShape } from '@packages/types' import type { CriClient } from '../../../lib/browsers/cri-client' import pDefer from 'p-defer' +import type Protocol from 'devtools-protocol' const { expect, proxyquire, sinon } = require('../../spec_helper') const DEBUGGER_URL = 'http://foo' @@ -108,11 +109,9 @@ describe('lib/browsers/cri-client', function () { it('does not enable network', async () => { await Promise.all(['service_worker', 'page', 'other'].map((type) => { return fireCDPEvent('Target.attachedToTarget', { - // do not need entire event payload for this test - // @ts-ignore targetInfo: { type, - }, + } as Protocol.Target.TargetInfo, }) })) @@ -123,11 +122,9 @@ describe('lib/browsers/cri-client', function () { describe('target type is something other than service worker, page, or other', () => { it('enables network', async () => { await fireCDPEvent('Target.attachedToTarget', { - // do not need entire event payload for this test - // @ts-ignore targetInfo: { - type: 'somethin else', - }, + type: 'iframe', + } as Protocol.Target.TargetInfo, }) expect(criStub.send).to.have.been.calledWith('Network.enable') @@ -135,18 +132,52 @@ describe('lib/browsers/cri-client', function () { }) describe('target is waiting for debugger', () => { + const sessionId = 'abc123' + it('sends Runtime.runIfWaitingForDebugger', async () => { - const sessionId = 'abc123' + await fireCDPEvent('Target.attachedToTarget', { + waitingForDebugger: true, + sessionId, + targetInfo: { type: 'service_worker' } as Protocol.Target.TargetInfo, + }) + + expect(criStub.send).to.have.been.calledWith('Runtime.runIfWaitingForDebugger', undefined, sessionId) + }) + + it('does not send Runtime.runIfWaitingForDebugger if not waiting for debugger', async () => { + await fireCDPEvent('Target.attachedToTarget', { + waitingForDebugger: false, + sessionId, + targetInfo: { type: 'service_worker' } as Protocol.Target.TargetInfo, + }) + + expect(criStub.send).not.to.have.been.calledWith('Runtime.runIfWaitingForDebugger') + }) + + it('sends Runtime.runIfWaitingForDebugger even if Network.enable throws', async () => { + criStub.send.withArgs('Network.enable').throws(new Error('ProtocolError: Inspected target closed')) await fireCDPEvent('Target.attachedToTarget', { waitingForDebugger: true, sessionId, - // @ts-ignore - targetInfo: { type: 'service_worker' }, + targetInfo: { type: 'iframe' } as Protocol.Target.TargetInfo, }) + expect(criStub.send).to.have.been.calledWith('Network.enable').and.to.have.thrown() expect(criStub.send).to.have.been.calledWith('Runtime.runIfWaitingForDebugger', undefined, sessionId) }) + + it('continues even if Runtime.runIfWaitingForDebugger throws', async () => { + criStub.send.withArgs('Runtime.runIfWaitingForDebugger').throws(new Error('ProtocolError: Inspected target closed')) + + await fireCDPEvent('Target.attachedToTarget', { + waitingForDebugger: true, + sessionId, + targetInfo: { type: 'service_worker' } as Protocol.Target.TargetInfo, + }) + + expect(criStub.send).to.have.been.calledWith('Runtime.runIfWaitingForDebugger', undefined, sessionId).and.to.have.thrown() + }) }) }) From dcd0e92ced2fe16cc337ec8914fce4b22e98682a Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Tue, 10 Dec 2024 07:38:09 -0700 Subject: [PATCH 06/23] fix: update userChrome.css to correctly hide the toolbox in firefox (#30728) --- cli/CHANGELOG.md | 1 + packages/server/lib/browsers/firefox.ts | 10 +++++++--- .../server/test/unit/browsers/firefox_spec.ts | 4 ++-- system-tests/lib/normalizeStdout.ts | 19 ------------------- system-tests/lib/pluginUtils.js | 7 +------ 5 files changed, 11 insertions(+), 30 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 1d097168271..3bf40d89776 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -6,6 +6,7 @@ _Released 12/17/2024 (PENDING)_ **Bugfixes:** - Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). +- Updated Firefox `userChrome.css` to correctly hide the toolbox during headless mode. Addresses [#30721](https://github.com/cypress-io/cypress/issues/30721). ## 13.16.1 diff --git a/packages/server/lib/browsers/firefox.ts b/packages/server/lib/browsers/firefox.ts index d6215f7e488..816db8d2ee3 100644 --- a/packages/server/lib/browsers/firefox.ts +++ b/packages/server/lib/browsers/firefox.ts @@ -370,7 +370,12 @@ toolbar { overflow: hidden !important; display: none; } - +toolbox { + height: 0px !important; + min-height: 0px !important; + overflow: hidden !important; + border: none !important; +} ` let browserCriClient: BrowserCriClient | undefined @@ -560,11 +565,10 @@ export async function open (browser: Browser, url: string, options: BrowserLaunc } // resolution of exactly 1280x720 - // (height must account for firefox url bar, which we can only shrink to 2px) const BROWSER_ENVS = { MOZ_REMOTE_SETTINGS_DEVTOOLS: '1', MOZ_HEADLESS_WIDTH: '1280', - MOZ_HEADLESS_HEIGHT: '722', + MOZ_HEADLESS_HEIGHT: '720', ...launchOptions.env, } diff --git a/packages/server/test/unit/browsers/firefox_spec.ts b/packages/server/test/unit/browsers/firefox_spec.ts index 18f0cb538c7..6eb543a66e6 100644 --- a/packages/server/test/unit/browsers/firefox_spec.ts +++ b/packages/server/test/unit/browsers/firefox_spec.ts @@ -274,7 +274,7 @@ describe('lib/browsers/firefox', () => { env: { MOZ_REMOTE_SETTINGS_DEVTOOLS: '1', MOZ_HEADLESS_WIDTH: '1280', - MOZ_HEADLESS_HEIGHT: '722', + MOZ_HEADLESS_HEIGHT: '720', }, }), jsdebugger: false, @@ -339,7 +339,7 @@ describe('lib/browsers/firefox', () => { env: { MOZ_REMOTE_SETTINGS_DEVTOOLS: '1', MOZ_HEADLESS_WIDTH: '1280', - MOZ_HEADLESS_HEIGHT: '722', + MOZ_HEADLESS_HEIGHT: '720', }, }), jsdebugger: true, diff --git a/system-tests/lib/normalizeStdout.ts b/system-tests/lib/normalizeStdout.ts index ea3cc016f9c..77d960b57c3 100644 --- a/system-tests/lib/normalizeStdout.ts +++ b/system-tests/lib/normalizeStdout.ts @@ -180,25 +180,6 @@ export const normalizeStdout = function (str: string, options: any = {}) { str = str.split('\n').filter((line) => !line.includes(wdsFailedMsg)).join('\n') } - // in Firefox 130, height dimensions are off by 1 pixel in CI, so we need to fix the offset to match common snapshots - if (options.browser === 'firefox' && process.env.CI) { - const dimensionRegex = new RegExp(/(\((?\d+)x(?\d+)\))/g) - - const matches = dimensionRegex.exec(str) - - if (matches?.groups?.height && matches?.groups?.width) { - const height = parseInt(matches?.groups?.height) - - // only happens on default height for whatever reason in firefox 130... - if (height === 719) { - const expectedHeight = height + 1 - const expectedWidth = matches?.groups?.width - - str = str.replaceAll(`(${expectedWidth}x${height})`, `(${expectedWidth}x${expectedHeight})`) - } - } - } - if (options.sanitizeScreenshotDimensions) { // screenshot dimensions str = str.replace(/(\(\d+x\d+\))/g, replaceScreenshotDims) diff --git a/system-tests/lib/pluginUtils.js b/system-tests/lib/pluginUtils.js index 0ffdd3f6a5d..dafc2e418cd 100644 --- a/system-tests/lib/pluginUtils.js +++ b/system-tests/lib/pluginUtils.js @@ -3,12 +3,7 @@ module.exports = { if (config.env['NO_RESIZE']) return if (browser.family === 'firefox') { - // this is needed to ensure correct error screenshot / video recording - // resolution of exactly 1280x720 - // (height must account for firefox url bar, which we can only shrink to 2px) - options.args.push( - '-width', '1280', '-height', '722', - ) + options.args.push('-width', '1280', '-height', '720') } else if (browser.name === 'electron') { options.preferences.width = 1280 options.preferences.height = 720 From ed1c510ac44d6ad03e3fdaee68e042f555c98344 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Tue, 10 Dec 2024 12:49:54 -0500 Subject: [PATCH 07/23] dependency: Bump chai from 4.2.0 to 4.5.0 (#30737) * Bump chai to 4.5.0 * empty commit * Add changelog entry --- cli/CHANGELOG.md | 4 ++ package.json | 2 +- yarn.lock | 123 ++++++++++++++++------------------------------- 3 files changed, 46 insertions(+), 83 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 3bf40d89776..9b233b0d3c4 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -8,6 +8,10 @@ _Released 12/17/2024 (PENDING)_ - Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). - Updated Firefox `userChrome.css` to correctly hide the toolbox during headless mode. Addresses [#30721](https://github.com/cypress-io/cypress/issues/30721). +**Dependency Updates:** + +- Updated `chai` from `4.2.0` to `4.5.0`. Addressed in [#30737](https://github.com/cypress-io/cypress/pull/30737). + ## 13.16.1 _Released 12/03/2024_ diff --git a/package.json b/package.json index 5510bf98287..513aaad6089 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "bluebird": "3.5.3", "bluebird-retry": "0.11.0", "bytenode": "1.3.7", - "chai": "4.2.0", + "chai": "4.5.0", "chai-as-promised": "7.1.1", "chalk": "2.4.2", "check-dependencies": "1.1.0", diff --git a/yarn.lock b/yarn.lock index 23852ee72b8..1d2b449bd04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11626,18 +11626,18 @@ chai@4.2.0: pathval "^1.1.0" type-detect "^4.0.5" -chai@^4.2.0, chai@^4.3.6: - version "4.3.6" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" - integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== +chai@4.5.0, chai@^4.2.0, chai@^4.3.6: + version "4.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== dependencies: assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - loupe "^2.3.1" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" pathval "^1.1.1" - type-detect "^4.0.5" + type-detect "^4.1.0" chalk-template@0.4.0: version "0.4.0" @@ -11797,10 +11797,12 @@ check-dependencies@1.1.0: minimist "^1.2.0" semver "^5.4.1" -check-error@^1.0.1, check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= +check-error@^1.0.1, check-error@^1.0.2, check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" check-more-types@2.24.0, check-more-types@^2.24.0: version "2.24.0" @@ -13615,6 +13617,13 @@ deep-eql@^3.0.0, deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" +deep-eql@^4.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + deep-equal@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" @@ -17019,10 +17028,10 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-func-name@^2.0.0, get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" @@ -21322,12 +21331,12 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4 dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.1: - version "2.3.4" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" - integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== +loupe@^2.3.1, loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== dependencies: - get-func-name "^2.0.0" + get-func-name "^2.0.1" lower-case-first@^1.0.0: version "1.0.2" @@ -22245,7 +22254,7 @@ mobx@6.13.5: resolved "https://registry.npmjs.org/mobx/-/mobx-6.13.5.tgz#957d9df88c7f8b4baa7c6f8bdcb6d68b432a6ed5" integrity sha512-/HTWzW2s8J1Gqt+WmUj5Y0mddZk+LInejADc79NJadrWla3rHzmRHki/mnEUH1AvOmbNTZ1BRbKxr8DSgfdjMA== -"mocha-7.0.1@npm:mocha@7.0.1": +"mocha-7.0.1@npm:mocha@7.0.1", mocha@7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.0.1.tgz#276186d35a4852f6249808c6dd4a1376cbf6c6ce" integrity sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg== @@ -22362,36 +22371,6 @@ mocha@6.2.2: yargs-parser "13.1.1" yargs-unparser "1.6.0" -mocha@7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.0.1.tgz#276186d35a4852f6249808c6dd4a1376cbf6c6ce" - integrity sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "2.2.0" - minimatch "3.0.4" - mkdirp "0.5.1" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.0" - yargs-parser "13.1.1" - yargs-unparser "1.6.0" - mocha@7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.0.tgz#c784f579ad0904d29229ad6cb1e2514e4db7d249" @@ -29151,7 +29130,7 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -29177,15 +29156,6 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -29287,7 +29257,7 @@ stringify-object@^3.0.0, stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -29308,13 +29278,6 @@ strip-ansi@5.2.0, strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -30605,7 +30568,7 @@ type-detect@0.1.1: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" integrity sha1-C6XsKohWQORw6k6FBZcZANrFiCI= -type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8: +type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -30615,6 +30578,11 @@ type-detect@^1.0.0: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" integrity sha1-diIXzAbbJY7EiQihKY6LlRIejqI= +type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + type-fest@2.13.0: version "2.13.0" resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.13.0.tgz#d1ecee38af29eb2e863b22299a3d68ef30d2abfb" @@ -32319,7 +32287,7 @@ workerpool@6.2.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -32362,15 +32330,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 73de0a8d4db7fc807326f640e8843d04b1b426bb Mon Sep 17 00:00:00 2001 From: Ryan Manuel Date: Tue, 10 Dec 2024 19:36:17 -0700 Subject: [PATCH 08/23] fix: error loading config file with node 22.12.0 (#30730) --- .circleci/workflows.yml | 4 +- cli/CHANGELOG.md | 1 + .../data-context/src/data/ProjectConfigIpc.ts | 8 ++++ .../test/unit/data/ProjectConfigIpc.spec.ts | 46 ++++++++----------- .../config-with-ts-module/cypress.config.ts | 2 +- .../test-binary/node_versions_spec.ts | 2 + 6 files changed, 33 insertions(+), 30 deletions(-) diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 68996b55bf1..109dd3d2378 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -42,7 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ] + - equal: [ 'ryanm/experiment/esm', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -152,7 +152,7 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "chore/update_reporter_mobx" ]]; then + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "ryanm/experiment/esm" ]]; then export SHOULD_PERSIST_ARTIFACTS=true fi' >> "$BASH_ENV" # You must run `setup_should_persist_artifacts` command and be using bash before running this command diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 9b233b0d3c4..d3bff4f49f5 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -7,6 +7,7 @@ _Released 12/17/2024 (PENDING)_ - Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). - Updated Firefox `userChrome.css` to correctly hide the toolbox during headless mode. Addresses [#30721](https://github.com/cypress-io/cypress/issues/30721). +- Fixed an issue loading the `cypress.config.ts` file with Node.js version `22.12.0`. Addresses [#30715](https://github.com/cypress-io/cypress/issues/30715). **Dependency Updates:** diff --git a/packages/data-context/src/data/ProjectConfigIpc.ts b/packages/data-context/src/data/ProjectConfigIpc.ts index d95f7c687c8..eaa11a34772 100644 --- a/packages/data-context/src/data/ProjectConfigIpc.ts +++ b/packages/data-context/src/data/ProjectConfigIpc.ts @@ -313,6 +313,14 @@ export class ProjectConfigIpc extends EventEmitter { tsNodeEsmLoader = `${tsNodeEsmLoader} --no-experimental-detect-module` } + // in nodejs 22.12.0, the --experimental-require-module option is now enabled by default. + // We need to disable it with the --no-experimental-require-module flag. + // @see https://github.com/cypress-io/cypress/issues/30715 + if (this.nodeVersion && semver.gte(this.nodeVersion, '22.12.0')) { + debug(`detected node version ${this.nodeVersion}, adding --no-experimental-require-module option to child_process NODE_OPTIONS.`) + tsNodeEsmLoader = `${tsNodeEsmLoader} --no-experimental-require-module` + } + if (childOptions.env.NODE_OPTIONS) { childOptions.env.NODE_OPTIONS += ` ${tsNodeEsmLoader}` } else { diff --git a/packages/data-context/test/unit/data/ProjectConfigIpc.spec.ts b/packages/data-context/test/unit/data/ProjectConfigIpc.spec.ts index 70117aa1b41..dc9e965b13d 100644 --- a/packages/data-context/test/unit/data/ProjectConfigIpc.spec.ts +++ b/packages/data-context/test/unit/data/ProjectConfigIpc.spec.ts @@ -1,5 +1,6 @@ import childProcess from 'child_process' import { expect } from 'chai' +import semver from 'semver' import sinon from 'sinon' import { scaffoldMigrationProject as scaffoldProject } from '../helper' import { ProjectConfigIpc } from '../../../src/data/ProjectConfigIpc' @@ -34,8 +35,11 @@ describe('ProjectConfigIpc', () => { }) context('forkChildProcess', () => { - const NODE_VERSIONS = ['18.20.4', '20.17.0'] - const NODE_VERSIONS_22_7_0_AND_UP = ['22.7.0', '22.11.4'] + // some of these node versions may not exist, but we want to verify + // the experimental flags are correctly disabled for future versions + const NODE_VERSIONS = ['18.20.4', '20.17.0', '22.7.0', '22.11.4', '22.12.0', '22.15.0'] + const experimentalDetectModuleIntroduced = '22.7.0' + const experimentalRequireModuleIntroduced = '22.12.0' let projectConfigIpc let forkSpy @@ -52,10 +56,10 @@ describe('ProjectConfigIpc', () => { }) context('typescript', () => { - [...NODE_VERSIONS, ...NODE_VERSIONS_22_7_0_AND_UP].forEach((nodeVersion) => { + [...NODE_VERSIONS].forEach((nodeVersion) => { context(`node v${nodeVersion}`, () => { context('ESM', () => { - it('uses the experimental module loader if ESM is being used with typescript', async () => { + it('passes the correct experimental flags if ESM is being used with typescript', async () => { // @ts-expect-error const projectPath = await scaffoldProject('config-cjs-and-esm/config-with-ts-module') @@ -77,35 +81,23 @@ describe('ProjectConfigIpc', () => { NODE_OPTIONS: sinon.match('--experimental-specifier-resolution=node --loader'), }, })) - }) - - // @see https://github.com/cypress-io/cypress/issues/30084 - // at time of writing, 22.11.4 is a node version that does not exist. We are using this version to test the logic for future proofing. - if (NODE_VERSIONS_22_7_0_AND_UP.includes(nodeVersion)) { - it(`additionally adds --no-experimental-detect-module for node versions 22.7.0 and up if ESM is being used with typescript`, async () => { - // @ts-expect-error - const projectPath = await scaffoldProject('config-cjs-and-esm/config-with-ts-module') - - const MOCK_NODE_PATH = `/Users/foo/.nvm/versions/node/v${nodeVersion}/bin/node` - const MOCK_NODE_VERSION = nodeVersion - - projectConfigIpc = new ProjectConfigIpc( - MOCK_NODE_PATH, - MOCK_NODE_VERSION, - projectPath, - 'cypress.config.js', - false, - (error) => {}, - () => {}, - ) + if (semver.gte(nodeVersion, experimentalDetectModuleIntroduced)) { expect(forkSpy).to.have.been.calledWith(sinon.match.string, sinon.match.array, sinon.match({ env: { NODE_OPTIONS: sinon.match('--no-experimental-detect-module'), }, })) - }) - } + } + + if (semver.gte(nodeVersion, experimentalRequireModuleIntroduced)) { + expect(forkSpy).to.have.been.calledWith(sinon.match.string, sinon.match.array, sinon.match({ + env: { + NODE_OPTIONS: sinon.match('--no-experimental-require-module'), + }, + })) + } + }) }) context('CommonJS', () => { diff --git a/system-tests/projects/config-cjs-and-esm/config-with-ts-module/cypress.config.ts b/system-tests/projects/config-cjs-and-esm/config-with-ts-module/cypress.config.ts index 70c232267fc..de29bc7da79 100644 --- a/system-tests/projects/config-cjs-and-esm/config-with-ts-module/cypress.config.ts +++ b/system-tests/projects/config-cjs-and-esm/config-with-ts-module/cypress.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from 'cypress' export default defineConfig({ e2e: { supportFile: false, - setupNodeEvents: async (_, config) => { + setupNodeEvents: async (_, config: Cypress.PluginConfigOptions) => { await import('find-up') return config diff --git a/system-tests/test-binary/node_versions_spec.ts b/system-tests/test-binary/node_versions_spec.ts index 32c0d7574a2..2c7edff645e 100644 --- a/system-tests/test-binary/node_versions_spec.ts +++ b/system-tests/test-binary/node_versions_spec.ts @@ -30,6 +30,7 @@ describe('binary node versions', () => { 'cypress/base:20.12.2', 'cypress/base:22.0.0', 'cypress/base:22.7.0', + 'cypress/base:22.12.0', ].forEach(smokeTestDockerImage) }) @@ -39,6 +40,7 @@ describe('type: module', () => { 'cypress/base:20.12.2', 'cypress/base:22.0.0', 'cypress/base:22.7.0', + 'cypress/base:22.12.0', ].forEach((dockerImage) => { systemTests.it(`can run in ${dockerImage}`, { withBinary: true, From 17639cb364b8cc3a2f7debcdae220fa899559c94 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Wed, 11 Dec 2024 11:03:52 -0500 Subject: [PATCH 09/23] misc: Remove 'Alternatively you can use CommonJS syntax' comment from scaffolded component supportFile (#30738) * Remove 'Alternatively you can use CommonJS syntax' comment from scaffolded ct supportFile * changelog entry --- cli/CHANGELOG.md | 4 ++++ packages/driver/cypress/support/e2e.js | 17 --------------- packages/scaffold-config/src/supportFile.ts | 6 ------ .../test/unit/supportFile.spec.ts | 21 ------------------- .../cypress/support/component.ts | 3 --- .../cypress/support/e2e.js | 3 --- .../testing/e2e/cypress/support/index.js | 3 --- .../cypress/support/component.js | 3 --- .../no-specs/cypress/support/component.js | 3 --- .../cypress/support/e2e.js | 2 -- .../cypress/support/e2e.js | 3 --- .../cypress/support/e2e.js | 3 --- .../cypress/support/e2e.js | 3 --- .../support/component.js | 3 --- .../cypress/support/e2e.js | 3 --- .../cypress/support/component.js | 3 --- .../cypress/support/e2e.js | 3 --- .../cypress/support/e2e.js | 3 --- .../cypress/support/component.ts | 3 --- .../cypress/support/component.ts | 3 --- .../cypress/support/e2e.ts | 3 --- .../ts-proj-4-5/cypress/support/e2e.ts | 3 --- .../projects/ts-proj-5/cypress/support/e2e.ts | 3 --- .../projects/ts-proj/cypress/support/e2e.ts | 3 --- 24 files changed, 4 insertions(+), 103 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index d3bff4f49f5..499d4661db1 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -9,6 +9,10 @@ _Released 12/17/2024 (PENDING)_ - Updated Firefox `userChrome.css` to correctly hide the toolbox during headless mode. Addresses [#30721](https://github.com/cypress-io/cypress/issues/30721). - Fixed an issue loading the `cypress.config.ts` file with Node.js version `22.12.0`. Addresses [#30715](https://github.com/cypress-io/cypress/issues/30715). +**Misc:** + +- Removed a comment from the scaffolded `supportFile` for component tests around CommonJS syntax. Addresses [#23287](https://github.com/cypress-io/cypress/issues/23287). + **Dependency Updates:** - Updated `chai` from `4.2.0` to `4.5.0`. Addressed in [#30737](https://github.com/cypress-io/cypress/pull/30737). diff --git a/packages/driver/cypress/support/e2e.js b/packages/driver/cypress/support/e2e.js index c818f04f6a9..a34ebd81847 100644 --- a/packages/driver/cypress/support/e2e.js +++ b/packages/driver/cypress/support/e2e.js @@ -1,18 +1 @@ -// *********************************************************** -// This example support/e2e.js is processed and -// loaded automatically before your other test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/guides/configuration#section-global -// *********************************************************** - -// Alternatively you can use CommonJS syntax: -// require("./commands") require('./defaults') diff --git a/packages/scaffold-config/src/supportFile.ts b/packages/scaffold-config/src/supportFile.ts index 19f5f7871d8..c4f2aee9fc5 100644 --- a/packages/scaffold-config/src/supportFile.ts +++ b/packages/scaffold-config/src/supportFile.ts @@ -20,9 +20,6 @@ export function supportFileE2E (language: CodeLanguage['type']) { // Import commands.js using ES2015 syntax: import './commands' - - // Alternatively you can use CommonJS syntax: - // require('./commands') ` } @@ -45,9 +42,6 @@ export function supportFileComponent (language: CodeLanguage['type'], mountModul // Import commands.js using ES2015 syntax: import './commands' - - // Alternatively you can use CommonJS syntax: - // require('./commands') ` const exampleUse = dedent` diff --git a/packages/scaffold-config/test/unit/supportFile.spec.ts b/packages/scaffold-config/test/unit/supportFile.spec.ts index 37bfce49e9d..e4a73747f5d 100644 --- a/packages/scaffold-config/test/unit/supportFile.spec.ts +++ b/packages/scaffold-config/test/unit/supportFile.spec.ts @@ -27,9 +27,6 @@ describe('supportFileComponent', () => { // Import commands.js using ES2015 syntax: import './commands' - // Alternatively you can use CommonJS syntax: - // require('./commands') - import { mount } from '${mountModule}' Cypress.Commands.add('mount', mount) @@ -61,9 +58,6 @@ describe('supportFileComponent', () => { // Import commands.js using ES2015 syntax: import './commands' - // Alternatively you can use CommonJS syntax: - // require('./commands') - import { mount } from '${mountModule}' // Augment the Cypress namespace to include type definitions for @@ -111,9 +105,6 @@ describe('supportFileComponent', () => { // Import commands.js using ES2015 syntax: import './commands' - // Alternatively you can use CommonJS syntax: - // require('./commands') - import { mount } from '${mountModule}' Cypress.Commands.add('mount', mount) @@ -145,9 +136,6 @@ describe('supportFileComponent', () => { // Import commands.js using ES2015 syntax: import './commands' - // Alternatively you can use CommonJS syntax: - // require('./commands') - import { mount } from '${mountModule}' // Augment the Cypress namespace to include type definitions for @@ -195,9 +183,6 @@ describe('supportFileComponent', () => { // Import commands.js using ES2015 syntax: import './commands' - // Alternatively you can use CommonJS syntax: - // require('./commands') - import { mount } from '${mountModule}' // Augment the Cypress namespace to include type definitions for @@ -244,9 +229,6 @@ describe('supportFileComponent', () => { // Import commands.js using ES2015 syntax: import './commands' - // Alternatively you can use CommonJS syntax: - // require('./commands') - import { mount } from 'cypress/svelte' Cypress.Commands.add('mount', mount) @@ -278,9 +260,6 @@ describe('supportFileComponent', () => { // Import commands.js using ES2015 syntax: import './commands' - // Alternatively you can use CommonJS syntax: - // require('./commands') - import { mount } from 'cypress/svelte' // Augment the Cypress namespace to include type definitions for diff --git a/system-tests/projects/angular-cli-configured/cypress/support/component.ts b/system-tests/projects/angular-cli-configured/cypress/support/component.ts index 96e1d279839..496890f9856 100644 --- a/system-tests/projects/angular-cli-configured/cypress/support/component.ts +++ b/system-tests/projects/angular-cli-configured/cypress/support/component.ts @@ -16,9 +16,6 @@ // Import commands.js using ES2015 syntax: import './commands' -// Alternatively you can use CommonJS syntax: -// require('./commands') - import { mount } from 'cypress/angular' // Augment the Cypress namespace to include type definitions for diff --git a/system-tests/projects/config-with-invalid-browser/cypress/support/e2e.js b/system-tests/projects/config-with-invalid-browser/cypress/support/e2e.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/config-with-invalid-browser/cypress/support/e2e.js +++ b/system-tests/projects/config-with-invalid-browser/cypress/support/e2e.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/migration-e2e-custom-supportFile/src/platform/testing/e2e/cypress/support/index.js b/system-tests/projects/migration-e2e-custom-supportFile/src/platform/testing/e2e/cypress/support/index.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/migration-e2e-custom-supportFile/src/platform/testing/e2e/cypress/support/index.js +++ b/system-tests/projects/migration-e2e-custom-supportFile/src/platform/testing/e2e/cypress/support/index.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/no-specs-vue-2/cypress/support/component.js b/system-tests/projects/no-specs-vue-2/cypress/support/component.js index 3d1a3d225bb..2d7d3ce5500 100644 --- a/system-tests/projects/no-specs-vue-2/cypress/support/component.js +++ b/system-tests/projects/no-specs-vue-2/cypress/support/component.js @@ -16,9 +16,6 @@ // Import commands.js using ES2015 syntax: import './commands' -// Alternatively you can use CommonJS syntax: -// require('./commands') - import { mount } from 'cypress/vue2' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/no-specs/cypress/support/component.js b/system-tests/projects/no-specs/cypress/support/component.js index be20eaa89ea..6501bab5dc2 100644 --- a/system-tests/projects/no-specs/cypress/support/component.js +++ b/system-tests/projects/no-specs/cypress/support/component.js @@ -16,9 +16,6 @@ // Import commands.js using ES2015 syntax: import './commands' -// Alternatively you can use CommonJS syntax: -// require('./commands') - import { mount } from 'cypress/react' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/plugin-code-coverage/cypress/support/e2e.js b/system-tests/projects/plugin-code-coverage/cypress/support/e2e.js index cfb691980e1..4db62f4dd27 100644 --- a/system-tests/projects/plugin-code-coverage/cypress/support/e2e.js +++ b/system-tests/projects/plugin-code-coverage/cypress/support/e2e.js @@ -15,5 +15,3 @@ // Import commands.js using ES2015 syntax: import '@cypress/code-coverage/support' -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/plugin-returns-bad-config/cypress/support/e2e.js b/system-tests/projects/plugin-returns-bad-config/cypress/support/e2e.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/plugin-returns-bad-config/cypress/support/e2e.js +++ b/system-tests/projects/plugin-returns-bad-config/cypress/support/e2e.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/e2e.js b/system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/e2e.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/e2e.js +++ b/system-tests/projects/plugin-returns-empty-browsers-list/cypress/support/e2e.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/plugin-returns-invalid-browser/cypress/support/e2e.js b/system-tests/projects/plugin-returns-invalid-browser/cypress/support/e2e.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/plugin-returns-invalid-browser/cypress/support/e2e.js +++ b/system-tests/projects/plugin-returns-invalid-browser/cypress/support/e2e.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/pristine-cjs-project/expected-cypress-js-component-vue.js-3-webpack/support/component.js b/system-tests/projects/pristine-cjs-project/expected-cypress-js-component-vue.js-3-webpack/support/component.js index b234fad4473..07bc139bbac 100644 --- a/system-tests/projects/pristine-cjs-project/expected-cypress-js-component-vue.js-3-webpack/support/component.js +++ b/system-tests/projects/pristine-cjs-project/expected-cypress-js-component-vue.js-3-webpack/support/component.js @@ -16,9 +16,6 @@ // Import commands.js using ES2015 syntax: import './commands' -// Alternatively you can use CommonJS syntax: -// require('./commands') - import { mount } from 'cypress/vue' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/pristine-module/expected-cypress-js-e2e/cypress/support/e2e.js b/system-tests/projects/pristine-module/expected-cypress-js-e2e/cypress/support/e2e.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/pristine-module/expected-cypress-js-e2e/cypress/support/e2e.js +++ b/system-tests/projects/pristine-module/expected-cypress-js-e2e/cypress/support/e2e.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/pristine/expected-cypress-js-component-create-react-app-v5/cypress/support/component.js b/system-tests/projects/pristine/expected-cypress-js-component-create-react-app-v5/cypress/support/component.js index 0740174745b..c837ed53657 100644 --- a/system-tests/projects/pristine/expected-cypress-js-component-create-react-app-v5/cypress/support/component.js +++ b/system-tests/projects/pristine/expected-cypress-js-component-create-react-app-v5/cypress/support/component.js @@ -16,9 +16,6 @@ // Import commands.js using ES2015 syntax: import './commands' -// Alternatively you can use CommonJS syntax: -// require('./commands') - import { mount } from 'cypress/react' Cypress.Commands.add('mount', mount) diff --git a/system-tests/projects/pristine/expected-cypress-js-e2e-without-fixtures/cypress/support/e2e.js b/system-tests/projects/pristine/expected-cypress-js-e2e-without-fixtures/cypress/support/e2e.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/pristine/expected-cypress-js-e2e-without-fixtures/cypress/support/e2e.js +++ b/system-tests/projects/pristine/expected-cypress-js-e2e-without-fixtures/cypress/support/e2e.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/pristine/expected-cypress-js-e2e/cypress/support/e2e.js b/system-tests/projects/pristine/expected-cypress-js-e2e/cypress/support/e2e.js index d1dd1353e81..92e5881f407 100644 --- a/system-tests/projects/pristine/expected-cypress-js-e2e/cypress/support/e2e.js +++ b/system-tests/projects/pristine/expected-cypress-js-e2e/cypress/support/e2e.js @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5-without-fixtures/cypress/support/component.ts b/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5-without-fixtures/cypress/support/component.ts index d7870eef01f..ffc13665d98 100644 --- a/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5-without-fixtures/cypress/support/component.ts +++ b/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5-without-fixtures/cypress/support/component.ts @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5/cypress/support/component.ts b/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5/cypress/support/component.ts index 697e105d1a3..e1621ac9707 100644 --- a/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5/cypress/support/component.ts +++ b/system-tests/projects/pristine/expected-cypress-ts-component-create-react-app-v5/cypress/support/component.ts @@ -16,9 +16,6 @@ // Import commands.js using ES2015 syntax: import './commands' -// Alternatively you can use CommonJS syntax: -// require('./commands') - import { mount } from 'cypress/react' // Augment the Cypress namespace to include type definitions for diff --git a/system-tests/projects/pristine/expected-cypress-ts-e2e/cypress/support/e2e.ts b/system-tests/projects/pristine/expected-cypress-ts-e2e/cypress/support/e2e.ts index ed5730de114..c90b6b6d3e0 100644 --- a/system-tests/projects/pristine/expected-cypress-ts-e2e/cypress/support/e2e.ts +++ b/system-tests/projects/pristine/expected-cypress-ts-e2e/cypress/support/e2e.ts @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/ts-proj-4-5/cypress/support/e2e.ts b/system-tests/projects/ts-proj-4-5/cypress/support/e2e.ts index 503f34fc155..d96d8bd77cd 100644 --- a/system-tests/projects/ts-proj-4-5/cypress/support/e2e.ts +++ b/system-tests/projects/ts-proj-4-5/cypress/support/e2e.ts @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: // import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/ts-proj-5/cypress/support/e2e.ts b/system-tests/projects/ts-proj-5/cypress/support/e2e.ts index 503f34fc155..d96d8bd77cd 100644 --- a/system-tests/projects/ts-proj-5/cypress/support/e2e.ts +++ b/system-tests/projects/ts-proj-5/cypress/support/e2e.ts @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: // import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/system-tests/projects/ts-proj/cypress/support/e2e.ts b/system-tests/projects/ts-proj/cypress/support/e2e.ts index ed5730de114..c90b6b6d3e0 100644 --- a/system-tests/projects/ts-proj/cypress/support/e2e.ts +++ b/system-tests/projects/ts-proj/cypress/support/e2e.ts @@ -15,6 +15,3 @@ // Import commands.js using ES2015 syntax: import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') From 74cf21643eac4e40e6d1ceb0058e9d841d374bee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:15:32 -0500 Subject: [PATCH 10/23] chore: Update Chrome (stable) to 131.0.6778.139 (#30743) * chore: Update Chrome (stable) to 131.0.6778.139 * empty commit --------- Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Jennifer Shehane --- browser-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-versions.json b/browser-versions.json index d402b7236bb..e3997256ea0 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,5 +1,5 @@ { "chrome:beta": "132.0.6834.32", - "chrome:stable": "131.0.6778.108", + "chrome:stable": "131.0.6778.139", "chrome:minimum": "64.0.3282.0" } From 3e1d4b9eff85cb969a956b1ee992a8fce84e6219 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:49:24 -0600 Subject: [PATCH 11/23] chore(deps): update yarn to >=1.22.22 (#30745) * chore(deps): update yarn to >=1.22.22 * empty commit * chore: update dependencies to resolve yarn versioning issue * bump cache * try to fix build * try to fix build --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jennifer Shehane Co-authored-by: Ryan Manuel --- .circleci/cache-version.txt | 2 +- .circleci/workflows.yml | 10 +++--- package.json | 2 +- yarn.lock | 65 ++++++++++++++++++++++++++++++++++--- 4 files changed, 67 insertions(+), 12 deletions(-) diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 1dd4a2276a0..f82a827eb24 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -11-5-24 +12-11-24 diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 109dd3d2378..676f9503e0c 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'chore/update_reporter_mobx' + - 'renovate/yarn-1.x' - 'publish-binary' # usually we don't build Mac app - it takes a long time @@ -42,7 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'ryanm/experiment/esm', << pipeline.git.branch >> ] + - equal: [ 'renovate/yarn-1.x', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ] + - equal: [ 'renovate/yarn-1.x', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ] + - equal: [ 'renovate/yarn-1.x', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -1772,7 +1772,7 @@ jobs: PLATFORM: linux machine: # using `machine` gives us a Linux VM that can run Docker - image: ubuntu-2004:202111-02 + image: ubuntu-2004:2023.07.1 docker_layer_caching: true resource_class: medium steps: diff --git a/package.json b/package.json index 513aaad6089..dc7c145e8b0 100644 --- a/package.json +++ b/package.json @@ -212,7 +212,7 @@ }, "engines": { "node": ">=18.17.0", - "yarn": ">=1.22.17" + "yarn": ">=1.22.22" }, "productName": "Cypress", "license": "MIT", diff --git a/yarn.lock b/yarn.lock index 1d2b449bd04..b7545677d55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21331,7 +21331,7 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1, loose-envify@^1.4 dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.1, loupe@^2.3.6: +loupe@^2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== @@ -22254,7 +22254,7 @@ mobx@6.13.5: resolved "https://registry.npmjs.org/mobx/-/mobx-6.13.5.tgz#957d9df88c7f8b4baa7c6f8bdcb6d68b432a6ed5" integrity sha512-/HTWzW2s8J1Gqt+WmUj5Y0mddZk+LInejADc79NJadrWla3rHzmRHki/mnEUH1AvOmbNTZ1BRbKxr8DSgfdjMA== -"mocha-7.0.1@npm:mocha@7.0.1", mocha@7.0.1: +"mocha-7.0.1@npm:mocha@7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.0.1.tgz#276186d35a4852f6249808c6dd4a1376cbf6c6ce" integrity sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg== @@ -22371,6 +22371,36 @@ mocha@6.2.2: yargs-parser "13.1.1" yargs-unparser "1.6.0" +mocha@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.0.1.tgz#276186d35a4852f6249808c6dd4a1376cbf6c6ce" + integrity sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "2.2.0" + minimatch "3.0.4" + mkdirp "0.5.1" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.0" + yargs-parser "13.1.1" + yargs-unparser "1.6.0" + mocha@7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.0.tgz#c784f579ad0904d29229ad6cb1e2514e4db7d249" @@ -29130,7 +29160,7 @@ string-template@~0.2.1: resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -29156,6 +29186,15 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -29257,7 +29296,7 @@ stringify-object@^3.0.0, stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -29278,6 +29317,13 @@ strip-ansi@5.2.0, strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -32287,7 +32333,7 @@ workerpool@6.2.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -32330,6 +32376,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 499c36163670b85e9f02630bdf3bbf704e8c540d Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Thu, 12 Dec 2024 07:42:35 -0700 Subject: [PATCH 12/23] test: match newline in Firefox CDP spawn message (#30753) --- system-tests/lib/normalizeStdout.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-tests/lib/normalizeStdout.ts b/system-tests/lib/normalizeStdout.ts index 77d960b57c3..5dbf7f04bf8 100644 --- a/system-tests/lib/normalizeStdout.ts +++ b/system-tests/lib/normalizeStdout.ts @@ -165,7 +165,7 @@ export const normalizeStdout = function (str: string, options: any = {}) { // Replaces connection warning since Chrome or Firefox sometimes take longer to connect .replace(/Still waiting to connect to .+, retrying in 1 second \(attempt .+\/.+\)\n/g, '') // Replaces CDP connection error message in Firefox since Cypress will retry - .replace(/Failed to spawn CDP with Firefox. Retrying.*\.\.\./, '') + .replace(/Failed to spawn CDP with Firefox. Retrying.*\.\.\.\n/g, '') if (options.browser === 'webkit') { // WebKit throws for lookups on undefined refs with "Can't find variable: " From b33978618f74eb4cb39c602bd5c264814b209a9e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:53:24 -0500 Subject: [PATCH 13/23] chore: Update v8 snapshot cache - darwin (#30740) * chore: updating v8 snapshot cache * index on develop: 74cf21643e chore: Update Chrome (stable) to 131.0.6778.139 (#30743) --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Ryan Manuel Co-authored-by: Jennifer Shehane --- tooling/v8-snapshot/cache/darwin/snapshot-meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/v8-snapshot/cache/darwin/snapshot-meta.json b/tooling/v8-snapshot/cache/darwin/snapshot-meta.json index 522a123ca30..5a52f6d9f1b 100644 --- a/tooling/v8-snapshot/cache/darwin/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/darwin/snapshot-meta.json @@ -4249,5 +4249,5 @@ "./tooling/v8-snapshot/cache/darwin/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "2e76ee3eb48ec47a4627a4c7d5f39cbf8586601c4fca32b250efef671d7016c1" + "deferredHash": "ca5ac2cd877d4a2d2614f8a49a04badcce7f12a1f9962d6f1dbdebe4aaa797ff" } \ No newline at end of file From e538359048e2dab34da2d245185b82749ed02971 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:54:44 -0500 Subject: [PATCH 14/23] chore: Update v8 snapshot cache - linux (#30741) * chore: updating v8 snapshot cache * index on develop: 74cf21643e chore: Update Chrome (stable) to 131.0.6778.139 (#30743) --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Ryan Manuel Co-authored-by: Jennifer Shehane --- tooling/v8-snapshot/cache/linux/snapshot-meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/v8-snapshot/cache/linux/snapshot-meta.json b/tooling/v8-snapshot/cache/linux/snapshot-meta.json index 2224eeb09af..19eebed4721 100644 --- a/tooling/v8-snapshot/cache/linux/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/linux/snapshot-meta.json @@ -4252,5 +4252,5 @@ "./tooling/v8-snapshot/cache/linux/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "2e76ee3eb48ec47a4627a4c7d5f39cbf8586601c4fca32b250efef671d7016c1" + "deferredHash": "ca5ac2cd877d4a2d2614f8a49a04badcce7f12a1f9962d6f1dbdebe4aaa797ff" } \ No newline at end of file From 58297dd2b4e1478e2d82b0d42173c21a2037cd83 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:55:23 -0500 Subject: [PATCH 15/23] chore: Update v8 snapshot cache - windows (#30742) * chore: updating v8 snapshot cache * index on develop: 74cf21643e chore: Update Chrome (stable) to 131.0.6778.139 (#30743) --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Ryan Manuel Co-authored-by: Jennifer Shehane --- tooling/v8-snapshot/cache/win32/snapshot-meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/v8-snapshot/cache/win32/snapshot-meta.json b/tooling/v8-snapshot/cache/win32/snapshot-meta.json index 32828f1a990..ec31f89070a 100644 --- a/tooling/v8-snapshot/cache/win32/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/win32/snapshot-meta.json @@ -4252,5 +4252,5 @@ "./tooling/v8-snapshot/cache/win32/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "8c57b8f85b74c4d3743037fb216da9018cb7e3d8f510e6c0db0468ede2a35437" + "deferredHash": "7fcd9f681310aeb62da4137d956aa8b73597c9f8aa4e1c34192ca08caef2cb72" } \ No newline at end of file From 53d47cfc81a32c9dbef0fbad9592eed0d447d213 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:01:54 -0500 Subject: [PATCH 16/23] chore: Update Chrome (beta) to 132.0.6834.46 (#30755) * chore: Update Chrome (beta) to 132.0.6834.46 * empty commit --------- Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com> Co-authored-by: Jennifer Shehane --- browser-versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-versions.json b/browser-versions.json index e3997256ea0..5875a901c07 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,5 +1,5 @@ { - "chrome:beta": "132.0.6834.32", + "chrome:beta": "132.0.6834.46", "chrome:stable": "131.0.6778.139", "chrome:minimum": "64.0.3282.0" } From 68c5714f1a89aa77ff3cb1a33850797a3e72d165 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Mon, 16 Dec 2024 11:12:40 -0500 Subject: [PATCH 17/23] chore: Cleanup duplication across tsconfig files in packages (#30764) * Cleanup duplication across tsconfig files in packages * empty commit * Add ts-ignore * Add ts-ignore --- packages/app/tsconfig.json | 2 - packages/config/tsconfig.json | 10 -- packages/data-context/tsconfig.json | 11 -- packages/driver/tsconfig.json | 8 - packages/errors/tsconfig.json | 10 -- packages/extension/tsconfig.json | 7 +- packages/frontend-shared/tsconfig.json | 59 +------ .../graphql/src/utils/nexusTypegenUtils.ts | 1 - packages/graphql/tsconfig.json | 11 -- packages/icons/tsconfig.json | 12 -- packages/launcher/tsconfig.json | 1 - packages/reporter/tsconfig.json | 1 - packages/scaffold-config/tsconfig.json | 11 -- packages/server/lib/automation/util.ts | 2 + packages/server/lib/modes/interactive.ts | 1 + packages/server/tsconfig.json | 7 - packages/socket/tsconfig.json | 1 - packages/telemetry/tsconfig.json | 5 - packages/ts/README.md | 2 +- packages/ts/tsconfig.json | 163 ++++++++++++------ 20 files changed, 115 insertions(+), 210 deletions(-) diff --git a/packages/app/tsconfig.json b/packages/app/tsconfig.json index a96c821699a..347deb1bb0b 100644 --- a/packages/app/tsconfig.json +++ b/packages/app/tsconfig.json @@ -13,7 +13,6 @@ ], "compilerOptions": { "noImplicitThis": true, - "useDefineForClassFields": true, "paths": { "@cy/i18n": ["../frontend-shared/src/locales/i18n"], "@cy/components/*": ["../frontend-shared/src/components/*"], @@ -21,7 +20,6 @@ "@cy/store/*": ["../frontend-shared/src/store/*"], "@packages/*": ["../*"] }, - "allowJs": true, "types": [ "cypress", "cypress-real-events", diff --git a/packages/config/tsconfig.json b/packages/config/tsconfig.json index 06872625a5b..cf4b494620f 100644 --- a/packages/config/tsconfig.json +++ b/packages/config/tsconfig.json @@ -7,19 +7,9 @@ "test" ], "compilerOptions": { - "strict": true, "allowJs": false, "rootDir": "src", "noImplicitAny": true, - "resolveJsonModule": true, - "experimentalDecorators": true, - "noUncheckedIndexedAccess": true, - "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", "types": ["node"], "typeRoots": [ "../../node_modules/@types" diff --git a/packages/data-context/tsconfig.json b/packages/data-context/tsconfig.json index 69d4331d902..587382a7499 100644 --- a/packages/data-context/tsconfig.json +++ b/packages/data-context/tsconfig.json @@ -9,19 +9,8 @@ ], "compilerOptions": { "lib": ["esnext"], - "strict": true, "allowJs": false, "noImplicitAny": true, - "resolveJsonModule": true, - "experimentalDecorators": true, - "noUnusedLocals": false, - "noUncheckedIndexedAccess": true, - "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", "types": ["cypress"], } } \ No newline at end of file diff --git a/packages/driver/tsconfig.json b/packages/driver/tsconfig.json index b22d122add9..33203e37004 100644 --- a/packages/driver/tsconfig.json +++ b/packages/driver/tsconfig.json @@ -3,23 +3,15 @@ "compilerOptions": { "target": "ES2016", "lib": ["ES2021", "DOM", "DOM.Iterable"], - "module": "commonjs", "allowJs": true, - "noImplicitAny": false, "noImplicitThis": false, "strictFunctionTypes": true, "preserveWatchOutput": true, "sourceMap": true, - "importHelpers": true, "strictNullChecks": true, - "strict": true, "forceConsistentCasingInFileNames": true, - "skipLibCheck": true, "noEmit": true, - "noImplicitReturns": true, - "allowSyntheticDefaultImports": true, "outDir": "dist", - "esModuleInterop": true, "noErrorTruncation": true, "types": [] }, diff --git a/packages/errors/tsconfig.json b/packages/errors/tsconfig.json index e4d65fa8668..dfb951b17cd 100644 --- a/packages/errors/tsconfig.json +++ b/packages/errors/tsconfig.json @@ -4,18 +4,8 @@ "src", ], "compilerOptions": { - "strict": true, "allowJs": false, "noImplicitAny": true, - "resolveJsonModule": true, - "experimentalDecorators": true, "noImplicitReturns": false, - "noUncheckedIndexedAccess": true, - "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", } } \ No newline at end of file diff --git a/packages/extension/tsconfig.json b/packages/extension/tsconfig.json index 2553bd5cab6..aa782866197 100644 --- a/packages/extension/tsconfig.json +++ b/packages/extension/tsconfig.json @@ -1,12 +1,7 @@ { + "extends": "../ts/tsconfig.json", "compilerOptions": { "target": "es2015", - "module": "commonjs", - "allowJs": true, - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "noImplicitAny": false, - "importHelpers": true, "strict": false } } diff --git a/packages/frontend-shared/tsconfig.json b/packages/frontend-shared/tsconfig.json index 29b65c44030..4c289529aba 100644 --- a/packages/frontend-shared/tsconfig.json +++ b/packages/frontend-shared/tsconfig.json @@ -1,55 +1,12 @@ { + "extends": "../ts/tsconfig.json", "compilerOptions": { - /* Basic Options */ - "target": "ES2018", "module": "esnext", "lib": ["dom", "ESNext"], - /* - * Allow javascript files to be compiled. - * Override this in modules that need JS - */ - "noEmit": true, "jsx": "preserve", "preserveWatchOutput": true, - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - /* Generates corresponding '.d.ts' file. */ - // "declaration": true, - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - /* Generates corresponding '.map' file. */ - "sourceMap": true, - /* Import emit helpers from 'tslib'. */ - "importHelpers": true, - "strictNullChecks": true, - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - // "traceResolution": true, - "strict": true, - "noImplicitAny": false, "noImplicitThis": false, - "forceConsistentCasingInFileNames": true, - /** - * Skip type checking of all declaration files (*.d.ts). - * TODO: Look into changing this in the future - */ - /* Additional Checks */ - "skipLibCheck": true, - /* Report errors on unused locals. */ - // "noEmit": true, - "noUnusedLocals": false, - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - /* Report error when not all code paths in function return a value. */ - "noImplicitReturns": true, - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": ["../driver/src"], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [] /* List of folders to include type definitions from. */ - - /* Type declaration files to be included in compilation. */ + "noErrorTruncation": true, "paths": { "@cy/i18n": ["../frontend-shared/src/locales/i18n"], "@cy/components/*": ["../frontend-shared/src/components/*"] @@ -63,17 +20,5 @@ "cypress-real-events", "cypress" ], - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "noErrorTruncation": true, - "experimentalDecorators": true, - "resolveJsonModule": true, - "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", - "useUnknownInCatchVariables": false } } diff --git a/packages/graphql/src/utils/nexusTypegenUtils.ts b/packages/graphql/src/utils/nexusTypegenUtils.ts index bd8793b09e0..f209bc45af2 100644 --- a/packages/graphql/src/utils/nexusTypegenUtils.ts +++ b/packages/graphql/src/utils/nexusTypegenUtils.ts @@ -92,7 +92,6 @@ const nexusTypegenDebounced = (cfg: NexusTypegenCfg) => { debounced[cfg.filePath] = debounced[cfg.filePath] ?? _.debounce(nexusTypegen, 500) - // @ts-expect-error debounced[cfg.filePath](cfg) } diff --git a/packages/graphql/tsconfig.json b/packages/graphql/tsconfig.json index 1b1ae93cc44..d7e45065be2 100644 --- a/packages/graphql/tsconfig.json +++ b/packages/graphql/tsconfig.json @@ -10,19 +10,8 @@ ], "compilerOptions": { "lib": ["esnext"], - "strict": true, "allowJs": false, "noImplicitAny": true, - "noUnusedLocals": false, - "resolveJsonModule": true, - "experimentalDecorators": true, - "noUncheckedIndexedAccess": true, - "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", "types": [] }, } diff --git a/packages/icons/tsconfig.json b/packages/icons/tsconfig.json index 0c6beeacaeb..8995f295a6c 100644 --- a/packages/icons/tsconfig.json +++ b/packages/icons/tsconfig.json @@ -1,20 +1,8 @@ { "extends": "../ts/tsconfig.json", "compilerOptions": { - "strict": true, "allowJs": false, "noImplicitAny": true, - "noUnusedLocals": false, - "resolveJsonModule": true, - "experimentalDecorators": true, - "noUncheckedIndexedAccess": true, - "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", "outDir": "dist", - "declaration": true }, } \ No newline at end of file diff --git a/packages/launcher/tsconfig.json b/packages/launcher/tsconfig.json index 22cbe18d5cb..41c9480108b 100644 --- a/packages/launcher/tsconfig.json +++ b/packages/launcher/tsconfig.json @@ -5,7 +5,6 @@ "./index.ts" ], "compilerOptions": { - "skipLibCheck": true }, "files": [ "./../ts/index.d.ts" diff --git a/packages/reporter/tsconfig.json b/packages/reporter/tsconfig.json index 99b6a70b5bf..be6c7cd941b 100644 --- a/packages/reporter/tsconfig.json +++ b/packages/reporter/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../ts/tsconfig.json", "compilerOptions": { - "useDefineForClassFields": true, "types": [ "node", "cypress", diff --git a/packages/scaffold-config/tsconfig.json b/packages/scaffold-config/tsconfig.json index 935ec8b2ab6..ae027f65008 100644 --- a/packages/scaffold-config/tsconfig.json +++ b/packages/scaffold-config/tsconfig.json @@ -10,19 +10,8 @@ ], "compilerOptions": { "lib": ["esnext"], - "strict": true, "allowJs": false, "noImplicitAny": true, - "resolveJsonModule": true, - "experimentalDecorators": true, - "noUnusedLocals": false, - "noUncheckedIndexedAccess": true, - "ignoreDeprecations": "5.0", - /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", "types": [] } } \ No newline at end of file diff --git a/packages/server/lib/automation/util.ts b/packages/server/lib/automation/util.ts index bc3caab879d..baf04a9ec32 100644 --- a/packages/server/lib/automation/util.ts +++ b/packages/server/lib/automation/util.ts @@ -1,6 +1,7 @@ import type playwright from 'playwright-webkit' import { domainMatch } from 'tough-cookie' +// @ts-ignore export type CyCookie = Pick & { // use `undefined` instead of `unspecified` sameSite?: 'no_restriction' | 'lax' | 'strict' @@ -8,6 +9,7 @@ export type CyCookie = Pick { diff --git a/packages/server/lib/modes/interactive.ts b/packages/server/lib/modes/interactive.ts index c58dfa2a3e8..bca0c83b11b 100644 --- a/packages/server/lib/modes/interactive.ts +++ b/packages/server/lib/modes/interactive.ts @@ -125,6 +125,7 @@ export = { show: true, frame: true, transparent: false, + // @ts-ignore icon: image.createFromPath(cyIcons.getPathToIcon('icon_64x64.png')), }, } diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index 5a241504201..9c69ae92c34 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -9,12 +9,5 @@ ], "compilerOptions": { "lib": ["esnext"], - "types": [ - "mocha", - "node" - ], - "resolveJsonModule": true, - "noUnusedLocals": false, - "importHelpers": true } } diff --git a/packages/socket/tsconfig.json b/packages/socket/tsconfig.json index 9b7d0907d5e..94523723d34 100644 --- a/packages/socket/tsconfig.json +++ b/packages/socket/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "./../ts/tsconfig.json", "compilerOptions": { - "strict": true, "noImplicitAny": true, "skipLibCheck": false }, diff --git a/packages/telemetry/tsconfig.json b/packages/telemetry/tsconfig.json index edd15e17bb4..d887c0486cc 100644 --- a/packages/telemetry/tsconfig.json +++ b/packages/telemetry/tsconfig.json @@ -4,13 +4,8 @@ "compilerOptions": { "outDir": "./dist", "lib": ["esnext", "DOM"], - "strict": true, "allowJs": false, "noImplicitAny": true, - "resolveJsonModule": true, - "experimentalDecorators": true, - "noUnusedLocals": false, - "noUncheckedIndexedAccess": true, "types": ["cypress"], } } diff --git a/packages/ts/README.md b/packages/ts/README.md index dcf27567d4d..4c46ce9e238 100644 --- a/packages/ts/README.md +++ b/packages/ts/README.md @@ -1,6 +1,6 @@ # TS -Internal package used to standardize this repo's version of `ts-node` used for development. In production we pre-transpile all of the typescript so this packages `register` export is a no-op +Internal package used to standardize this repo's version of `ts-node` and the base `tsconfig` options used for development. In production we pre-transpile all of the typescript so this packages `register` export is a no-op ## Installing N/A - handled by the top level `yarn install` diff --git a/packages/ts/tsconfig.json b/packages/ts/tsconfig.json index 0f0e239b759..20f39e2b453 100644 --- a/packages/ts/tsconfig.json +++ b/packages/ts/tsconfig.json @@ -1,65 +1,118 @@ { "compilerOptions": { - /* Basic Options */ - "target": "ES2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ - "lib": ["es2021"], /* Specify library files to be included in the compilation: */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - "jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "skipLibCheck": true, - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - "useUnknownInCatchVariables": false, + /* Visit https://aka.ms/tsconfig to read more about this file */ - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Additional Checks */ - - // noUnusedLocals should be linted, not type-check'ed - "noUnusedLocals": false, /* Report errors on unused locals. */ - "noUnusedParameters": false, /* Report errors on unused parameters. */ - "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* Language and Environment */ + "target": "ES2018", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "lib": ["es2021"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "jsx": "react", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - //"typeRoots": [], /* List of folders to include type definitions from. */ - "types": ["mocha", "node"], /* Type declaration files to be included in compilation. */ - "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + "types": ["mocha", "node"], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - /* Source Map Options */ - // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - /* Experimental Options */ - "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - "ignoreDeprecations": "5.0", + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + /* + * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior + * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. + */ + "importsNotUsedAsValues": "error", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": false, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + "useUnknownInCatchVariables": false, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + "noUnusedLocals": false, /* Enable error reporting when local variables aren't read. */ + "noUnusedParameters": false, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + /* - * TODO: remove importsNotUsedAsValues after typescript 5.5 and up as it will no longer work. If we want the same behavior - * as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module. - */ - "importsNotUsedAsValues": "error", - "resolveJsonModule": true + * TODO: remove ignoreDeprecations after typescript 5.5. This is used to assist in the transition to typescript 5.5 and up. + */ + "ignoreDeprecations": "5.0", } } From 0c3c497c1d8904dc0070321cd622a853822b14c7 Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Mon, 16 Dec 2024 10:39:06 -0700 Subject: [PATCH 18/23] feat: add support for chrome for testing browser (#30751) --- .circleci/workflows.yml | 10 +- cli/CHANGELOG.md | 6 +- packages/app/cypress/e2e/top-nav.cy.ts | 8 +- .../app/src/debug/LayeredBrowserIcons.cy.tsx | 8 +- .../app/src/debug/LayeredBrowserIcons.vue | 33 ++- .../BROWSER_NOT_FOUND_BY_NAME - canary.html | 9 +- .../BROWSER_NOT_FOUND_BY_NAME.html | 9 +- packages/errors/src/errors.ts | 2 +- .../src/assets/browserLogos.ts | 6 +- .../logos/browser-chrome-for-testing_x16.svg | 33 +++ .../__snapshots__/browsers_spec.ts.js | 51 ++-- .../launcher/__snapshots__/darwin_spec.ts.js | 107 ++++--- .../launcher/__snapshots__/windows_spec.ts.js | 260 ++++++++++++++---- packages/launcher/lib/darwin/index.ts | 40 +-- packages/launcher/lib/darwin/util.ts | 12 +- packages/launcher/lib/known-browsers.ts | 49 ++-- packages/launcher/lib/windows/index.ts | 21 +- packages/launcher/test/unit/darwin_spec.ts | 2 +- packages/launcher/test/unit/windows_spec.ts | 52 +++- .../cypress/e2e/choose-a-browser.cy.ts | 20 +- .../launchpad/cypress/e2e/project-setup.cy.ts | 6 +- .../e2e/system-tests/config-spec.cy.ts | 2 +- .../server/__snapshots__/browsers_spec.js | 4 +- packages/server/lib/util/chromium_flags.ts | 2 +- .../component_testing_spec.ts.js | 4 +- system-tests/__snapshots__/plugins_spec.js | 2 +- system-tests/__snapshots__/record_spec.js | 2 +- system-tests/__snapshots__/retries_spec.ts.js | 4 +- .../vite_dev_server_fresh_spec.ts.js | 70 ++--- .../webpack_dev_server_fresh_spec.ts.js | 70 ++--- .../cypress/e2e/default_size.cy.js | 2 +- yarn.lock | 4 +- 32 files changed, 598 insertions(+), 312 deletions(-) create mode 100644 packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 676f9503e0c..58463853349 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'renovate/yarn-1.x' + - 'mschile/chrome_for_testing' - 'publish-binary' # usually we don't build Mac app - it takes a long time @@ -42,7 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'renovate/yarn-1.x', << pipeline.git.branch >> ] + - equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'renovate/yarn-1.x', << pipeline.git.branch >> ] + - equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'renovate/yarn-1.x', << pipeline.git.branch >> ] + - equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -152,7 +152,7 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "ryanm/experiment/esm" ]]; then + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "mschile/chrome_for_testing" ]]; then export SHOULD_PERSIST_ARTIFACTS=true fi' >> "$BASH_ENV" # You must run `setup_should_persist_artifacts` command and be using bash before running this command diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 499d4661db1..a84d8616767 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,8 +1,12 @@ -## 13.16.2 +## 13.17.0 _Released 12/17/2024 (PENDING)_ +**Features:** + +- Added official support for the [Google Chrome for Testing](https://github.com/GoogleChromeLabs/chrome-for-testing) browser. Assuming the browser is in a location where it can be [auto-detected](https://on.cypress.io/troubleshooting-launching-browsers), it can be launched by providing the `--browser chrome-for-testing` option. If it can't be auto-detected, the path to the browser can also be provided. Previously [customizing the available browsers](https://on.cypress.io/customize-browsers) was required. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554). + **Bugfixes:** - Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). diff --git a/packages/app/cypress/e2e/top-nav.cy.ts b/packages/app/cypress/e2e/top-nav.cy.ts index 417642390f0..52ec9e8d7b0 100644 --- a/packages/app/cypress/e2e/top-nav.cy.ts +++ b/packages/app/cypress/e2e/top-nav.cy.ts @@ -44,7 +44,7 @@ describe('App Top Nav Workflows', () => { .should('have.attr', 'src') .and('contain', 'firefox') - cy.findByTestId('top-nav-active-browser').should('contain', 'Firefox 5') + cy.findByTestId('top-nav-active-browser').should('contain', 'Firefox 6') }) }) @@ -82,19 +82,19 @@ describe('App Top Nav Workflows', () => { cy.get('@browserItems').eq(1) .should('contain', 'Edge') - .and('contain', 'Version 8') + .and('contain', 'Version 9') .findByTestId('top-nav-browser-list-selected-item') .should('not.exist') cy.get('@browserItems').eq(2) .should('contain', 'Electron') - .and('contain', 'Version 12') + .and('contain', 'Version 13') .findByTestId('top-nav-browser-list-selected-item') .should('not.exist') cy.get('@browserItems').eq(3) .should('contain', 'Firefox') - .and('contain', 'Version 5') + .and('contain', 'Version 6') .findByTestId('top-nav-browser-list-selected-item') .should('not.exist') }) diff --git a/packages/app/src/debug/LayeredBrowserIcons.cy.tsx b/packages/app/src/debug/LayeredBrowserIcons.cy.tsx index 2de78fafab0..410812b4653 100644 --- a/packages/app/src/debug/LayeredBrowserIcons.cy.tsx +++ b/packages/app/src/debug/LayeredBrowserIcons.cy.tsx @@ -2,7 +2,7 @@ import LayeredBrowserIcons from './LayeredBrowserIcons.vue' import type { BrowserType } from './LayeredBrowserIcons.vue' describe('', () => { - const browsers: BrowserType[] = ['CHROME', 'CHROME-CANARY', 'CHROME BETA', 'FIREFOX', 'WEBKIT', 'EDGE', 'ELECTRON'] + const browsers: BrowserType[] = ['CHROME', 'CHROME BETA', 'CANARY', 'CHROME CANARY', 'CHROME FOR TESTING', 'CUSTOM CHROME FOR TESTING', 'CHROMIUM', 'CUSTOM CHROMIUM', 'EDGE', 'EDGE BETA', 'EDGE CANARY', 'EDGE DEV', 'ELECTRON', 'FIREFOX', 'FIREFOX DEVELOPER EDITION', 'FIREFOX NIGHTLY', 'WEBKIT'] it('mounts correctly for single browser', () => { browsers.forEach((ele) => { @@ -21,11 +21,11 @@ describe('', () => {
- + - + - +
)) diff --git a/packages/app/src/debug/LayeredBrowserIcons.vue b/packages/app/src/debug/LayeredBrowserIcons.vue index 07bb58c767d..4cb4032cd3b 100644 --- a/packages/app/src/debug/LayeredBrowserIcons.vue +++ b/packages/app/src/debug/LayeredBrowserIcons.vue @@ -20,20 +20,19 @@ diff --git a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html index 95f021d5471..f3176b9f8ef 100644 --- a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html +++ b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME - canary.html @@ -42,7 +42,7 @@ - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox @@ -50,18 +50,19 @@ Available browsers found on your system are: - chrome - - chromium - chrome:beta - chrome:canary + - chrome-for-testing + - chromium - firefox - firefox:dev - firefox:nightly - edge - - edge:canary - edge:beta + - edge:canary - edge:dev Note: In Cypress version 4.0.0, Canary must be launched as chrome:canary, not canary. -See https://on.cypress.io/migration-guide for more information on breaking changes in 4.0.0. +See https://on.cypress.io/migration-guide for more information on breaking changes in 4.0.0. \ No newline at end of file diff --git a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html index d29ace7a0dc..2ee1cd1ce62 100644 --- a/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html +++ b/packages/errors/__snapshot-html__/BROWSER_NOT_FOUND_BY_NAME.html @@ -42,7 +42,7 @@ - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox @@ -50,14 +50,15 @@ Available browsers found on your system are: - chrome - - chromium - chrome:beta - chrome:canary + - chrome-for-testing + - chromium - firefox - firefox:dev - firefox:nightly - edge - - edge:canary - edge:beta - - edge:dev + - edge:canary + - edge:dev \ No newline at end of file diff --git a/packages/errors/src/errors.ts b/packages/errors/src/errors.ts index d0db72e6967..63cf017b3ca 100644 --- a/packages/errors/src/errors.ts +++ b/packages/errors/src/errors.ts @@ -120,7 +120,7 @@ export const AllCypressErrors = { Browser: ${fmt.highlight(browser)} was not found on your system or is not supported by Cypress. Cypress supports the following browsers: - ${fmt.listItems(['electron', 'chrome', 'chromium', 'chrome:canary', 'edge', 'firefox'])} + ${fmt.listItems(['electron', 'chrome', 'chromium', 'chrome-for-testing', 'edge', 'firefox'])} You can also use a custom browser: https://on.cypress.io/customize-browsers diff --git a/packages/frontend-shared/src/assets/browserLogos.ts b/packages/frontend-shared/src/assets/browserLogos.ts index fb572f9c62a..fb1317acd30 100644 --- a/packages/frontend-shared/src/assets/browserLogos.ts +++ b/packages/frontend-shared/src/assets/browserLogos.ts @@ -4,6 +4,7 @@ import edgeIcon from 'browser-logos/src/edge/edge.svg?url' import electronIcon from 'browser-logos/src/electron/electron.svg?url' import canaryIcon from 'browser-logos/src/chrome-canary/chrome-canary.svg?url' import chromeBetaIcon from 'browser-logos/src/chrome-beta/chrome-beta.svg?url' +import chromeTestIcon from '@packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg?url' import chromiumIcon from 'browser-logos/src/chromium/chromium.svg?url' import edgeBetaIcon from 'browser-logos/src/edge-beta/edge-beta.png' import edgeCanaryIcon from 'browser-logos/src/edge-canary/edge-canary.png' @@ -16,11 +17,12 @@ import genericBrowserLogo from '@packages/frontend-shared/src/assets/logos/gener export const allBrowsersIcons = { 'Electron': electronIcon, 'Chrome': chromeIcon, + 'Chrome Beta': chromeBetaIcon, + 'Chrome Canary': canaryIcon, + 'Chrome for Testing': chromeTestIcon, 'Firefox': firefoxIcon, 'Edge': edgeIcon, 'Chromium': chromiumIcon, - 'Canary': canaryIcon, - 'Chrome Beta': chromeBetaIcon, 'Firefox Nightly': firefoxNightlyIcon, 'Firefox Developer Edition': firefoxDeveloperEditionIcon, 'Edge Canary': edgeCanaryIcon, diff --git a/packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg b/packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg new file mode 100644 index 00000000000..0426ce0ae6e --- /dev/null +++ b/packages/frontend-shared/src/assets/logos/browser-chrome-for-testing_x16.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/packages/launcher/__snapshots__/browsers_spec.ts.js b/packages/launcher/__snapshots__/browsers_spec.ts.js index 41bc8b32e91..e14c627c040 100644 --- a/packages/launcher/__snapshots__/browsers_spec.ts.js +++ b/packages/launcher/__snapshots__/browsers_spec.ts.js @@ -12,18 +12,6 @@ exports['browsers returns the expected list of browsers 1'] = [ ], 'minSupportedVersion': 64, }, - { - 'name': 'chromium', - 'family': 'chromium', - 'channel': 'stable', - 'displayName': 'Chromium', - 'versionRegex': {}, - 'binary': [ - 'chromium-browser', - 'chromium', - ], - 'minSupportedVersion': 64, - }, { 'name': 'chrome', 'family': 'chromium', @@ -37,11 +25,32 @@ exports['browsers returns the expected list of browsers 1'] = [ 'name': 'chrome', 'family': 'chromium', 'channel': 'canary', - 'displayName': 'Canary', + 'displayName': 'Chrome Canary', 'versionRegex': {}, 'binary': 'google-chrome-canary', 'minSupportedVersion': 64, }, + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome for Testing', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + }, + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + }, { 'name': 'firefox', 'family': 'firefox', @@ -90,24 +99,24 @@ exports['browsers returns the expected list of browsers 1'] = [ { 'name': 'edge', 'family': 'chromium', - 'channel': 'canary', - 'displayName': 'Edge Canary', + 'channel': 'beta', + 'displayName': 'Edge Beta', 'versionRegex': {}, 'binary': [ - 'edge-canary', - 'microsoft-edge-canary', + 'edge-beta', + 'microsoft-edge-beta', ], 'minSupportedVersion': 79, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'beta', - 'displayName': 'Edge Beta', + 'channel': 'canary', + 'displayName': 'Edge Canary', 'versionRegex': {}, 'binary': [ - 'edge-beta', - 'microsoft-edge-beta', + 'edge-canary', + 'microsoft-edge-canary', ], 'minSupportedVersion': 79, }, diff --git a/packages/launcher/__snapshots__/darwin_spec.ts.js b/packages/launcher/__snapshots__/darwin_spec.ts.js index 4cd70c8c8c1..0111a4c6c72 100644 --- a/packages/launcher/__snapshots__/darwin_spec.ts.js +++ b/packages/launcher/__snapshots__/darwin_spec.ts.js @@ -16,30 +16,10 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome.app', 'executable': 'Contents/MacOS/Google Chrome', - 'appId': 'com.google.Chrome', + 'bundleId': 'com.google.Chrome', 'versionProperty': 'KSVersion', }, }, - { - 'name': 'chromium', - 'family': 'chromium', - 'channel': 'stable', - 'displayName': 'Chromium', - 'versionRegex': {}, - 'binary': [ - 'chromium-browser', - 'chromium', - ], - 'minSupportedVersion': 64, - 'path': '/Applications/Chromium.app/Contents/MacOS/Chromium', - 'version': 'someVersion', - 'findAppParams': { - 'appName': 'Chromium.app', - 'executable': 'Contents/MacOS/Chromium', - 'appId': 'org.chromium.Chromium', - 'versionProperty': 'CFBundleShortVersionString', - }, - }, { 'name': 'chrome', 'family': 'chromium', @@ -53,7 +33,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Beta.app', 'executable': 'Contents/MacOS/Google Chrome Beta', - 'appId': 'com.google.Chrome.beta', + 'bundleId': 'com.google.Chrome.beta', 'versionProperty': 'KSVersion', }, }, @@ -61,7 +41,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'name': 'chrome', 'family': 'chromium', 'channel': 'canary', - 'displayName': 'Canary', + 'displayName': 'Chrome Canary', 'versionRegex': {}, 'binary': 'google-chrome-canary', 'minSupportedVersion': 64, @@ -70,10 +50,47 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Canary.app', 'executable': 'Contents/MacOS/Google Chrome Canary', - 'appId': 'com.google.Chrome.canary', + 'bundleId': 'com.google.Chrome.canary', 'versionProperty': 'KSVersion', }, }, + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome for Testing', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + 'path': '/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing', + 'version': 'someVersion', + 'findAppParams': { + 'appName': 'Google Chrome for Testing.app', + 'executable': 'Contents/MacOS/Google Chrome for Testing', + 'bundleId': 'com.google.chrome.for.testing', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': '/Applications/Chromium.app/Contents/MacOS/Chromium', + 'version': 'someVersion', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, { 'name': 'firefox', 'family': 'firefox', @@ -87,7 +104,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefox', + 'bundleId': 'org.mozilla.firefox', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -107,7 +124,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Developer Edition.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefoxdeveloperedition', + 'bundleId': 'org.mozilla.firefoxdeveloperedition', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -127,7 +144,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Nightly.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.nightly', + 'bundleId': 'org.mozilla.nightly', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -147,47 +164,47 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge.app', 'executable': 'Contents/MacOS/Microsoft Edge', - 'appId': 'com.microsoft.Edge', + 'bundleId': 'com.microsoft.Edge', 'versionProperty': 'CFBundleShortVersionString', }, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'canary', - 'displayName': 'Edge Canary', + 'channel': 'beta', + 'displayName': 'Edge Beta', 'versionRegex': {}, 'binary': [ - 'edge-canary', - 'microsoft-edge-canary', + 'edge-beta', + 'microsoft-edge-beta', ], 'minSupportedVersion': 79, - 'path': '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary', + 'path': '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta', 'version': 'someVersion', 'findAppParams': { - 'appName': 'Microsoft Edge Canary.app', - 'executable': 'Contents/MacOS/Microsoft Edge Canary', - 'appId': 'com.microsoft.Edge.Canary', + 'appName': 'Microsoft Edge Beta.app', + 'executable': 'Contents/MacOS/Microsoft Edge Beta', + 'bundleId': 'com.microsoft.Edge.Beta', 'versionProperty': 'CFBundleShortVersionString', }, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'beta', - 'displayName': 'Edge Beta', + 'channel': 'canary', + 'displayName': 'Edge Canary', 'versionRegex': {}, 'binary': [ - 'edge-beta', - 'microsoft-edge-beta', + 'edge-canary', + 'microsoft-edge-canary', ], 'minSupportedVersion': 79, - 'path': '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta', + 'path': '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary', 'version': 'someVersion', 'findAppParams': { - 'appName': 'Microsoft Edge Beta.app', - 'executable': 'Contents/MacOS/Microsoft Edge Beta', - 'appId': 'com.microsoft.Edge.Beta', + 'appName': 'Microsoft Edge Canary.app', + 'executable': 'Contents/MacOS/Microsoft Edge Canary', + 'bundleId': 'com.microsoft.Edge.Canary', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -207,7 +224,7 @@ exports['darwin browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Dev.app', 'executable': 'Contents/MacOS/Microsoft Edge Dev', - 'appId': 'com.microsoft.Edge.Dev', + 'bundleId': 'com.microsoft.Edge.Dev', 'versionProperty': 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/__snapshots__/windows_spec.ts.js b/packages/launcher/__snapshots__/windows_spec.ts.js index 0ba7dfb1338..8652d47e249 100644 --- a/packages/launcher/__snapshots__/windows_spec.ts.js +++ b/packages/launcher/__snapshots__/windows_spec.ts.js @@ -16,30 +16,10 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome.app', 'executable': 'Contents/MacOS/Google Chrome', - 'appId': 'com.google.Chrome', + 'bundleId': 'com.google.Chrome', 'versionProperty': 'KSVersion', }, }, - { - 'name': 'chromium', - 'family': 'chromium', - 'channel': 'stable', - 'displayName': 'Chromium', - 'versionRegex': {}, - 'binary': [ - 'chromium-browser', - 'chromium', - ], - 'minSupportedVersion': 64, - 'path': 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe', - 'version': '2.3.4', - 'findAppParams': { - 'appName': 'Chromium.app', - 'executable': 'Contents/MacOS/Chromium', - 'appId': 'org.chromium.Chromium', - 'versionProperty': 'CFBundleShortVersionString', - }, - }, { 'name': 'chrome', 'family': 'chromium', @@ -53,7 +33,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Beta.app', 'executable': 'Contents/MacOS/Google Chrome Beta', - 'appId': 'com.google.Chrome.beta', + 'bundleId': 'com.google.Chrome.beta', 'versionProperty': 'KSVersion', }, }, @@ -61,7 +41,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'name': 'chrome', 'family': 'chromium', 'channel': 'canary', - 'displayName': 'Canary', + 'displayName': 'Chrome Canary', 'versionRegex': {}, 'binary': 'google-chrome-canary', 'minSupportedVersion': 64, @@ -70,10 +50,47 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Google Chrome Canary.app', 'executable': 'Contents/MacOS/Google Chrome Canary', - 'appId': 'com.google.Chrome.canary', + 'bundleId': 'com.google.Chrome.canary', 'versionProperty': 'KSVersion', }, }, + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome for Testing', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/Chrome for Testing/chrome.exe', + 'version': '1.2.3', + 'findAppParams': { + 'appName': 'Google Chrome for Testing.app', + 'executable': 'Contents/MacOS/Google Chrome for Testing', + 'bundleId': 'com.google.chrome.for.testing', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe', + 'version': '2.3.4', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, { 'name': 'firefox', 'family': 'firefox', @@ -87,7 +104,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefox', + 'bundleId': 'org.mozilla.firefox', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -107,7 +124,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Developer Edition.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefoxdeveloperedition', + 'bundleId': 'org.mozilla.firefoxdeveloperedition', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -127,7 +144,7 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Firefox Nightly.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.nightly', + 'bundleId': 'org.mozilla.nightly', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -147,47 +164,47 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge.app', 'executable': 'Contents/MacOS/Microsoft Edge', - 'appId': 'com.microsoft.Edge', + 'bundleId': 'com.microsoft.Edge', 'versionProperty': 'CFBundleShortVersionString', }, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'canary', - 'displayName': 'Edge Canary', + 'channel': 'beta', + 'displayName': 'Edge Beta', 'versionRegex': {}, 'binary': [ - 'edge-canary', - 'microsoft-edge-canary', + 'edge-beta', + 'microsoft-edge-beta', ], 'minSupportedVersion': 79, - 'path': 'C:/Users/flotwig/AppData/Local/Microsoft/Edge SxS/Application/msedge.exe', - 'version': '14', + 'path': 'C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe', + 'version': '12', 'findAppParams': { - 'appName': 'Microsoft Edge Canary.app', - 'executable': 'Contents/MacOS/Microsoft Edge Canary', - 'appId': 'com.microsoft.Edge.Canary', + 'appName': 'Microsoft Edge Beta.app', + 'executable': 'Contents/MacOS/Microsoft Edge Beta', + 'bundleId': 'com.microsoft.Edge.Beta', 'versionProperty': 'CFBundleShortVersionString', }, }, { 'name': 'edge', 'family': 'chromium', - 'channel': 'beta', - 'displayName': 'Edge Beta', + 'channel': 'canary', + 'displayName': 'Edge Canary', 'versionRegex': {}, 'binary': [ - 'edge-beta', - 'microsoft-edge-beta', + 'edge-canary', + 'microsoft-edge-canary', ], 'minSupportedVersion': 79, - 'path': 'C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe', - 'version': '12', + 'path': 'C:/Users/flotwig/AppData/Local/Microsoft/Edge SxS/Application/msedge.exe', + 'version': '14', 'findAppParams': { - 'appName': 'Microsoft Edge Beta.app', - 'executable': 'Contents/MacOS/Microsoft Edge Beta', - 'appId': 'com.microsoft.Edge.Beta', + 'appName': 'Microsoft Edge Canary.app', + 'executable': 'Contents/MacOS/Microsoft Edge Canary', + 'bundleId': 'com.microsoft.Edge.Canary', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -207,25 +224,77 @@ exports['windows browser detection detects browsers as expected 1'] = [ 'findAppParams': { 'appName': 'Microsoft Edge Dev.app', 'executable': 'Contents/MacOS/Microsoft Edge Dev', - 'appId': 'com.microsoft.Edge.Dev', + 'bundleId': 'com.microsoft.Edge.Dev', 'versionProperty': 'CFBundleShortVersionString', }, }, ] -exports['windows browser detection detects 64-bit Chrome Beta app path 1'] = { - 'name': 'chrome', - 'version': '9.0.1', - 'path': 'C:/Program Files/Google/Chrome Beta/Application/chrome.exe', -} +exports['windows browser detection detects Chrome Beta 64-bit install 1'] = [ + { + 'name': 'chrome', + 'family': 'chromium', + 'channel': 'beta', + 'displayName': 'Chrome Beta', + 'versionRegex': {}, + 'binary': 'google-chrome-beta', + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/Chrome Beta/Application/chrome.exe', + 'version': '9.0.1', + 'findAppParams': { + 'appName': 'Google Chrome Beta.app', + 'executable': 'Contents/MacOS/Google Chrome Beta', + 'bundleId': 'com.google.Chrome.beta', + 'versionProperty': 'KSVersion', + }, + }, +] + +exports['windows browser detection detects Chrome 64-bit install 1'] = [ + { + 'name': 'chrome', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome', + 'versionRegex': {}, + 'binary': [ + 'google-chrome', + 'chrome', + 'google-chrome-stable', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/Chrome/Application/chrome.exe', + 'version': '4.4.4', + 'findAppParams': { + 'appName': 'Google Chrome.app', + 'executable': 'Contents/MacOS/Google Chrome', + 'bundleId': 'com.google.Chrome', + 'versionProperty': 'KSVersion', + }, + }, +] -exports['windows browser detection detects new Chrome 64-bit app path 1'] = { - 'name': 'chrome', - 'version': '4.4.4', - 'path': 'C:/Program Files/Google/Chrome/Application/chrome.exe', -} +exports['windows browser detection detects Chrome for Testing 32-bit install 1'] = [ + { + 'name': 'chrome-for-testing', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chrome for Testing', + 'versionRegex': {}, + 'binary': 'chrome', + 'minSupportedVersion': 64, + 'path': 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', + 'version': '5.5.5', + 'findAppParams': { + 'appName': 'Google Chrome for Testing.app', + 'executable': 'Contents/MacOS/Google Chrome for Testing', + 'bundleId': 'com.google.chrome.for.testing', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] -exports['windows browser detection detects local Firefox installs 1'] = [ +exports['windows browser detection detects Firefox local installs 1'] = [ { 'name': 'firefox', 'family': 'firefox', @@ -239,7 +308,7 @@ exports['windows browser detection detects local Firefox installs 1'] = [ 'findAppParams': { 'appName': 'Firefox.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefox', + 'bundleId': 'org.mozilla.firefox', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -259,7 +328,7 @@ exports['windows browser detection detects local Firefox installs 1'] = [ 'findAppParams': { 'appName': 'Firefox Developer Edition.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.firefoxdeveloperedition', + 'bundleId': 'org.mozilla.firefoxdeveloperedition', 'versionProperty': 'CFBundleShortVersionString', }, }, @@ -279,7 +348,76 @@ exports['windows browser detection detects local Firefox installs 1'] = [ 'findAppParams': { 'appName': 'Firefox Nightly.app', 'executable': 'Contents/MacOS/firefox', - 'appId': 'org.mozilla.nightly', + 'bundleId': 'org.mozilla.nightly', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] + +exports['windows browser detection detects Chromium 64-bit install 1'] = [ + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/chrome-win/chrome.exe', + 'version': '6.6.6', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] + +exports['windows browser detection detects Chromium 32-bit install in Chromium folder 1'] = [ + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files (x86)/Google/Chromium/chrome.exe', + 'version': '7.7.7', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', + 'versionProperty': 'CFBundleShortVersionString', + }, + }, +] + +exports['windows browser detection detects Chromium 64-bit install in Chromium folder 1'] = [ + { + 'name': 'chromium', + 'family': 'chromium', + 'channel': 'stable', + 'displayName': 'Chromium', + 'versionRegex': {}, + 'binary': [ + 'chromium-browser', + 'chromium', + ], + 'minSupportedVersion': 64, + 'path': 'C:/Program Files/Google/Chromium/chrome.exe', + 'version': '8.8.8', + 'findAppParams': { + 'appName': 'Chromium.app', + 'executable': 'Contents/MacOS/Chromium', + 'bundleId': 'org.chromium.Chromium', 'versionProperty': 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/lib/darwin/index.ts b/packages/launcher/lib/darwin/index.ts index caa2500839b..8d4f7ee06c3 100644 --- a/packages/launcher/lib/darwin/index.ts +++ b/packages/launcher/lib/darwin/index.ts @@ -17,27 +17,35 @@ export const browsers: Detectors = { stable: { appName: 'Google Chrome.app', executable: 'Contents/MacOS/Google Chrome', - appId: 'com.google.Chrome', + bundleId: 'com.google.Chrome', versionProperty: 'KSVersion', }, beta: { appName: 'Google Chrome Beta.app', executable: 'Contents/MacOS/Google Chrome Beta', - appId: 'com.google.Chrome.beta', + bundleId: 'com.google.Chrome.beta', versionProperty: 'KSVersion', }, canary: { appName: 'Google Chrome Canary.app', executable: 'Contents/MacOS/Google Chrome Canary', - appId: 'com.google.Chrome.canary', + bundleId: 'com.google.Chrome.canary', versionProperty: 'KSVersion', }, }, + 'chrome-for-testing': { + stable: { + appName: 'Google Chrome for Testing.app', + executable: 'Contents/MacOS/Google Chrome for Testing', + bundleId: 'com.google.chrome.for.testing', + versionProperty: 'CFBundleShortVersionString', + }, + }, chromium: { stable: { appName: 'Chromium.app', executable: 'Contents/MacOS/Chromium', - appId: 'org.chromium.Chromium', + bundleId: 'org.chromium.Chromium', versionProperty: 'CFBundleShortVersionString', }, }, @@ -45,19 +53,19 @@ export const browsers: Detectors = { stable: { appName: 'Firefox.app', executable: 'Contents/MacOS/firefox', - appId: 'org.mozilla.firefox', + bundleId: 'org.mozilla.firefox', versionProperty: 'CFBundleShortVersionString', }, dev: { appName: 'Firefox Developer Edition.app', executable: 'Contents/MacOS/firefox', - appId: 'org.mozilla.firefoxdeveloperedition', + bundleId: 'org.mozilla.firefoxdeveloperedition', versionProperty: 'CFBundleShortVersionString', }, nightly: { appName: 'Firefox Nightly.app', executable: 'Contents/MacOS/firefox', - appId: 'org.mozilla.nightly', + bundleId: 'org.mozilla.nightly', versionProperty: 'CFBundleShortVersionString', }, }, @@ -65,25 +73,25 @@ export const browsers: Detectors = { stable: { appName: 'Microsoft Edge.app', executable: 'Contents/MacOS/Microsoft Edge', - appId: 'com.microsoft.Edge', - versionProperty: 'CFBundleShortVersionString', - }, - canary: { - appName: 'Microsoft Edge Canary.app', - executable: 'Contents/MacOS/Microsoft Edge Canary', - appId: 'com.microsoft.Edge.Canary', + bundleId: 'com.microsoft.Edge', versionProperty: 'CFBundleShortVersionString', }, beta: { appName: 'Microsoft Edge Beta.app', executable: 'Contents/MacOS/Microsoft Edge Beta', - appId: 'com.microsoft.Edge.Beta', + bundleId: 'com.microsoft.Edge.Beta', + versionProperty: 'CFBundleShortVersionString', + }, + canary: { + appName: 'Microsoft Edge Canary.app', + executable: 'Contents/MacOS/Microsoft Edge Canary', + bundleId: 'com.microsoft.Edge.Canary', versionProperty: 'CFBundleShortVersionString', }, dev: { appName: 'Microsoft Edge Dev.app', executable: 'Contents/MacOS/Microsoft Edge Dev', - appId: 'com.microsoft.Edge.Dev', + bundleId: 'com.microsoft.Edge.Dev', versionProperty: 'CFBundleShortVersionString', }, }, diff --git a/packages/launcher/lib/darwin/util.ts b/packages/launcher/lib/darwin/util.ts index e669682ef38..2e87bc4b709 100644 --- a/packages/launcher/lib/darwin/util.ts +++ b/packages/launcher/lib/darwin/util.ts @@ -64,9 +64,13 @@ export type AppInfo = { } export type FindAppParams = { + // The name of the application (e.g. 'Google Chrome.app') appName: string + // The path to the executable within the application (e.g. 'Contents/MacOS/Google Chrome') executable: string - appId: string + // The CFBundleIdentifier in the Info.plist (e.g. 'com.google.Chrome') + bundleId: string + // The key from the Info.plist to find the version (e.g. 'KSVersion') versionProperty: string } @@ -75,8 +79,8 @@ function formApplicationPath (appName: string) { } /** finds an application and its version */ -export function findApp ({ appName, executable, appId, versionProperty }: FindAppParams): Promise { - debugVerbose('looking for app %s id %s', executable, appId) +export function findApp ({ appName, executable, bundleId, versionProperty }: FindAppParams): Promise { + debugVerbose('looking for app %s bundle id %s', executable, bundleId) const findVersion = (foundPath: string) => { return parsePlist(foundPath, versionProperty).then((version) => { @@ -90,7 +94,7 @@ export function findApp ({ appName, executable, appId, versionProperty }: FindAp } const tryMdFind = () => { - return mdfind(appId).then(findVersion) + return mdfind(bundleId).then(findVersion) } const tryFullApplicationFind = () => { diff --git a/packages/launcher/lib/known-browsers.ts b/packages/launcher/lib/known-browsers.ts index 53be37e599a..24c335fe016 100644 --- a/packages/launcher/lib/known-browsers.ts +++ b/packages/launcher/lib/known-browsers.ts @@ -34,20 +34,10 @@ export const knownBrowsers: Browser[] = [ family: 'chromium', channel: 'stable', displayName: 'Chrome', - versionRegex: /Google Chrome (\S+)/m, + versionRegex: /Google Chrome(?! for Testing) (\S+)/m, binary: ['google-chrome', 'chrome', 'google-chrome-stable'], minSupportedVersion: MIN_CHROME_VERSION, }, - { - name: 'chromium', - family: 'chromium', - // technically Chromium is always in development - channel: 'stable', - displayName: 'Chromium', - versionRegex: /Chromium (\S+)/m, - binary: ['chromium-browser', 'chromium'], - minSupportedVersion: MIN_CHROME_VERSION, - }, { name: 'chrome', family: 'chromium', @@ -61,11 +51,30 @@ export const knownBrowsers: Browser[] = [ name: 'chrome', family: 'chromium', channel: 'canary', - displayName: 'Canary', + displayName: 'Chrome Canary', versionRegex: /Google Chrome Canary (\S+)/m, binary: 'google-chrome-canary', minSupportedVersion: MIN_CHROME_VERSION, }, + { + name: 'chrome-for-testing', + family: 'chromium', + channel: 'stable', + displayName: 'Chrome for Testing', + versionRegex: /Google Chrome for Testing (\S+)/m, + binary: 'chrome', + minSupportedVersion: MIN_CHROME_VERSION, + }, + { + name: 'chromium', + family: 'chromium', + // technically Chromium is always in development + channel: 'stable', + displayName: 'Chromium', + versionRegex: /Chromium (\S+)/m, + binary: ['chromium-browser', 'chromium'], + minSupportedVersion: MIN_CHROME_VERSION, + }, { name: 'firefox', family: 'firefox', @@ -124,19 +133,19 @@ export const knownBrowsers: Browser[] = [ { name: 'edge', family: 'chromium', - channel: 'canary', - displayName: 'Edge Canary', - versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/mi, - binary: ['edge-canary', 'microsoft-edge-canary'], + channel: 'beta', + displayName: 'Edge Beta', + versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/mi, + binary: ['edge-beta', 'microsoft-edge-beta'], minSupportedVersion: MIN_EDGE_VERSION, }, { name: 'edge', family: 'chromium', - channel: 'beta', - displayName: 'Edge Beta', - versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/mi, - binary: ['edge-beta', 'microsoft-edge-beta'], + channel: 'canary', + displayName: 'Edge Canary', + versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/mi, + binary: ['edge-canary', 'microsoft-edge-canary'], minSupportedVersion: MIN_EDGE_VERSION, }, { diff --git a/packages/launcher/lib/windows/index.ts b/packages/launcher/lib/windows/index.ts index d0baaedbacc..c1897b67420 100644 --- a/packages/launcher/lib/windows/index.ts +++ b/packages/launcher/lib/windows/index.ts @@ -26,9 +26,12 @@ function formChromeBetaAppPath () { } function formChromiumAppPath () { - const exe = 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe' - - return [normalize(exe)] + return [ + 'C:/Program Files (x86)/Google/chrome-win32/chrome.exe', + 'C:/Program Files/Google/chrome-win/chrome.exe', + 'C:/Program Files/Google/Chromium/chrome.exe', + 'C:/Program Files (x86)/Google/Chromium/chrome.exe', + ].map(normalize) } function formChromeCanaryAppPath () { @@ -46,6 +49,13 @@ function formChromeCanaryAppPath () { return [normalize(exe)] } +function formChromeForTestingAppPath () { + return [ + 'C:/Program Files/Google/Chrome for Testing/chrome.exe', + 'C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', + ].map(normalize) +} + function getFirefoxPaths (editionFolder) { return () => { return (['Program Files', 'Program Files (x86)']) @@ -91,6 +101,9 @@ const formPaths: WindowsBrowserPaths = { beta: formChromeBetaAppPath, canary: formChromeCanaryAppPath, }, + 'chrome-for-testing': { + stable: formChromeForTestingAppPath, + }, chromium: { stable: formChromiumAppPath, }, @@ -106,10 +119,10 @@ const formPaths: WindowsBrowserPaths = { beta: () => { return [normalize('C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe')] }, + canary: formEdgeCanaryAppPath, dev: () => { return [normalize('C:/Program Files (x86)/Microsoft/Edge Dev/Application/msedge.exe')] }, - canary: formEdgeCanaryAppPath, }, } diff --git a/packages/launcher/test/unit/darwin_spec.ts b/packages/launcher/test/unit/darwin_spec.ts index d62101d27b0..0e03b11904a 100644 --- a/packages/launcher/test/unit/darwin_spec.ts +++ b/packages/launcher/test/unit/darwin_spec.ts @@ -30,7 +30,7 @@ function generatePlist (key, value) { function stubBrowser (findAppParams: darwinUtil.FindAppParams) { (utils.getOutput as unknown as SinonStub) - .withArgs(`mdfind 'kMDItemCFBundleIdentifier=="${findAppParams.appId}"' | head -1`) + .withArgs(`mdfind 'kMDItemCFBundleIdentifier=="${findAppParams.bundleId}"' | head -1`) .resolves({ stdout: `/Applications/${findAppParams.appName}` }) ;(fse.readFile as SinonStub) diff --git a/packages/launcher/test/unit/windows_spec.ts b/packages/launcher/test/unit/windows_spec.ts index 27b826fe99d..af321beca64 100644 --- a/packages/launcher/test/unit/windows_spec.ts +++ b/packages/launcher/test/unit/windows_spec.ts @@ -43,12 +43,20 @@ describe('windows browser detection', () => { }) it('detects browsers as expected', async () => { + // chrome stubBrowser('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', '1.2.3') + // chromium - 32-bit will be preferred for passivity stubBrowser('C:/Program Files (x86)/Google/chrome-win32/chrome.exe', '2.3.4') + stubBrowser('C:/Program Files/Google/chrome-win/chrome.exe', '2.3.4') + // chrome-for-testing - 64-bit will be preferred + stubBrowser('C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', '1.2.3') + stubBrowser('C:/Program Files/Google/Chrome for Testing/chrome.exe', '1.2.3') + + // chrome beta stubBrowser('C:/Program Files (x86)/Google/Chrome Beta/Application/chrome.exe', '6.7.8') - // canary is installed in homedir + // chrome canary is installed in homedir stubBrowser(`${HOMEDIR}/AppData/Local/Google/Chrome SxS/Application/chrome.exe`, '3.4.5') // have 32-bit and 64-bit ff - 64-bit will be preferred @@ -71,23 +79,30 @@ describe('windows browser detection', () => { snapshot(await detect(knownBrowsers)) }) - it('detects 64-bit Chrome Beta app path', async () => { + it('detects Chrome Beta 64-bit install', async () => { stubBrowser('C:/Program Files/Google/Chrome Beta/Application/chrome.exe', '9.0.1') - const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'beta' }) + const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'beta' })! - snapshot(await windowsHelper.detect(chrome)) + snapshot(await detect([chrome])) }) // @see https://github.com/cypress-io/cypress/issues/8425 - it('detects new Chrome 64-bit app path', async () => { + it('detects Chrome 64-bit install', async () => { stubBrowser('C:/Program Files/Google/Chrome/Application/chrome.exe', '4.4.4') - const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'stable' }) + const chrome = _.find(knownBrowsers, { name: 'chrome', channel: 'stable' })! + + snapshot(await detect([chrome])) + }) + + it('detects Chrome for Testing 32-bit install', async () => { + stubBrowser('C:/Program Files (x86)/Google/Chrome for Testing/chrome.exe', '5.5.5') + const chromeForTesting = _.find(knownBrowsers, { name: 'chrome-for-testing' })! - snapshot(await windowsHelper.detect(chrome)) + snapshot(await detect([chromeForTesting])) }) // @see https://github.com/cypress-io/cypress/issues/8432 - it('detects local Firefox installs', async () => { + it('detects Firefox local installs', async () => { stubBrowser(`${HOMEDIR}/AppData/Local/Mozilla Firefox/firefox.exe`, '100') stubBrowser(`${HOMEDIR}/AppData/Local/Firefox Nightly/firefox.exe`, '200') stubBrowser(`${HOMEDIR}/AppData/Local/Firefox Developer Edition/firefox.exe`, '300') @@ -97,6 +112,27 @@ describe('windows browser detection', () => { snapshot(await detect(firefoxes)) }) + it('detects Chromium 64-bit install', async () => { + stubBrowser('C:/Program Files/Google/chrome-win/chrome.exe', '6.6.6') + const chromium = _.find(knownBrowsers, { name: 'chromium' })! + + snapshot(await detect([chromium])) + }) + + it('detects Chromium 32-bit install in Chromium folder', async () => { + stubBrowser('C:/Program Files (x86)/Google/Chromium/chrome.exe', '7.7.7') + const chromium = _.find(knownBrowsers, { name: 'chromium' })! + + snapshot(await detect([chromium])) + }) + + it('detects Chromium 64-bit install in Chromium folder', async () => { + stubBrowser('C:/Program Files/Google/Chromium/chrome.exe', '8.8.8') + const chromium = _.find(knownBrowsers, { name: 'chromium' })! + + snapshot(await detect([chromium])) + }) + it('works with :browserName format in Windows', () => { sinon.stub(os, 'platform').returns('win32') let path = `${HOMEDIR}/foo/bar/browser.exe` diff --git a/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts b/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts index 94858029ccd..cd3e4d42c7b 100644 --- a/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts +++ b/packages/launchpad/cypress/e2e/choose-a-browser.cy.ts @@ -46,7 +46,7 @@ describe('Choose a browser page', () => { cy.get('h1').should('contain', 'Choose a browser') - cy.findByRole('radio', { name: 'Edge v8', checked: true }) + cy.findByRole('radio', { name: 'Edge v9', checked: true }) cy.percySnapshot() @@ -103,8 +103,10 @@ describe('Choose a browser page', () => { // varies depending on platform if (Cypress.platform === 'win32') { cy.get('@AlertBody').find('code').eq(1).should('have.text', `win-version-info is unable to access file: \\${path.replaceAll('/', '\\')}`) - } else { + } else if (Cypress.platform === 'linux') { cy.get('@AlertBody').find('code').eq(1).should('have.text', `spawn ${path} ENOENT`) + } else { + cy.get('@AlertBody').find('code').eq(1).should('have.text', `Unable to find browser with path ${path}`) } cy.percySnapshot() @@ -127,11 +129,11 @@ describe('Choose a browser page', () => { cy.findByRole('radio', { name: 'Chrome v1' }) - cy.findByRole('radio', { name: 'Firefox v5' }) + cy.findByRole('radio', { name: 'Firefox v6' }) - cy.findByRole('radio', { name: 'Electron v12' }) + cy.findByRole('radio', { name: 'Electron v13' }) - cy.findByRole('radio', { name: 'Edge v8' }) + cy.findByRole('radio', { name: 'Edge v9' }) }) it('performs mutation to launch selected browser when launch button is pressed', () => { @@ -194,7 +196,7 @@ describe('Choose a browser page', () => { cy.get('h1').should('contain', 'Choose a browser') cy.findByRole('radio', { name: 'Chrome v1', checked: true }).as('chromeItem') - cy.findByRole('radio', { name: 'Firefox v5', checked: false }).as('firefoxItem') + cy.findByRole('radio', { name: 'Firefox v6', checked: false }).as('firefoxItem') cy.contains('button', 'Start E2E Testing in Chrome').should('be.visible') @@ -205,7 +207,7 @@ describe('Choose a browser page', () => { }) cy.findByRole('radio', { name: 'Chrome v1', checked: false }) - cy.findByRole('radio', { name: 'Firefox v5', checked: true }) + cy.findByRole('radio', { name: 'Firefox v6', checked: true }) cy.contains('button', 'Start E2E Testing in Firefox').should('be.visible') }) @@ -323,7 +325,7 @@ describe('Choose a browser page', () => { }) cy.contains('button', 'Start E2E Testing in Firefox').should('be.visible') - cy.findByRole('radio', { name: 'Firefox v5', checked: true }).should('be.visible') + cy.findByRole('radio', { name: 'Firefox v6', checked: true }).should('be.visible') }) it('should return to welcome screen if user modifies the config file to not include the current testing type and recover', () => { @@ -371,7 +373,7 @@ describe('Choose a browser page', () => { cy.get('[data-cy="open-browser-list"]').children().should('have.length', 1) - cy.findByRole('radio', { name: 'Electron v12', checked: true }) + cy.findByRole('radio', { name: 'Electron v13', checked: true }) cy.percySnapshot() }) }) diff --git a/packages/launchpad/cypress/e2e/project-setup.cy.ts b/packages/launchpad/cypress/e2e/project-setup.cy.ts index 62cb67118e1..e36de4ff225 100644 --- a/packages/launchpad/cypress/e2e/project-setup.cy.ts +++ b/packages/launchpad/cypress/e2e/project-setup.cy.ts @@ -61,9 +61,9 @@ describe('Launchpad: Setup Project', () => { cy.contains('Choose a browser', { timeout: 15000 }) cy.findByRole('radio', { name: 'Chrome v1' }) - cy.findByRole('radio', { name: 'Firefox v5' }) - cy.findByRole('radio', { name: 'Electron v12' }) - cy.findByRole('radio', { name: 'Edge v8' }) + cy.findByRole('radio', { name: 'Firefox v6' }) + cy.findByRole('radio', { name: 'Electron v13' }) + cy.findByRole('radio', { name: 'Edge v9' }) } beforeEach(() => { diff --git a/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts b/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts index 5bcf02a1268..ec2355c043c 100644 --- a/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts +++ b/packages/launchpad/cypress/e2e/system-tests/config-spec.cy.ts @@ -4,7 +4,7 @@ describe('config-spec', () => { cy.findBrowsers() cy.openProject('plugin-filter-browsers', ['--e2e']) cy.withCtx(async (ctx) => { - expect(await ctx.browser.machineBrowsers()).to.have.length(12) // stubbed list of all browsers + expect(await ctx.browser.machineBrowsers()).to.have.length(13) // stubbed list of all browsers }) cy.visitLaunchpad() diff --git a/packages/server/__snapshots__/browsers_spec.js b/packages/server/__snapshots__/browsers_spec.js index 4d9e8283e38..f5992d0d363 100644 --- a/packages/server/__snapshots__/browsers_spec.js +++ b/packages/server/__snapshots__/browsers_spec.js @@ -7,7 +7,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox @@ -28,7 +28,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox diff --git a/packages/server/lib/util/chromium_flags.ts b/packages/server/lib/util/chromium_flags.ts index eb45e6230fc..f803725f86c 100644 --- a/packages/server/lib/util/chromium_flags.ts +++ b/packages/server/lib/util/chromium_flags.ts @@ -36,7 +36,7 @@ const DEFAULT_FLAGS = [ 'enable-automation', 'disable-print-preview', 'disable-component-extensions-with-background-pages', - + 'disable-infobars', 'disable-device-discovery-notifications', // https://github.com/cypress-io/cypress/issues/2376 diff --git a/system-tests/__snapshots__/component_testing_spec.ts.js b/system-tests/__snapshots__/component_testing_spec.ts.js index bc6660da8df..e3531e03940 100644 --- a/system-tests/__snapshots__/component_testing_spec.ts.js +++ b/system-tests/__snapshots__/component_testing_spec.ts.js @@ -786,9 +786,9 @@ exports['experimentalSingleTabRunMode / executes all specs in a single tab'] = ` (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails (fai (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails (fai (1280x633) led).png - - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails agai (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/1_fails.cy.js/simple failing spec -- fails agai (1280x633) n (failed).png diff --git a/system-tests/__snapshots__/plugins_spec.js b/system-tests/__snapshots__/plugins_spec.js index 4cd267e25f5..afc98d06d7b 100644 --- a/system-tests/__snapshots__/plugins_spec.js +++ b/system-tests/__snapshots__/plugins_spec.js @@ -7,7 +7,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox diff --git a/system-tests/__snapshots__/record_spec.js b/system-tests/__snapshots__/record_spec.js index d837ef612fe..beb05d75a32 100644 --- a/system-tests/__snapshots__/record_spec.js +++ b/system-tests/__snapshots__/record_spec.js @@ -556,7 +556,7 @@ Cypress supports the following browsers: - electron - chrome - chromium - - chrome:canary + - chrome-for-testing - edge - firefox diff --git a/system-tests/__snapshots__/retries_spec.ts.js b/system-tests/__snapshots__/retries_spec.ts.js index d88ae5dc7b6..9e99c236d05 100644 --- a/system-tests/__snapshots__/retries_spec.ts.js +++ b/system-tests/__snapshots__/retries_spec.ts.js @@ -164,8 +164,8 @@ exports['retries / supports retries (chrome)'] = ` (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed) (attempt 2 (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/fail-twice.cy.js/fail twice (failed) (attempt 2 (1280x633) ).png diff --git a/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js b/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js index 5cc5e74d4ce..bf914585b15 100644 --- a/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js +++ b/system-tests/__snapshots__/vite_dev_server_fresh_spec.ts.js @@ -82,7 +82,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -165,12 +165,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -216,7 +216,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -254,7 +254,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -485,7 +485,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -568,12 +568,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -619,7 +619,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -657,7 +657,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -888,7 +888,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -971,12 +971,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1022,7 +1022,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1060,7 +1060,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1291,7 +1291,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1374,12 +1374,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1425,7 +1425,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1463,7 +1463,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1906,7 +1906,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1989,12 +1989,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -2040,7 +2040,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -2078,7 +2078,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png diff --git a/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js b/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js index 2af0d08c8e6..b72a31f49c1 100644 --- a/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js +++ b/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js @@ -321,7 +321,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -404,12 +404,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -455,7 +455,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -493,7 +493,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -744,7 +744,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -827,12 +827,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -878,7 +878,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -916,7 +916,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1158,7 +1158,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1241,12 +1241,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1292,7 +1292,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1330,7 +1330,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -1584,7 +1584,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -1667,12 +1667,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -1718,7 +1718,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -1756,7 +1756,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png @@ -2027,7 +2027,7 @@ We dynamically generated a new test to display this failure. (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/AppCompilationError.cy.jsx/An uncaught error wa (1280x633) s detected outside of a test (failed).png @@ -2110,12 +2110,12 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- error on mount (failed) (1280x633) .png - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x581) - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- sync error (failed).png (1280x633) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- async error (failed).pn (1280x633) g - - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/Errors.cy.jsx/Errors -- command failure (failed (1280x633) ).png @@ -2161,7 +2161,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReact.cy.jsx/is missing React (failed).p (1280x633) ng @@ -2199,7 +2199,7 @@ https://on.cypress.io/uncaught-exception-from-application (Screenshots) - - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x581) + - /XXX/XXX/XXX/cypress/screenshots/MissingReactInSpec.cy.jsx/is missing React in t (1280x633) his file (failed).png diff --git a/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js b/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js index 0c60218985d..db3a89a0f80 100644 --- a/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js +++ b/system-tests/projects/screen-size/cypress/e2e/default_size.cy.js @@ -16,7 +16,7 @@ describe('windowSize', () => { // availHeight: top.screen.availHeight, }).deep.eq({ innerWidth: 1280, - innerHeight: 581, // chrome 128 decreased the size here from 633 to 581 + innerHeight: 633, // chrome 119 increased the size here from 599 to 633 // screenWidth: 1280, // screenHeight: 603, // availWidth: 1280, diff --git a/yarn.lock b/yarn.lock index b7545677d55..6f4f2d037e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10986,8 +10986,8 @@ brorand@^1.0.1, brorand@^1.1.0: integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= "browser-logos@github:alrra/browser-logos": - version "72.0.0" - resolved "https://codeload.github.com/alrra/browser-logos/tar.gz/6e3e6a8da0dc8ec9851a6987fd9bd3523fe1876c" + version "75.0.0" + resolved "https://codeload.github.com/alrra/browser-logos/tar.gz/021a9533c9d872dccf92713f59afb383b29a50eb" browser-resolve@2.0.0: version "2.0.0" From d0e8d9b6d2ce57b97eb1c0a6eba9c0142b610409 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Tue, 17 Dec 2024 09:59:14 -0500 Subject: [PATCH 19/23] chore: ignore yarnrc and yarn directory (#30769) * chore: ignore yarnrc and yarn directory * empty commit * empty commit --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 326b00acfcf..2047278fbf2 100644 --- a/.gitignore +++ b/.gitignore @@ -280,7 +280,9 @@ typings/ # Output of 'npm pack' *.tgz -# Yarn Integrity file +# Yarn files that shouldn't be checked in +.yarnrc +.yarn/ .yarn-integrity # dotenv environment variables file From 3303d1e41c1584d648673b6ff2104b3ccd61f6d9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:06:53 -0500 Subject: [PATCH 20/23] chore: Update v8 snapshot cache - linux (#30771) Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> --- tooling/v8-snapshot/cache/linux/snapshot-meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/v8-snapshot/cache/linux/snapshot-meta.json b/tooling/v8-snapshot/cache/linux/snapshot-meta.json index 19eebed4721..5d91da46303 100644 --- a/tooling/v8-snapshot/cache/linux/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/linux/snapshot-meta.json @@ -4252,5 +4252,5 @@ "./tooling/v8-snapshot/cache/linux/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "ca5ac2cd877d4a2d2614f8a49a04badcce7f12a1f9962d6f1dbdebe4aaa797ff" + "deferredHash": "3f244751459328929504043ad557cf01df1c72ec53ee8aee2567bec96724c0db" } \ No newline at end of file From 97b404f3531416e7c791d3e7a7039c4157361242 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:16:36 -0500 Subject: [PATCH 21/23] chore: Update v8 snapshot cache - darwin (#30772) Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> --- tooling/v8-snapshot/cache/darwin/snapshot-meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/v8-snapshot/cache/darwin/snapshot-meta.json b/tooling/v8-snapshot/cache/darwin/snapshot-meta.json index 5a52f6d9f1b..aae4e301f3b 100644 --- a/tooling/v8-snapshot/cache/darwin/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/darwin/snapshot-meta.json @@ -4249,5 +4249,5 @@ "./tooling/v8-snapshot/cache/darwin/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "ca5ac2cd877d4a2d2614f8a49a04badcce7f12a1f9962d6f1dbdebe4aaa797ff" + "deferredHash": "3f244751459328929504043ad557cf01df1c72ec53ee8aee2567bec96724c0db" } \ No newline at end of file From a3877a423c80f86523703c12deea289e09da705d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:16:54 -0500 Subject: [PATCH 22/23] chore: Update v8 snapshot cache - windows (#30773) Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com> --- tooling/v8-snapshot/cache/win32/snapshot-meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/v8-snapshot/cache/win32/snapshot-meta.json b/tooling/v8-snapshot/cache/win32/snapshot-meta.json index ec31f89070a..87c7da3e529 100644 --- a/tooling/v8-snapshot/cache/win32/snapshot-meta.json +++ b/tooling/v8-snapshot/cache/win32/snapshot-meta.json @@ -4252,5 +4252,5 @@ "./tooling/v8-snapshot/cache/win32/snapshot-entry.js" ], "deferredHashFile": "yarn.lock", - "deferredHash": "7fcd9f681310aeb62da4137d956aa8b73597c9f8aa4e1c34192ca08caef2cb72" + "deferredHash": "9c8930c204e820609bac39267ab2522614df37c32c20c03fcb17c6daf96159f3" } \ No newline at end of file From a15076fcf9891c4fcc2a08cb82724326f90d8ef1 Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Tue, 17 Dec 2024 10:13:58 -0700 Subject: [PATCH 23/23] chore: release 13.17.0 (#30778) --- cli/CHANGELOG.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index a84d8616767..ee9a11991dc 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,7 +1,7 @@ ## 13.17.0 -_Released 12/17/2024 (PENDING)_ +_Released 12/17/2024_ **Features:** @@ -11,7 +11,7 @@ _Released 12/17/2024 (PENDING)_ - Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876). - Updated Firefox `userChrome.css` to correctly hide the toolbox during headless mode. Addresses [#30721](https://github.com/cypress-io/cypress/issues/30721). -- Fixed an issue loading the `cypress.config.ts` file with Node.js version `22.12.0`. Addresses [#30715](https://github.com/cypress-io/cypress/issues/30715). +- Fixed an issue loading the `cypress.config.ts` file with Node.js version `22.12.0` if it is loaded as an ESM. Addresses [#30715](https://github.com/cypress-io/cypress/issues/30715). **Misc:** diff --git a/package.json b/package.json index dc7c145e8b0..212c6966016 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cypress", - "version": "13.16.1", + "version": "13.17.0", "description": "Cypress is a next generation front end testing tool built for the modern web", "private": true, "scripts": {