Skip to content

Commit

Permalink
Merge branch 'develop' into marktnoonan/windows-test-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Nov 8, 2022
2 parents 79ccaae + 963e184 commit 46a480f
Show file tree
Hide file tree
Showing 21 changed files with 389 additions and 141 deletions.
20 changes: 20 additions & 0 deletions npm/angular/CHANGELOG.md
@@ -1,3 +1,23 @@
# [@cypress/angular-v2.0.1](https://github.com/cypress-io/cypress/compare/@cypress/angular-v2.0.0...@cypress/angular-v2.0.1) (2022-11-08)


### Bug Fixes

* make component derived info not throw ([#24571](https://github.com/cypress-io/cypress/issues/24571)) ([838dd4f](https://github.com/cypress-io/cypress/commit/838dd4fa2e0ec56633d0af2faf10a47d190b5594))

# [@cypress/angular-v2.0.0](https://github.com/cypress-io/cypress/compare/@cypress/angular-v1.1.2...@cypress/angular-v2.0.0) (2022-11-07)


### Bug Fixes

* possibility to override global services in Angular component tests ([#24394](https://github.com/cypress-io/cypress/issues/24394)) ([54d2853](https://github.com/cypress-io/cypress/commit/54d285321723450920e0f1d50374c4bd0590e72a))
* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount

# [@cypress/angular-v1.1.2](https://github.com/cypress-io/cypress/compare/@cypress/angular-v1.1.1...@cypress/angular-v1.1.2) (2022-10-11)


Expand Down
2 changes: 1 addition & 1 deletion npm/angular/src/mount.ts
Expand Up @@ -156,7 +156,7 @@ function bootstrapModule<T> (
})

// check if the component is a standalone component
if ((component as any).ɵcmp.standalone) {
if ((component as any).ɵcmp?.standalone) {
testModuleMetaData.imports.push(component)
} else {
testModuleMetaData.declarations.push(component)
Expand Down
14 changes: 14 additions & 0 deletions npm/mount-utils/CHANGELOG.md
@@ -1,3 +1,17 @@
# [@cypress/mount-utils-v3.0.0](https://github.com/cypress-io/cypress/compare/@cypress/mount-utils-v2.1.0...@cypress/mount-utils-v3.0.0) (2022-11-07)


### Bug Fixes

* remove dependence on @cypress/<dep> types ([#24415](https://github.com/cypress-io/cypress/issues/24415)) ([58e0ab9](https://github.com/cypress-io/cypress/commit/58e0ab91604618ea6f75932622f7e66e419270e6))
* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))
* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount

# [@cypress/mount-utils-v2.1.0](https://github.com/cypress-io/cypress/compare/@cypress/mount-utils-v2.0.1...@cypress/mount-utils-v2.1.0) (2022-08-30)


Expand Down
20 changes: 20 additions & 0 deletions npm/react/CHANGELOG.md
@@ -1,3 +1,23 @@
# [@cypress/react-v7.0.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v7.0.0...@cypress/react-v7.0.1) (2022-11-08)


### Bug Fixes

* make component derived info not throw ([#24571](https://github.com/cypress-io/cypress/issues/24571)) ([838dd4f](https://github.com/cypress-io/cypress/commit/838dd4fa2e0ec56633d0af2faf10a47d190b5594))

# [@cypress/react-v7.0.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v6.2.1...@cypress/react-v7.0.0) (2022-11-07)


### Bug Fixes

* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))
* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount

# [@cypress/react-v6.2.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v6.2.0...@cypress/react-v6.2.1) (2022-11-01)


Expand Down
14 changes: 7 additions & 7 deletions npm/react/src/createMount.ts
Expand Up @@ -40,12 +40,6 @@ export const makeMountFn = (

mountCleanup = internalMountOptions.cleanup

// Get the display name property via the component constructor
// @ts-ignore FIXME
const componentName = getDisplayName(jsx.type)

const jsxComponentName = `<${componentName} ... />`

return cy
.then(() => {
const reactDomToUse = internalMountOptions.reactDom
Expand Down Expand Up @@ -99,6 +93,12 @@ export const makeMountFn = (
.wait(0, { log: false })
.then(() => {
if (options.log !== false) {
// Get the display name property via the component constructor
// @ts-ignore FIXME
const componentName = getDisplayName(jsx)

const jsxComponentName = `<${componentName} ... />`

Cypress.log({
name: type,
type: 'parent',
Expand All @@ -108,7 +108,7 @@ export const makeMountFn = (
consoleProps: () => {
return {
// @ts-ignore protect the use of jsx functional components use ReactNode
props: jsx.props,
props: jsx?.props,
description: type === 'mount' ? 'Mounts React component' : 'Rerenders mounted React component',
home: 'https://github.com/cypress-io/cypress',
}
Expand Down
18 changes: 6 additions & 12 deletions npm/react/src/getDisplayName.ts
@@ -1,6 +1,6 @@
type JSX = Function & { displayName: string }
import type { ReactNode } from 'react'

const cachedDisplayNames: WeakMap<JSX, string> = new WeakMap()
type JSX = Function & { displayName: string }

/**
* Gets the display name of the component when possible.
Expand All @@ -9,13 +9,13 @@ const cachedDisplayNames: WeakMap<JSX, string> = new WeakMap()
* @link https://github.com/facebook/react-devtools/blob/master/backend/getDisplayName.js
*/
export default function getDisplayName (
type: JSX,
node: ReactNode,
fallbackName: string = 'Unknown',
): string {
const nameFromCache = cachedDisplayNames.get(type)
const type: JSX | undefined = (node as any)?.type

if (nameFromCache != null) {
return nameFromCache
if (!type) {
return fallbackName
}

let displayName: string | null = null
Expand Down Expand Up @@ -49,11 +49,5 @@ export default function getDisplayName (
}
}

try {
cachedDisplayNames.set(type, displayName)
} catch (e) {
// do nothing
}

return displayName
}
13 changes: 13 additions & 0 deletions npm/react18/CHANGELOG.md
@@ -1,3 +1,16 @@
# [@cypress/react18-v2.0.0](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.1.1...@cypress/react18-v2.0.0) (2022-11-07)


### Bug Fixes

* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))
* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount

# [@cypress/react18-v1.1.1](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.1.0...@cypress/react18-v1.1.1) (2022-10-13)


Expand Down
13 changes: 13 additions & 0 deletions npm/svelte/CHANGELOG.md
@@ -1,3 +1,16 @@
# [@cypress/svelte-v2.0.0](https://github.com/cypress-io/cypress/compare/@cypress/svelte-v1.0.2...@cypress/svelte-v2.0.0) (2022-11-07)


### Bug Fixes

* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))
* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount

# [@cypress/svelte-v1.0.2](https://github.com/cypress-io/cypress/compare/@cypress/svelte-v1.0.1...@cypress/svelte-v1.0.2) (2022-11-01)


Expand Down
12 changes: 12 additions & 0 deletions npm/vite-dev-server/CHANGELOG.md
@@ -1,3 +1,15 @@
# [@cypress/vite-dev-server-v4.0.0](https://github.com/cypress-io/cypress/compare/@cypress/vite-dev-server-v3.4.0...@cypress/vite-dev-server-v4.0.0) (2022-11-07)


### Bug Fixes

* normalize vite config resolution ([#24369](https://github.com/cypress-io/cypress/issues/24369)) ([feba489](https://github.com/cypress-io/cypress/commit/feba489a9aeaddad3197764fe7e7405cfb4e7a56))


### BREAKING CHANGES

* vite.config.js is no longer merged when devServer.viteConfig is provided

# [@cypress/vite-dev-server-v3.4.0](https://github.com/cypress-io/cypress/compare/@cypress/vite-dev-server-v3.3.1...@cypress/vite-dev-server-v3.4.0) (2022-11-01)


Expand Down
27 changes: 27 additions & 0 deletions npm/vue/CHANGELOG.md
@@ -1,3 +1,30 @@
# [@cypress/vue-v5.0.1](https://github.com/cypress-io/cypress/compare/@cypress/vue-v5.0.0...@cypress/vue-v5.0.1) (2022-11-08)


### Bug Fixes

* make component derived info not throw ([#24571](https://github.com/cypress-io/cypress/issues/24571)) ([838dd4f](https://github.com/cypress-io/cypress/commit/838dd4fa2e0ec56633d0af2faf10a47d190b5594))

# [@cypress/vue-v5.0.0](https://github.com/cypress-io/cypress/compare/@cypress/vue-v4.2.2...@cypress/vue-v5.0.0) (2022-11-07)


### Bug Fixes

* remove dependence on @cypress/<dep> types ([#24415](https://github.com/cypress-io/cypress/issues/24415)) ([58e0ab9](https://github.com/cypress-io/cypress/commit/58e0ab91604618ea6f75932622f7e66e419270e6))
* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))
* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074))


### Features

* include component and wrapper in return type for vue mount adapter ([#24479](https://github.com/cypress-io/cypress/issues/24479)) ([33875d7](https://github.com/cypress-io/cypress/commit/33875d75505416b1f65ca7c6d5dedc46f3289f1b))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount
* Vue mount returns wrapper and component rather than wrapper only

# [@cypress/vue-v4.2.2](https://github.com/cypress-io/cypress/compare/@cypress/vue-v4.2.1...@cypress/vue-v4.2.2) (2022-11-01)


Expand Down
5 changes: 1 addition & 4 deletions npm/vue/src/index.ts
Expand Up @@ -370,7 +370,7 @@ export function mount<
* Mounts a component and returns an object containing the component and VueWrapper
* @param componentOptions
* @param options
* @returns {Cypress.Chainable<{wrapper: VueWrapper<T>, component: T}
* @returns {Cypress.Chainable<{wrapper: VueWrapper<T>, component: T}>}
* @see {@link https://on.cypress.io/mounting-vue} for more details.
* @example
* import { mount } from '@cypress/vue'
Expand All @@ -387,9 +387,6 @@ export function mount (componentOptions: any, options: any = {}) {
// Remove last mounted component if cy.mount is called more than once in a test
cleanup()

// TODO: get the real displayName and props from VTU shallowMount
const componentName = getComponentDisplayName(componentOptions)

// then wait for cypress to load
return cy.then(() => {
// @ts-ignore
Expand Down
20 changes: 20 additions & 0 deletions npm/vue2/CHANGELOG.md
@@ -1,3 +1,23 @@
# [@cypress/vue2-v2.0.0](https://github.com/cypress-io/cypress/compare/@cypress/vue2-v1.1.2...@cypress/vue2-v2.0.0) (2022-11-07)


### Bug Fixes

* remove dependence on @cypress/<dep> types ([#24415](https://github.com/cypress-io/cypress/issues/24415)) ([58e0ab9](https://github.com/cypress-io/cypress/commit/58e0ab91604618ea6f75932622f7e66e419270e6))
* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))
* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074))


### Features

* include component and wrapper in return type for vue mount adapter ([#24479](https://github.com/cypress-io/cypress/issues/24479)) ([33875d7](https://github.com/cypress-io/cypress/commit/33875d75505416b1f65ca7c6d5dedc46f3289f1b))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount
* Vue mount returns wrapper and component rather than wrapper only

# [@cypress/vue2-v1.1.2](https://github.com/cypress-io/cypress/compare/@cypress/vue2-v1.1.1...@cypress/vue2-v1.1.2) (2022-11-01)


Expand Down
14 changes: 14 additions & 0 deletions npm/webpack-dev-server/CHANGELOG.md
@@ -1,3 +1,17 @@
# [@cypress/webpack-dev-server-v3.0.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v2.5.0...@cypress/webpack-dev-server-v3.0.0) (2022-11-07)


### Bug Fixes

* normalize vite config resolution ([#24369](https://github.com/cypress-io/cypress/issues/24369)) ([feba489](https://github.com/cypress-io/cypress/commit/feba489a9aeaddad3197764fe7e7405cfb4e7a56))
* remove last mounted component upon subsequent mount calls ([#24470](https://github.com/cypress-io/cypress/issues/24470)) ([f39eb1c](https://github.com/cypress-io/cypress/commit/f39eb1c19e0923bda7ae263168fc6448da942d54))


### BREAKING CHANGES

* remove last mounted component upon subsequent mount calls of mount
* vite.config.js is no longer merged when devServer.viteConfig is provided

# [@cypress/webpack-dev-server-v2.5.0](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v2.4.1...@cypress/webpack-dev-server-v2.5.0) (2022-11-01)


Expand Down
7 changes: 7 additions & 0 deletions npm/webpack-preprocessor/CHANGELOG.md
@@ -1,3 +1,10 @@
# [@cypress/webpack-preprocessor-v5.15.4](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.15.3...@cypress/webpack-preprocessor-v5.15.4) (2022-11-07)


### Bug Fixes

* remove some CT functions and props ([#24419](https://github.com/cypress-io/cypress/issues/24419)) ([294985f](https://github.com/cypress-io/cypress/commit/294985f8b3e0fa00ed66d25f88c8814603766074))

# [@cypress/webpack-preprocessor-v5.15.3](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.15.2...@cypress/webpack-preprocessor-v5.15.3) (2022-11-02)


Expand Down

2 comments on commit 46a480f

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 46a480f Nov 8, 2022

Choose a reason for hiding this comment

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

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

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.0.0/linux-x64/marktnoonan/windows-test-updates-46a480f7d7fb0a8de5f49d0b8dde690d1903d734/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 46a480f Nov 8, 2022

Choose a reason for hiding this comment

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

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

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.0.0/linux-arm64/marktnoonan/windows-test-updates-46a480f7d7fb0a8de5f49d0b8dde690d1903d734/cypress.tgz

Please sign in to comment.