Skip to content

Commit

Permalink
Merge branch 'cacie/29590/document-domain-subdomains' of https://gith…
Browse files Browse the repository at this point in the history
…ub.com/cypress-io/cypress into cacie/29590/document-domain-subdomains
  • Loading branch information
jennifer-shehane committed Dec 23, 2024
2 parents 1bece96 + a20a34e commit 8ce3f5e
Show file tree
Hide file tree
Showing 59 changed files with 2,437 additions and 552 deletions.
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

12-04-24
12-11-24
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "132.0.6834.32",
"chrome:stable": "131.0.6778.108",
"chrome:beta": "132.0.6834.57",
"chrome:stable": "131.0.6778.204",
"chrome:minimum": "64.0.3282.0"
}
22 changes: 13 additions & 9 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 14.0.0

_Released 12/17/2024 (PENDING)_
_Released 1/7/2024 (PENDING)_

**Breaking Changes:**

- Removed support for Node.js 16 and Node.js 21. Addresses [#29930](https://github.com/cypress-io/cypress/issues/29930).
- Upgraded bundled Node.js version from `18.17.0` to `20.18.1`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547).
- Prebuilt binaries for Linux are no longer compatible with Linux distributions based on glibc <2.28, for example: Ubuntu 14-18, RHEL 7, CentOS 7, Amazon Linux 2. Addresses [#29601](https://github.com/cypress-io/cypress/issues/29601).
- Cypress now only officially supports the latest 3 major versions of Chrome, Firefox, and Edge - older browser versions may still work, but we recommend keeping your browsers up to date to ensure compatibility with Cypress. A warning will no longer be displayed on browser selection in the Launchpad for any 'unsupported' browser versions. Additionally, the undocumented `minSupportedVersion` property has been removed from `Cypress.browser`. Addressed in [#30462](https://github.com/cypress-io/cypress/pull/30462).
- The `cy.origin()` command must now be used when navigating between subdomains. Because this is a fairly disruptive change for users who frequently navigate between subdomains, a new configuration option is being introduced. `injectDocumentDomain` can be set to `true` in order to re-enable the injection of `document.domain` setters in Cypress. This configuration option is marked as deprecated and you'll receive a warning when Cypress is launched with this option set to `true`. It will be removed in Cypress 15. Addressed in [#30770](https://github.com/cypress-io/cypress/pull/30770).
- The `experimentalSkipDomainInjection` configuration has been removed and replaced with an `injectDocumentDomain` configuration. Addressed in [#30770](https://github.com/cypress-io/cypress/pull/30770).
- It is no longer possible to make a `fetch` or `XMLHttpRequest` request from the `about:blank` page in Electron (i.e. `cy.window().then((win) => win.fetch('<some-url>')`). You must use `cy.request` instead or perform some form of initial navigation via `cy.visit()`. Addressed in [#29547](https://github.com/cypress-io/cypress/pull/30394).
- Upgraded bundled Node.js version from `18.17.0` to `20.18.1`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547).
- `@cypress/webpack-dev-server` no longer supports `webpack-dev-server` version 3. Additionally, `@cypress/webpack-dev-server` now ships with `webpack-dev-server` version 5 by default. `webpack-dev-server` version 4 will need to be installed along side Cypress if you are still using `webpack` version 4. Addresses [#29308](https://github.com/cypress-io/cypress/issues/29308), [#30347](https://github.com/cypress-io/cypress/issues/30347), and [#30141](https://github.com/cypress-io/cypress/issues/30141).
- `@cypress/vite-dev-server` no longer supports `vite` versions 2 and 3. Addresses [#29377](https://github.com/cypress-io/cypress/issues/29377) and [#29378](https://github.com/cypress-io/cypress/issues/29378).
- The `experimentalJustInTimeCompile` configuration option for component testing has been replaced with a `justInTimeCompile` option that is `true` by default. This option will only compile resources directly related to your spec, compiling them 'just-in-time' before spec execution. This should result in improved memory management and performance for component tests in `cypress open` and `cypress run` modes, in particular for large component testing suites. `justInTimeCompile` is now only supported for [`webpack`](https://www.npmjs.com/package/webpack). Addresses [#30234](https://github.com/cypress-io/cypress/issues/30234). Addressed in [#30402](https://github.com/cypress-io/cypress/pull/30402).
- Cypress Component Testing no longer supports:
- `create-react-app`. Addresses [#30028](https://github.com/cypress-io/cypress/issues/30028).
Expand All @@ -27,6 +25,8 @@ _Released 12/17/2024 (PENDING)_
- The `cypress/react18` test harness is no longer included in the Cypress binary. Instead, React 18 support is now shipped with `cypress/react`! Addresses [#29607](https://github.com/cypress-io/cypress/issues/29607).
- The `cypress/angular-signals` test harness is no longer included in the Cypress binary. Instead, signals support is now shipped with `cypress/angular`! This requires `rxjs` to be installed as a `peerDependency`. Addresses [#29606](https://github.com/cypress-io/cypress/issues/29606).
- The Cypress configuration wizard for Component Testing supports TypeScript 4.0 or greater. Addresses [#30493](https://github.com/cypress-io/cypress/issues/30493).
- `@cypress/webpack-dev-server` no longer supports `webpack-dev-server` version 3. Additionally, `@cypress/webpack-dev-server` now ships with `webpack-dev-server` version 5 by default. `webpack-dev-server` version 4 will need to be installed along side Cypress if you are still using `webpack` version 4. Addresses [#29308](https://github.com/cypress-io/cypress/issues/29308), [#30347](https://github.com/cypress-io/cypress/issues/30347), and [#30141](https://github.com/cypress-io/cypress/issues/30141).
- `@cypress/vite-dev-server` no longer supports `vite` versions 2 and 3. Addresses [#29377](https://github.com/cypress-io/cypress/issues/29377) and [#29378](https://github.com/cypress-io/cypress/issues/29378).
- The `delayMs` option of `cy.intercept()` has been removed. This option was deprecated in Cypress 6.4.0. Please use the `delay` option instead. Addressed in [#30463](https://github.com/cypress-io/cypress/pull/30463).
- The `experimentalFetchPolyfill` configuration option was removed. This option was deprecated in Cypress 6.0.0. We recommend using `cy.intercept()` for handling fetch requests. Addressed in [#30466](https://github.com/cypress-io/cypress/pull/30466).
- We removed yielding the second argument of `before:browser:launch` as an array of browser arguments. This behavior has been deprecated since Cypress 4.0.0. Addressed in [#30460](https://github.com/cypress-io/cypress/pull/30460).
Expand All @@ -52,14 +52,14 @@ in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addr
**Bugfixes:**

- Elements with `display: contents` will no longer use box model calculations for visibility, and correctly show as visible when it is visible. Fixed in [#29680](https://github.com/cypress-io/cypress/pull/29680). Fixes [#29605](https://github.com/cypress-io/cypress/issues/29605).
- The CSS pseudo-class `:dir()` is now supported when testing in Electron. Addresses [#29766](https://github.com/cypress-io/cypress/issues/29766).
- Fixed a visibility issue when the element is positioned `static` or `relative` and the element's offset parent is positioned `absolute`, a descendent of the ancestor, and has no clippable overflow. Fixed in [#29689](https://github.com/cypress-io/cypress/pull/29689). Fixes [#28638](https://github.com/cypress-io/cypress/issues/28638).
- Fixed a visibility issue for elements with `textContent` but without a width or height. Fixed in [#29688](https://github.com/cypress-io/cypress/pull/29688). Fixes [#29687](https://github.com/cypress-io/cypress/issues/29687).
- Elements whose parent elements has `overflow: clip` and no height/width will now correctly show as hidden. Fixed in [#29778](https://github.com/cypress-io/cypress/pull/29778). Fixes [#23852](https://github.com/cypress-io/cypress/issues/23852).
- The CSS pseudo-class `:dir()` is now supported when testing in Electron. Addresses [#29766](https://github.com/cypress-io/cypress/issues/29766).

**Misc:**

- Removed some component testing API stubs that were removed in [Cypress v11.0.0](https://docs.cypress.io/app/references/migration-guide#Component-Testing-Updates). Addressed in [#30696](https://github.com/cypress-io/cypress/pull/30696). Addresses [#30623](https://github.com/cypress-io/cypress/issues/30623).
- Removed some component testing API stubs that were removed in [Cypress v11.0.0](https://docs.cypress.io/app/references/migration-guide#Component-Testing-Updates). Addressed in [#30696](https://github.com/cypress-io/cypress/pull/30696). Addresses [#30623](https://github.com/cypress-io/cypress/issues/30623).

**Dependency Updates:**

Expand All @@ -70,15 +70,19 @@ in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addr
- Updated `react` from `17.0.2` to `18.3.1` and `react-dom` from `17.0.2` to `18.3.1`. Addresses [#30511](https://github.com/cypress-io/cypress/issues/30511).
- Upgraded [`@vue/test-utils`](https://www.npmjs.com/package/@vue/test-utils) from `2.3.2` to `2.4.6`. Addresses [#26628](https://github.com/cypress-io/cypress/issues/26628).

## 13.16.2
## 13.17.0

_Released 12/17/2024_

**Features:**

_Released 12/17/2024 (PENDING)_
- 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).
- 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:**

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -213,7 +213,7 @@
},
"engines": {
"node": ">=20.18.1",
"yarn": ">=1.22.17"
"yarn": ">=1.22.22"
},
"productName": "Cypress",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/app/cypress/e2e/top-nav.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})

Expand Down Expand Up @@ -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')
})
Expand Down
8 changes: 4 additions & 4 deletions packages/app/src/debug/LayeredBrowserIcons.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import LayeredBrowserIcons from './LayeredBrowserIcons.vue'
import type { BrowserType } from './LayeredBrowserIcons.vue'

describe('<LayeredBrowserIcons/>', () => {
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) => {
Expand All @@ -21,11 +21,11 @@ describe('<LayeredBrowserIcons/>', () => {
<div class='bg-gray-50 p-[24px]'>
<LayeredBrowserIcons browsers={browsers} />
<LayeredBrowserIcons browsers={['CHROME', 'FIREFOX', 'EDGE']}/>
<LayeredBrowserIcons browsers={['CHROME-CANARY', 'WEBKIT', 'ELECTRON']} />
<LayeredBrowserIcons browsers={['CHROME CANARY', 'WEBKIT', 'ELECTRON']} />
<LayeredBrowserIcons browsers={['FIREFOX', 'WEBKIT', 'EDGE']}/>
<LayeredBrowserIcons browsers={['FIREFOX', 'EDGE', 'CHROME-CANARY', 'WEBKIT']}/>
<LayeredBrowserIcons browsers={['FIREFOX', 'EDGE', 'CHROME CANARY', 'WEBKIT']}/>
<LayeredBrowserIcons browsers={['EDGE', 'CHROME', 'WEBKIT', 'ELECTRON']}/>
<LayeredBrowserIcons browsers={['CHROME', 'CHROME BETA', 'CHROME-CANARY']} />
<LayeredBrowserIcons browsers={['CHROME', 'CHROME BETA', 'CHROME CANARY']} />
</div>
))

Expand Down
33 changes: 21 additions & 12 deletions packages/app/src/debug/LayeredBrowserIcons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@

<script lang="ts" setup>
import { computed } from 'vue'
import { IconBrowserChrome,
import {
IconBrowserChrome,
IconBrowserChromeBeta,
IconBrowserChromeCanary,
IconBrowserSafari,
IconBrowserMozillaFirefox,
IconBrowserEdge,
IconBrowserWebkit,
IconBrowserElectronLight,
IconBrowserChromeBeta,
IconGeneralGlobe,
} from '@cypress-design/vue-icon'
// Note: These browser names should map to the list of logoPaths found at https://github.com/cypress-io/cypress-services/blob/46073cb5c387af3b203404280a1664a85e233b93/packages/common/src/logos/getLogoPath.ts
// Some of these are currently incorrect (ex: CHROME-CANARY).
// We are also missing browsers from the list as well
export type BrowserType = 'CHROME' | 'SAFARI' | 'FIREFOX' | 'CHROME-CANARY' | 'CHROME BETA' | 'EDGE' | 'WEBKIT' | 'ELECTRON'
// Note: These browser names should map to the list of logoPaths found at https://github.com/cypress-io/cypress-services/blob/develop/packages/common/src/logos/getLogoPath.ts
export type 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'
interface LayeredProps {
browsers: BrowserType[]
Expand All @@ -45,7 +44,7 @@ const results = computed(() => {
if (props.browsers) {
return props.browsers.map((browserType) => {
return {
icon: BROWSER_MAP[browserType],
icon: BROWSER_MAP[browserType] || IconGeneralGlobe,
name: `browser-icon-${browserType.toLowerCase().replaceAll(' ', '_')}`,
}
})
Expand All @@ -54,15 +53,25 @@ const results = computed(() => {
return []
})
// TODO: Add correct icons for firefox, edge, and chromium
const BROWSER_MAP: Record<BrowserType, any> = {
'CHROME': IconBrowserChrome,
'CHROME BETA': IconBrowserChromeBeta,
'CHROME-CANARY': IconBrowserChromeCanary,
'SAFARI': IconBrowserSafari,
'FIREFOX': IconBrowserMozillaFirefox,
'CANARY': IconBrowserChromeCanary,
'CHROME CANARY': IconBrowserChromeCanary,
'CHROME FOR TESTING': IconBrowserChrome,
'CUSTOM CHROME FOR TESTING': IconBrowserChrome,
'CHROMIUM': IconGeneralGlobe,
'CUSTOM CHROMIUM': IconGeneralGlobe,
'EDGE': IconBrowserEdge,
'WEBKIT': IconBrowserWebkit,
'EDGE BETA': IconBrowserEdge,
'EDGE CANARY': IconBrowserEdge,
'EDGE DEV': IconBrowserEdge,
'ELECTRON': IconBrowserElectronLight,
'FIREFOX': IconBrowserMozillaFirefox,
'FIREFOX DEVELOPER EDITION': IconBrowserMozillaFirefox,
'FIREFOX NIGHTLY': IconBrowserMozillaFirefox,
'WEBKIT': IconBrowserWebkit,
}
</script>
2 changes: 0 additions & 2 deletions packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
],
"compilerOptions": {
"noImplicitThis": true,
"useDefineForClassFields": true,
"paths": {
"@cy/i18n": ["../frontend-shared/src/locales/i18n"],
"@cy/components/*": ["../frontend-shared/src/components/*"],
"@cy/gql-components/*": ["../frontend-shared/src/gql-components/*"],
"@cy/store/*": ["../frontend-shared/src/store/*"],
"@packages/*": ["../*"]
},
"allowJs": true,
"types": [
"cypress",
"cypress-real-events",
Expand Down
10 changes: 0 additions & 10 deletions packages/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 0 additions & 11 deletions packages/data-context/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
}
}
8 changes: 0 additions & 8 deletions packages/driver/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
},
Expand Down
Loading

0 comments on commit 8ce3f5e

Please sign in to comment.