mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-23 07:39:52 -06:00
feat: React 18 support (#22876)
* update cli exports
* add additional react adapters
* update system test infra to better cover react versions
* use idiomatic cy.mount and cy.unmount
* add additional test projects
* update tests
* add new modules
* remove dead code, organize code more
* add react 16 project
* update webpack to resolve react correctly
* add test for react 16
* update snaps
* add react adapters
* ignore cli/react files
* use official rollup plugin to bundle npm/react
* update yarn lock for webpack dev server tests
* update vite dev server projects
* update config
* remove console.log
* update tsconfig
* fix tests
* fix another test
* update snaps
* update snaps
* fix build
* remove react{16,17}, update tests
* update build
* add missing export
* update test
* fixing tests
* fixing tests
* update snaps
* update snaps again
* build artifacts on circle
* dont try to update rollup plugin
* update circle
* update
* add missing build step
* update deps, remove old code
* revert circle changes
* do not hoist deps from react18
* remove deps
This commit is contained in:
2
cli/.gitignore
vendored
2
cli/.gitignore
vendored
@@ -17,5 +17,5 @@ build
|
||||
# the sync-exported-npm-with-cli.js script
|
||||
vue
|
||||
vue2
|
||||
react
|
||||
react*
|
||||
mount-utils
|
||||
|
||||
@@ -107,7 +107,8 @@
|
||||
"mount-utils",
|
||||
"vue",
|
||||
"react",
|
||||
"vue2"
|
||||
"vue2",
|
||||
"react18"
|
||||
],
|
||||
"bin": {
|
||||
"cypress": "bin/cypress"
|
||||
@@ -141,6 +142,11 @@
|
||||
"require": "./react/dist/cypress-react.cjs.js",
|
||||
"types": "./react/dist/index.d.ts"
|
||||
},
|
||||
"./react18": {
|
||||
"import": "./react18/dist/cypress-react.esm-bundler.js",
|
||||
"require": "./react18/dist/cypress-react.cjs.js",
|
||||
"types": "./react18/dist/index.d.ts"
|
||||
},
|
||||
"./mount-utils": {
|
||||
"require": "./mount-utils/dist/index.js",
|
||||
"types": "./mount-utils/dist/index.d.ts"
|
||||
|
||||
@@ -9,6 +9,7 @@ shell.set('-e') // any error is fatal
|
||||
const npmModulesToCopy = [
|
||||
'mount-utils',
|
||||
'react',
|
||||
'react18',
|
||||
'vue',
|
||||
'vue2',
|
||||
]
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import ts from 'rollup-plugin-typescript2'
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
// CommonJS to easily share across packages
|
||||
const ts = require('rollup-plugin-typescript2')
|
||||
const { default: resolve } = require('@rollup/plugin-node-resolve')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
|
||||
import pkg from './package.json'
|
||||
const pkg = require('./package.json')
|
||||
|
||||
const banner = `
|
||||
/**
|
||||
@@ -16,7 +17,6 @@ function createEntry (options) {
|
||||
const {
|
||||
format,
|
||||
input,
|
||||
isBrowser,
|
||||
} = options
|
||||
|
||||
const config = {
|
||||
@@ -24,9 +24,22 @@ function createEntry (options) {
|
||||
external: [
|
||||
'react',
|
||||
'react-dom',
|
||||
'react-dom/client',
|
||||
],
|
||||
plugins: [
|
||||
resolve(), commonjs(),
|
||||
resolve(),
|
||||
commonjs(),
|
||||
ts({
|
||||
check: format === 'es',
|
||||
tsconfigOverride: {
|
||||
compilerOptions: {
|
||||
declaration: format === 'es',
|
||||
target: 'es5',
|
||||
module: format === 'cjs' ? 'es2015' : 'esnext',
|
||||
},
|
||||
exclude: ['tests'],
|
||||
},
|
||||
}),
|
||||
],
|
||||
output: {
|
||||
banner,
|
||||
@@ -36,43 +49,26 @@ function createEntry (options) {
|
||||
globals: {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
'react-dom/client': 'ReactDOM/client',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if (format === 'es') {
|
||||
config.output.file = pkg.module
|
||||
if (isBrowser) {
|
||||
config.output.file = pkg.unpkg
|
||||
}
|
||||
}
|
||||
|
||||
if (format === 'cjs') {
|
||||
config.output.file = pkg.main
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`Building ${format}: ${config.output.file}`)
|
||||
|
||||
config.plugins.push(
|
||||
ts({
|
||||
check: format === 'es' && isBrowser,
|
||||
tsconfigOverride: {
|
||||
compilerOptions: {
|
||||
declaration: format === 'es',
|
||||
target: 'es5', // not sure what this should be?
|
||||
module: format === 'cjs' ? 'es2015' : 'esnext',
|
||||
},
|
||||
exclude: ['tests'],
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
export default [
|
||||
createEntry({ format: 'es', input: 'src/index.ts', isBrowser: false }),
|
||||
createEntry({ format: 'es', input: 'src/index.ts', isBrowser: true }),
|
||||
createEntry({ format: 'iife', input: 'src/index.ts', isBrowser: true }),
|
||||
createEntry({ format: 'cjs', input: 'src/index.ts', isBrowser: false }),
|
||||
module.exports = [
|
||||
createEntry({ format: 'es', input: 'src/index.ts' }),
|
||||
createEntry({ format: 'cjs', input: 'src/index.ts' }),
|
||||
]
|
||||
|
||||
207
npm/react/src/createMount.ts
Normal file
207
npm/react/src/createMount.ts
Normal file
@@ -0,0 +1,207 @@
|
||||
import * as React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import getDisplayName from './getDisplayName'
|
||||
import {
|
||||
injectStylesBeforeElement,
|
||||
getContainerEl,
|
||||
ROOT_SELECTOR,
|
||||
setupHooks,
|
||||
} from '@cypress/mount-utils'
|
||||
import type { InternalMountOptions, InternalUnmountOptions, MountOptions, MountReturn, UnmountArgs } from './types'
|
||||
|
||||
/**
|
||||
* Inject custom style text or CSS file or 3rd party style resources
|
||||
*/
|
||||
const injectStyles = (options: MountOptions) => {
|
||||
return (): HTMLElement => {
|
||||
const el = getContainerEl()
|
||||
|
||||
return injectStylesBeforeElement(options, document, el)
|
||||
}
|
||||
}
|
||||
|
||||
export let lastMountedReactDom: (typeof ReactDOM) | undefined
|
||||
|
||||
/**
|
||||
* Create an `mount` function. Performs all the non-React-version specific
|
||||
* behavior related to mounting. The React-version-specific code
|
||||
* is injected. This helps us to maintain a consistent public API
|
||||
* and handle breaking changes in React's rendering API.
|
||||
*
|
||||
* This is designed to be consumed by `npm/react{16,17,18}`, and other React adapters,
|
||||
* or people writing adapters for third-party, custom adapters.
|
||||
*/
|
||||
export const makeMountFn = (
|
||||
type: 'mount' | 'rerender',
|
||||
jsx: React.ReactNode,
|
||||
options: MountOptions = {},
|
||||
rerenderKey?: string,
|
||||
internalMountOptions?: InternalMountOptions,
|
||||
): globalThis.Cypress.Chainable<MountReturn> => {
|
||||
if (!internalMountOptions) {
|
||||
throw Error('internalMountOptions must be provided with `render` and `reactDom` parameters')
|
||||
}
|
||||
|
||||
// Get the display name property via the component constructor
|
||||
// @ts-ignore FIXME
|
||||
const componentName = getDisplayName(jsx.type, options.alias)
|
||||
const displayName = options.alias || componentName
|
||||
|
||||
const jsxComponentName = `<${componentName} ... />`
|
||||
|
||||
const message = options.alias
|
||||
? `${jsxComponentName} as "${options.alias}"`
|
||||
: jsxComponentName
|
||||
|
||||
return cy
|
||||
.then(injectStyles(options))
|
||||
.then(() => {
|
||||
const reactDomToUse = internalMountOptions.reactDom
|
||||
|
||||
lastMountedReactDom = reactDomToUse
|
||||
|
||||
const el = getContainerEl()
|
||||
|
||||
if (!el) {
|
||||
throw new Error(
|
||||
[
|
||||
`[@cypress/react] 🔥 Hmm, cannot find root element to mount the component. Searched for ${ROOT_SELECTOR}`,
|
||||
].join(' '),
|
||||
)
|
||||
}
|
||||
|
||||
const key = rerenderKey ??
|
||||
// @ts-ignore provide unique key to the the wrapped component to make sure we are rerendering between tests
|
||||
(Cypress?.mocha?.getRunner()?.test?.title as string || '') + Math.random()
|
||||
const props = {
|
||||
key,
|
||||
}
|
||||
|
||||
const reactComponent = React.createElement(
|
||||
options.strict ? React.StrictMode : React.Fragment,
|
||||
props,
|
||||
jsx,
|
||||
)
|
||||
// since we always surround the component with a fragment
|
||||
// let's get back the original component
|
||||
const userComponent = (reactComponent.props as {
|
||||
key: string
|
||||
children: React.ReactNode
|
||||
}).children
|
||||
|
||||
internalMountOptions.render(reactComponent, el, reactDomToUse)
|
||||
|
||||
if (options.log !== false) {
|
||||
Cypress.log({
|
||||
name: type,
|
||||
type: 'parent',
|
||||
message: [message],
|
||||
// @ts-ignore
|
||||
$el: (el.children.item(0) as unknown) as JQuery<HTMLElement>,
|
||||
consoleProps: () => {
|
||||
return {
|
||||
// @ts-ignore protect the use of jsx functional components use ReactNode
|
||||
props: jsx.props,
|
||||
description: type === 'mount' ? 'Mounts React component' : 'Rerenders mounted React component',
|
||||
home: 'https://github.com/cypress-io/cypress',
|
||||
}
|
||||
},
|
||||
}).snapshot('mounted').end()
|
||||
}
|
||||
|
||||
return (
|
||||
// Separate alias and returned value. Alias returns the component only, and the thenable returns the additional functions
|
||||
cy.wrap<React.ReactNode>(userComponent, { log: false })
|
||||
.as(displayName)
|
||||
.then(() => {
|
||||
return cy.wrap<MountReturn>({
|
||||
component: userComponent,
|
||||
rerender: (newComponent) => makeMountFn('rerender', newComponent, options, key, internalMountOptions),
|
||||
unmount: internalMountOptions.unmount,
|
||||
}, { log: false })
|
||||
})
|
||||
// by waiting, we delaying test execution for the next tick of event loop
|
||||
// and letting hooks and component lifecycle methods to execute mount
|
||||
// https://github.com/bahmutov/cypress-react-unit-test/issues/200
|
||||
.wait(0, { log: false })
|
||||
)
|
||||
// Bluebird types are terrible. I don't think the return type can be carried without this cast
|
||||
}) as unknown as globalThis.Cypress.Chainable<MountReturn>
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an `unmount` function. Performs all the non-React-version specific
|
||||
* behavior related to unmounting.
|
||||
*
|
||||
* This is designed to be consumed by `npm/react{16,17,18}`, and other React adapters,
|
||||
* or people writing adapters for third-party, custom adapters.
|
||||
*/
|
||||
export const makeUnmountFn = (options: UnmountArgs, internalUnmountOptions: InternalUnmountOptions) => {
|
||||
return cy.then(() => {
|
||||
return cy.get(ROOT_SELECTOR, { log: false }).then(($el) => {
|
||||
if (lastMountedReactDom) {
|
||||
internalUnmountOptions.unmount($el[0])
|
||||
const wasUnmounted = internalUnmountOptions.unmount($el[0])
|
||||
|
||||
if (wasUnmounted && options.log) {
|
||||
Cypress.log({
|
||||
name: 'unmount',
|
||||
type: 'parent',
|
||||
message: [options.boundComponentMessage ?? 'Unmounted component'],
|
||||
consoleProps: () => {
|
||||
return {
|
||||
description: 'Unmounts React component',
|
||||
parent: $el[0],
|
||||
home: 'https://github.com/cypress-io/cypress',
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Cleanup before each run
|
||||
// NOTE: we cannot use unmount here because
|
||||
// we are not in the context of a test
|
||||
const preMountCleanup = () => {
|
||||
const el = getContainerEl()
|
||||
|
||||
if (el && lastMountedReactDom) {
|
||||
lastMountedReactDom.unmountComponentAtNode(el)
|
||||
}
|
||||
}
|
||||
|
||||
const _mount = (jsx: React.ReactNode, options: MountOptions = {}) => makeMountFn('mount', jsx, options)
|
||||
|
||||
export const createMount = (defaultOptions: MountOptions) => {
|
||||
return (
|
||||
element: React.ReactElement,
|
||||
options?: MountOptions,
|
||||
) => {
|
||||
return _mount(element, { ...defaultOptions, ...options })
|
||||
}
|
||||
}
|
||||
|
||||
/** @deprecated Should be removed in the next major version */
|
||||
// TODO: Remove
|
||||
export default _mount
|
||||
|
||||
export interface JSX extends Function {
|
||||
displayName: string
|
||||
}
|
||||
|
||||
// Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
|
||||
// by creating an explicit function/import that the user can register in their 'component.js' support file,
|
||||
// such as:
|
||||
// import 'cypress/<my-framework>/support'
|
||||
// or
|
||||
// import { registerCT } from 'cypress/<my-framework>'
|
||||
// registerCT()
|
||||
// Note: This would be a breaking change
|
||||
|
||||
// it is required to unmount component in beforeEach hook in order to provide a clean state inside test
|
||||
// because `mount` can be called after some preparation that can side effect unmount
|
||||
// @see npm/react/cypress/component/advanced/set-timeout-example/loading-indicator-spec.js
|
||||
setupHooks(preMountCleanup)
|
||||
@@ -1,4 +1,4 @@
|
||||
import { JSX } from './mount'
|
||||
import { JSX } from './createMount'
|
||||
|
||||
const cachedDisplayNames: WeakMap<JSX, string> = new WeakMap()
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
export * from './createMount'
|
||||
|
||||
export * from './mount'
|
||||
|
||||
export * from './mountHook'
|
||||
|
||||
export * from './types'
|
||||
|
||||
@@ -1,337 +1,34 @@
|
||||
import * as React from 'react'
|
||||
import * as ReactDOM from 'react-dom'
|
||||
import getDisplayName from './getDisplayName'
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import {
|
||||
injectStylesBeforeElement,
|
||||
StyleOptions,
|
||||
getContainerEl,
|
||||
ROOT_SELECTOR,
|
||||
setupHooks,
|
||||
} from '@cypress/mount-utils'
|
||||
makeMountFn,
|
||||
makeUnmountFn,
|
||||
lastMountedReactDom,
|
||||
} from './createMount'
|
||||
import type {
|
||||
MountOptions,
|
||||
InternalMountOptions,
|
||||
InternalUnmountOptionsReact,
|
||||
} from './types'
|
||||
|
||||
/**
|
||||
* Inject custom style text or CSS file or 3rd party style resources
|
||||
*/
|
||||
const injectStyles = (options: MountOptions) => {
|
||||
return (): HTMLElement => {
|
||||
const el = getContainerEl()
|
||||
|
||||
return injectStylesBeforeElement(options, document, el)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mount a React component in a blank document; register it as an alias
|
||||
* To access: use an alias or original component reference
|
||||
* @function mount
|
||||
* @param {React.ReactElement} jsx - component to mount
|
||||
* @param {MountOptions} [options] - options, like alias, styles
|
||||
* @see https://github.com/bahmutov/@cypress/react
|
||||
* @see https://glebbahmutov.com/blog/my-vision-for-component-tests/
|
||||
* @example
|
||||
```
|
||||
import Hello from './hello.jsx'
|
||||
import { mount } from '@cypress/react'
|
||||
it('works', () => {
|
||||
mount(<Hello onClick={cy.stub()} />)
|
||||
// use Cypress commands
|
||||
cy.contains('Hello').click()
|
||||
})
|
||||
```
|
||||
**/
|
||||
export const mount = (jsx: React.ReactNode, options: MountOptions = {}) => _mount('mount', jsx, options)
|
||||
|
||||
let lastMountedReactDom: (typeof ReactDOM) | undefined
|
||||
|
||||
/**
|
||||
* @see `mount`
|
||||
* @param type The type of mount executed
|
||||
* @param rerenderKey If specified, use the provided key rather than generating a new one
|
||||
*/
|
||||
const _mount = (type: 'mount' | 'rerender', jsx: React.ReactNode, options: MountOptions = {}, rerenderKey?: string): globalThis.Cypress.Chainable<MountReturn> => {
|
||||
// Get the display name property via the component constructor
|
||||
// @ts-ignore FIXME
|
||||
const componentName = getDisplayName(jsx.type, options.alias)
|
||||
const displayName = options.alias || componentName
|
||||
|
||||
const jsxComponentName = `<${componentName} ... />`
|
||||
|
||||
const message = options.alias
|
||||
? `${jsxComponentName} as "${options.alias}"`
|
||||
: jsxComponentName
|
||||
|
||||
return cy
|
||||
.then(injectStyles(options))
|
||||
.then(() => {
|
||||
const reactDomToUse = options.ReactDom || ReactDOM
|
||||
|
||||
lastMountedReactDom = reactDomToUse
|
||||
|
||||
const el = getContainerEl()
|
||||
|
||||
if (!el) {
|
||||
throw new Error(
|
||||
[
|
||||
`[@cypress/react] 🔥 Hmm, cannot find root element to mount the component. Searched for ${ROOT_SELECTOR}`,
|
||||
].join(' '),
|
||||
)
|
||||
}
|
||||
|
||||
const key = rerenderKey ??
|
||||
// @ts-ignore provide unique key to the the wrapped component to make sure we are rerendering between tests
|
||||
(Cypress?.mocha?.getRunner()?.test?.title as string || '') + Math.random()
|
||||
const props = {
|
||||
key,
|
||||
}
|
||||
|
||||
const reactComponent = React.createElement(
|
||||
options.strict ? React.StrictMode : React.Fragment,
|
||||
props,
|
||||
jsx,
|
||||
)
|
||||
// since we always surround the component with a fragment
|
||||
// let's get back the original component
|
||||
const userComponent = (reactComponent.props as {
|
||||
key: string
|
||||
children: React.ReactNode
|
||||
}).children
|
||||
|
||||
reactDomToUse.render(reactComponent, el)
|
||||
|
||||
if (options.log !== false) {
|
||||
Cypress.log({
|
||||
name: type,
|
||||
type: 'parent',
|
||||
message: [message],
|
||||
// @ts-ignore
|
||||
$el: (el.children.item(0) as unknown) as JQuery<HTMLElement>,
|
||||
consoleProps: () => {
|
||||
return {
|
||||
// @ts-ignore protect the use of jsx functional components use ReactNode
|
||||
props: jsx.props,
|
||||
description: type === 'mount' ? 'Mounts React component' : 'Rerenders mounted React component',
|
||||
home: 'https://github.com/cypress-io/cypress',
|
||||
}
|
||||
},
|
||||
}).snapshot('mounted').end()
|
||||
}
|
||||
|
||||
return (
|
||||
// Separate alias and returned value. Alias returns the component only, and the thenable returns the additional functions
|
||||
cy.wrap<React.ReactNode>(userComponent, { log: false })
|
||||
.as(displayName)
|
||||
.then(() => {
|
||||
return cy.wrap<MountReturn>({
|
||||
component: userComponent,
|
||||
rerender: (newComponent) => _mount('rerender', newComponent, options, key),
|
||||
unmount: () => _unmount({ boundComponentMessage: jsxComponentName, log: true }),
|
||||
}, { log: false })
|
||||
})
|
||||
// by waiting, we delaying test execution for the next tick of event loop
|
||||
// and letting hooks and component lifecycle methods to execute mount
|
||||
// https://github.com/bahmutov/cypress-react-unit-test/issues/200
|
||||
.wait(0, { log: false })
|
||||
)
|
||||
// Bluebird types are terrible. I don't think the return type can be carried without this cast
|
||||
}) as unknown as globalThis.Cypress.Chainable<MountReturn>
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the mounted component. Notice this command automatically
|
||||
* queues up the `unmount` into Cypress chain, thus you don't need `.then`
|
||||
* to call it.
|
||||
* @see https://github.com/cypress-io/cypress/tree/develop/npm/react/cypress/component/basic/unmount
|
||||
* @example
|
||||
```
|
||||
import { mount, unmount } from '@cypress/react'
|
||||
it('works', () => {
|
||||
mount(...)
|
||||
// interact with the component using Cypress commands
|
||||
// whenever you want to unmount
|
||||
unmount()
|
||||
})
|
||||
```
|
||||
*/
|
||||
// @ts-ignore
|
||||
export const unmount = (options = { log: true }): globalThis.Cypress.Chainable<JQuery<HTMLElement>> => _unmount(options)
|
||||
|
||||
const _unmount = (options: { boundComponentMessage?: string, log: boolean }) => {
|
||||
return cy.then(() => {
|
||||
return cy.get(ROOT_SELECTOR, { log: false }).then(($el) => {
|
||||
if (lastMountedReactDom) {
|
||||
const wasUnmounted = lastMountedReactDom.unmountComponentAtNode($el[0])
|
||||
|
||||
if (wasUnmounted && options.log) {
|
||||
Cypress.log({
|
||||
name: 'unmount',
|
||||
type: 'parent',
|
||||
message: [options.boundComponentMessage ?? 'Unmounted component'],
|
||||
consoleProps: () => {
|
||||
return {
|
||||
description: 'Unmounts React component',
|
||||
parent: $el[0],
|
||||
home: 'https://github.com/cypress-io/cypress',
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Cleanup before each run
|
||||
// NOTE: we cannot use unmount here because
|
||||
// we are not in the context of a test
|
||||
const preMountCleanup = () => {
|
||||
const el = getContainerEl()
|
||||
|
||||
if (el && lastMountedReactDom) {
|
||||
lastMountedReactDom.unmountComponentAtNode(el)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new instance of `mount` function with default options
|
||||
* @function createMount
|
||||
* @param {MountOptions} [defaultOptions] - defaultOptions for returned `mount` function
|
||||
* @returns new instance of `mount` with assigned options
|
||||
* @example
|
||||
* ```
|
||||
* import Hello from './hello.jsx'
|
||||
* import { createMount } from '@cypress/react'
|
||||
*
|
||||
* const mount = createMount({ strict: true, cssFile: 'path/to/any/css/file.css' })
|
||||
*
|
||||
* it('works', () => {
|
||||
* mount(<Hello />)
|
||||
* // use Cypress commands
|
||||
* cy.get('button').should('have.css', 'color', 'rgb(124, 12, 109)')
|
||||
* })
|
||||
```
|
||||
**/
|
||||
export const createMount = (defaultOptions: MountOptions) => {
|
||||
return (
|
||||
element: React.ReactElement,
|
||||
options?: MountOptions,
|
||||
) => {
|
||||
return mount(element, { ...defaultOptions, ...options })
|
||||
}
|
||||
}
|
||||
|
||||
/** @deprecated Should be removed in the next major version */
|
||||
// TODO: Remove
|
||||
export default mount
|
||||
|
||||
// I hope to get types and docs from functions imported from ./index one day
|
||||
// but for now have to document methods in both places
|
||||
// like this: import {mount} from './index'
|
||||
// TODO: Clean up types
|
||||
export interface ReactModule {
|
||||
name: string
|
||||
type: string
|
||||
location: string
|
||||
source: string
|
||||
}
|
||||
|
||||
export interface MountReactComponentOptions {
|
||||
alias: string
|
||||
ReactDom: typeof ReactDOM
|
||||
/**
|
||||
* Log the mounting command into Cypress Command Log,
|
||||
* true by default.
|
||||
*/
|
||||
log: boolean
|
||||
/**
|
||||
* Render component in React [strict mode](https://reactjs.org/docs/strict-mode.html)
|
||||
* It activates additional checks and warnings for child components.
|
||||
*/
|
||||
strict: boolean
|
||||
}
|
||||
|
||||
export type MountOptions = Partial<StyleOptions & MountReactComponentOptions>
|
||||
|
||||
export interface MountReturn {
|
||||
/**
|
||||
* The component that was rendered.
|
||||
*/
|
||||
component: React.ReactNode
|
||||
/**
|
||||
* Rerenders the specified component with new props. This allows testing of components that store state (`setState`)
|
||||
* or have asynchronous updates (`useEffect`, `useLayoutEffect`).
|
||||
*/
|
||||
rerender: (component: React.ReactNode) => globalThis.Cypress.Chainable<MountReturn>
|
||||
/**
|
||||
* Removes the mounted component.
|
||||
* @see `unmount`
|
||||
*/
|
||||
// @ts-ignore
|
||||
unmount: () => globalThis.Cypress.Chainable<JQuery<HTMLElement>>
|
||||
}
|
||||
|
||||
/**
|
||||
* The `type` property from the transpiled JSX object.
|
||||
* @example
|
||||
* const { type } = React.createElement('div', null, 'Hello')
|
||||
* const { type } = <div>Hello</div>
|
||||
*/
|
||||
export interface JSX extends Function {
|
||||
displayName: string
|
||||
}
|
||||
|
||||
export declare namespace Cypress {
|
||||
interface Cypress {
|
||||
stylesCache: any
|
||||
React: string
|
||||
ReactDOM: string
|
||||
Styles: string
|
||||
modules: ReactModule[]
|
||||
export function mount (jsx: React.ReactNode, options: MountOptions = {}, rerenderKey?: string) {
|
||||
const internalOptions: InternalMountOptions = {
|
||||
reactDom: ReactDOM,
|
||||
render: (reactComponent: ReturnType<typeof React.createElement>, el: HTMLElement, reactDomToUse: typeof ReactDOM) => {
|
||||
return (reactDomToUse || ReactDOM).render(reactComponent, el)
|
||||
},
|
||||
unmount,
|
||||
}
|
||||
|
||||
// NOTE: By default, avoiding React.Component/Element typings
|
||||
// for many cases, we don't want to import @types/react
|
||||
interface Chainable<Subject> {
|
||||
// adding quick "cy.state" method to avoid TS errors
|
||||
state: (key: string) => any
|
||||
// injectReactDOM: () => Chainable<void>
|
||||
// copyCompon { ReactDom }entStyles: (component: Symbol) => Chainable<void>
|
||||
/**
|
||||
* Mount a React component in a blank document; register it as an alias
|
||||
* To access: use an alias or original component reference
|
||||
* @function cy.mount
|
||||
* @param {Object} jsx - component to mount
|
||||
* @param {string} [Component] - alias to use later
|
||||
* @example
|
||||
```
|
||||
import Hello from './hello.jsx'
|
||||
// mount and access by alias
|
||||
cy.mount(<Hello />, 'Hello')
|
||||
// using default alias
|
||||
cy.get('@Component')
|
||||
// using specified alias
|
||||
cy.get('@Hello').its('state').should(...)
|
||||
// using original component
|
||||
cy.get(Hello)
|
||||
```
|
||||
**/
|
||||
// mount: (component: Symbol, alias?: string) => Chainable<void>
|
||||
get<S = any>(
|
||||
alias: string | symbol | Function,
|
||||
options?: Partial<any>,
|
||||
): Chainable<any>
|
||||
}
|
||||
return makeMountFn('mount', jsx, { ReactDom: ReactDOM, ...options }, rerenderKey, internalOptions)
|
||||
}
|
||||
|
||||
// Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
|
||||
// by creating an explicit function/import that the user can register in their 'component.js' support file,
|
||||
// such as:
|
||||
// import 'cypress/<my-framework>/support'
|
||||
// or
|
||||
// import { registerCT } from 'cypress/<my-framework>'
|
||||
// registerCT()
|
||||
// Note: This would be a breaking change
|
||||
export function unmount (options = { log: true }) {
|
||||
const internalOptions: InternalUnmountOptionsReact = {
|
||||
unmount: (el) => {
|
||||
return (lastMountedReactDom || ReactDOM).unmountComponentAtNode(el)
|
||||
},
|
||||
}
|
||||
|
||||
// it is required to unmount component in beforeEach hook in order to provide a clean state inside test
|
||||
// because `mount` can be called after some preparation that can side effect unmount
|
||||
// @see npm/react/cypress/component/advanced/set-timeout-example/loading-indicator-spec.js
|
||||
setupHooks(preMountCleanup)
|
||||
return makeUnmountFn(options, internalOptions)
|
||||
}
|
||||
|
||||
66
npm/react/src/types.ts
Normal file
66
npm/react/src/types.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import type React from 'react'
|
||||
import type { StyleOptions } from '@cypress/mount-utils'
|
||||
|
||||
export interface UnmountArgs {
|
||||
log: boolean
|
||||
boundComponentMessage?: string
|
||||
}
|
||||
|
||||
export interface InternalUnmountOptionsReact {
|
||||
unmount: (el: HTMLElement) => boolean
|
||||
}
|
||||
|
||||
export interface InternalUnmountOptionsReact18 {
|
||||
unmount: () => boolean
|
||||
}
|
||||
|
||||
export type InternalUnmountOptions =
|
||||
InternalUnmountOptionsReact
|
||||
| InternalUnmountOptionsReact18
|
||||
|
||||
export type MountOptions = Partial<StyleOptions & MountReactComponentOptions>
|
||||
|
||||
export interface MountReactComponentOptions {
|
||||
alias: string
|
||||
ReactDom: typeof import('react-dom')
|
||||
/**
|
||||
* Log the mounting command into Cypress Command Log,
|
||||
* true by default.
|
||||
*/
|
||||
log: boolean
|
||||
/**
|
||||
* Render component in React [strict mode](https://reactjs.org/docs/strict-mode.html)
|
||||
* It activates additional checks and warnings for child components.
|
||||
*/
|
||||
strict: boolean
|
||||
}
|
||||
|
||||
export interface InternalMountOptions {
|
||||
reactDom: typeof import('react-dom')
|
||||
render: (
|
||||
reactComponent: ReturnType<typeof React.createElement>,
|
||||
el: HTMLElement,
|
||||
reactDomToUse: typeof import('react-dom')
|
||||
) => void
|
||||
unmount: (options: UnmountArgs) => void
|
||||
|
||||
// globalThis.Cypress.Chainable<MountReturn>
|
||||
}
|
||||
|
||||
export interface MountReturn {
|
||||
/**
|
||||
* The component that was rendered.
|
||||
*/
|
||||
component: React.ReactNode
|
||||
/**
|
||||
* Rerenders the specified component with new props. This allows testing of components that store state (`setState`)
|
||||
* or have asynchronous updates (`useEffect`, `useLayoutEffect`).
|
||||
*/
|
||||
rerender: (component: React.ReactNode) => globalThis.Cypress.Chainable<MountReturn>
|
||||
/**
|
||||
* Removes the mounted component.
|
||||
* @see `unmount`
|
||||
*/
|
||||
// @ts-ignore
|
||||
unmount: (payload: UnmountArgs) => void // globalThis.Cypress.Chainable<JQuery<HTMLElement>>
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Basic Options */
|
||||
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
|
||||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"skipLibCheck": true,
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
] /* Specify library files to be included in the compilation: */,
|
||||
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
"declarationDir": "dist",
|
||||
"outDir": "dist" /* Redirect output structure to the directory. */,
|
||||
"rootDir": "src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||
/* Strict Type-Checking Options */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
/* Module Resolution Options */
|
||||
],
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
"types": [
|
||||
"cypress"
|
||||
] /* 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. */,
|
||||
],
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true
|
||||
"resolveJsonModule": false
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
|
||||
6
npm/react18/.releaserc.js
Normal file
6
npm/react18/.releaserc.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
...require('../../.releaserc.base'),
|
||||
branches: [
|
||||
{ name: 'master', channel: 'latest' },
|
||||
],
|
||||
}
|
||||
59
npm/react18/package.json
Normal file
59
npm/react18/package.json
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"name": "@cypress/react18",
|
||||
"version": "0.0.0-development",
|
||||
"description": "Test React components using Cypress",
|
||||
"main": "dist/cypress-react.cjs.js",
|
||||
"scripts": {
|
||||
"build": "rimraf dist && rollup -c rollup.config.js",
|
||||
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
||||
"build-prod": "yarn build",
|
||||
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cypress/react": "0.0.0-development",
|
||||
"@rollup/plugin-commonjs": "^17.1.0",
|
||||
"@rollup/plugin-node-resolve": "^11.1.1",
|
||||
"@types/react": "^16",
|
||||
"@types/react-dom": "^16",
|
||||
"cypress": "0.0.0-development",
|
||||
"react": "^16",
|
||||
"react-dom": "^16",
|
||||
"rollup": "^2.38.5",
|
||||
"rollup-plugin-typescript2": "^0.29.0",
|
||||
"typescript": "^4.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"cypress": "*",
|
||||
"react": "^18",
|
||||
"react-dom": "^18"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cypress-io/cypress.git"
|
||||
},
|
||||
"homepage": "https://github.com/cypress-io/cypress/blob/master/npm/react18/#readme",
|
||||
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Freact18&template=1-bug-report.md&title=",
|
||||
"keywords": [
|
||||
"react",
|
||||
"cypress",
|
||||
"cypress-io",
|
||||
"test",
|
||||
"testing"
|
||||
],
|
||||
"module": "dist/cypress-react.esm-bundler.js",
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
3
npm/react18/rollup.config.js
Normal file
3
npm/react18/rollup.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as RollupConfig from '../react/rollup.config'
|
||||
|
||||
export default RollupConfig
|
||||
42
npm/react18/src/index.ts
Normal file
42
npm/react18/src/index.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import React from 'react'
|
||||
// @ts-expect-error
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import {
|
||||
makeMountFn,
|
||||
makeUnmountFn,
|
||||
} from '@cypress/react'
|
||||
import type {
|
||||
MountOptions,
|
||||
InternalMountOptions,
|
||||
InternalUnmountOptionsReact18,
|
||||
UnmountArgs,
|
||||
} from '@cypress/react'
|
||||
|
||||
let root: any
|
||||
|
||||
export function mount (jsx: React.ReactNode, options: MountOptions = {}, rerenderKey?: string) {
|
||||
const internalOptions: InternalMountOptions = {
|
||||
reactDom: ReactDOM,
|
||||
render: (reactComponent: ReturnType<typeof React.createElement>, el: HTMLElement) => {
|
||||
root = ReactDOM.createRoot(el)
|
||||
|
||||
return root.render(reactComponent)
|
||||
},
|
||||
unmount,
|
||||
}
|
||||
|
||||
return makeMountFn('mount', jsx, { ReactDom: ReactDOM, ...options }, rerenderKey, internalOptions)
|
||||
}
|
||||
|
||||
export function unmount (options: UnmountArgs = { log: true }) {
|
||||
const internalOptions: InternalUnmountOptionsReact18 = {
|
||||
// type is ReturnType<typeof ReactDOM.createRoot>
|
||||
unmount: (): boolean => {
|
||||
root.unmount()
|
||||
|
||||
return true
|
||||
},
|
||||
}
|
||||
|
||||
return makeUnmountFn(options, internalOptions)
|
||||
}
|
||||
22
npm/react18/tsconfig.json
Normal file
22
npm/react18/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
],
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
"types": [
|
||||
"cypress"
|
||||
],
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": false
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
@@ -12,8 +12,8 @@
|
||||
"binary-release": "node ./scripts/binary.js release",
|
||||
"binary-upload": "node ./scripts/binary.js upload",
|
||||
"binary-zip": "node ./scripts/binary.js zip",
|
||||
"build": "yarn build-npm-modules && lerna run build --stream --no-bail --ignore create-cypress-tests --ignore cypress --ignore \"'@packages/{runner}'\" --ignore \"'@cypress/{react,vue,vue2,mount-utils}'\" && node ./cli/scripts/post-build.js && lerna run build --stream --scope create-cypress-tests",
|
||||
"build-npm-modules": "lerna run build --scope cypress --scope @cypress/mount-utils && lerna run build --scope \"'@cypress/{react,vue,vue2}'\"",
|
||||
"build": "yarn build-npm-modules && lerna run build --stream --no-bail --ignore create-cypress-tests --ignore cypress --ignore \"'@packages/{runner}'\" --ignore \"'@cypress/{react,react18,vue,vue2,mount-utils}'\" && node ./cli/scripts/post-build.js && lerna run build --stream --scope create-cypress-tests",
|
||||
"build-npm-modules": "lerna run build --scope cypress --scope @cypress/mount-utils && lerna run build --scope \"'@cypress/{react,react18,vue,vue2}'\"",
|
||||
"build-prod": "lerna run build-prod-ui --stream && lerna run build-prod --stream --ignore create-cypress-tests && node ./cli/scripts/post-build.js && lerna run build-prod --stream --scope create-cypress-tests --scope",
|
||||
"check-node-version": "node scripts/check-node-version.js",
|
||||
"check-terminal": "node scripts/check-terminal.js",
|
||||
|
||||
@@ -211,7 +211,7 @@ describe('Cypress In Cypress CT', { viewportWidth: 1500, defaultCommandTimeout:
|
||||
cy.withCtx(async (ctx, o) => {
|
||||
await ctx.actions.file.writeFileInProject(o.path, `
|
||||
import React from 'react'
|
||||
import { mount } from '@cypress/react'
|
||||
import { mount } from 'cypress/react'
|
||||
|
||||
describe('TestComponent', () => {
|
||||
it('renders the new test component', () => {
|
||||
|
||||
@@ -359,7 +359,7 @@ describe('Launchpad: Setup Project', () => {
|
||||
|
||||
cy.findByText('Confirm the front-end framework and bundler used in your project.')
|
||||
|
||||
cy.findByRole('button', { name: 'Front-end Framework React.js (detected)' }).click()
|
||||
cy.contains('Pick a framework').click()
|
||||
cy.findByRole('option', { name: 'Create React App' }).click()
|
||||
|
||||
cy.get('[data-testid="select-bundler"').should('not.exist')
|
||||
@@ -368,9 +368,9 @@ describe('Launchpad: Setup Project', () => {
|
||||
cy.findByRole('button', { name: 'Back' }).click()
|
||||
cy.get('[data-cy-testingtype="component"]').click()
|
||||
|
||||
cy.findByRole('button', { name: 'Next Step' }).should('not.have.disabled')
|
||||
cy.findByRole('button', { name: 'Next Step' }).should('have.disabled')
|
||||
|
||||
cy.findByRole('button', { name: 'Front-end Framework React.js (detected)' }).click()
|
||||
cy.contains('Pick a framework').click()
|
||||
cy.findByRole('option', { name: 'Create React App' }).click()
|
||||
cy.findByRole('button', { name: 'Bundler(Dev Server) Webpack' }).should('not.exist')
|
||||
cy.findByRole('button', { name: 'Next Step' }).should('not.have.disabled')
|
||||
|
||||
@@ -77,7 +77,7 @@ function scaffoldAndOpenCTProject (opts: {
|
||||
cy.contains('[data-cy-testingtype="component"]', 'Not Configured')
|
||||
cy.contains('Component Testing').click()
|
||||
|
||||
cy.contains('React.js(detected)').click()
|
||||
cy.contains('Pick a framework').click()
|
||||
cy.contains(opts.framework).click()
|
||||
if (opts.bundler) {
|
||||
cy.contains('Webpack(detected)').click()
|
||||
|
||||
@@ -5,13 +5,9 @@
|
||||
* However, the Cypress binary will also ship an export for `cypress/react` that's guaranteed to work
|
||||
* with this version of the binary
|
||||
*/
|
||||
const shell = require('shelljs')
|
||||
const path = require('path')
|
||||
const packlist = require('npm-packlist')
|
||||
const fs = require('fs')
|
||||
|
||||
shell.set('-v') // verbose
|
||||
shell.set('-e') // any error is fatal
|
||||
const fs = require('fs-extra')
|
||||
|
||||
// This script will be run in a postbuild task for each npm package
|
||||
// that will be re-exported by Cypress
|
||||
@@ -34,17 +30,16 @@ packlist({ path: currentPackageDir })
|
||||
const outDir = path.join(cliPath, exportName)
|
||||
|
||||
// 3. For each file, mkdir if not exists, and then copy the dist'd assets over
|
||||
// Shell is synchronous by default, but we don't actually need to await for the results
|
||||
// to write to the `cliPackageConfig` at the end
|
||||
files.forEach((f) => {
|
||||
// mkdir if not exists
|
||||
const { dir } = path.parse(f)
|
||||
|
||||
if (dir) {
|
||||
shell.mkdir('-p', path.join(outDir, dir))
|
||||
fs.mkdirSync(path.join(outDir, dir), { recursive: true })
|
||||
}
|
||||
|
||||
shell.cp(path.join(currentPackageDir, f), path.join(outDir, f))
|
||||
fs.cpSync(path.join(currentPackageDir, f), path.join(outDir, f))
|
||||
})
|
||||
|
||||
// After everything is copied, let's update the Cypress cli package.json['exports'] map.
|
||||
|
||||
566
system-tests/__snapshots__/component_testing_spec.ts.js
Normal file
566
system-tests/__snapshots__/component_testing_spec.ts.js
Normal file
@@ -0,0 +1,566 @@
|
||||
exports['React major versions with Webpack executes all of the tests for React v18 with Webpack 1'] = `
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Starting)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 2 found (App.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: src/App.cy.jsx, src/Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 2)
|
||||
41 modules
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: App.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/App.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (2 of 2)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✔ App.cy.jsx XX:XX 1 1 - - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✔ All specs passed! XX:XX 2 2 - - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
exports['React major versions with Webpack executes all of the tests for React v17 with Webpack 1'] = `
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Starting)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 2 found (App.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: src/App.cy.jsx, src/Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 2)
|
||||
39 modules
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: App.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/App.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (2 of 2)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✔ App.cy.jsx XX:XX 1 1 - - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✔ All specs passed! XX:XX 2 2 - - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
exports['React major versions with Vite executes all of the tests for React v17 with Vite 1'] = `
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Starting)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 2 found (App.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: src/App.cy.jsx, src/Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 2)
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: App.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/App.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (2 of 2)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✔ App.cy.jsx XX:XX 1 1 - - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✔ All specs passed! XX:XX 2 2 - - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
exports['React major versions with Vite executes all of the tests for React v18 with Vite 1'] = `
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Starting)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 2 found (App.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: src/App.cy.jsx, src/Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 2)
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: App.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/App.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (2 of 2)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✔ App.cy.jsx XX:XX 1 1 - - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✔ All specs passed! XX:XX 2 2 - - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
exports['React major versions with Vite executes all of the tests for React v16 with Vite 1'] = `
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Starting)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 2 found (App.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: src/App.cy.jsx, src/Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 2)
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: App.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/App.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (2 of 2)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✔ App.cy.jsx XX:XX 1 1 - - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✔ All specs passed! XX:XX 2 2 - - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
exports['React major versions with Webpack executes all of the tests for React v16 with Webpack 1'] = `
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Starting)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 2 found (App.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: src/App.cy.jsx, src/Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 2)
|
||||
42 modules
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: App.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/App.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (2 of 2)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✔ App.cy.jsx XX:XX 1 1 - - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✔ All specs passed! XX:XX 2 2 - - -
|
||||
|
||||
|
||||
`
|
||||
@@ -7,15 +7,15 @@ exports['@cypress/vite-dev-server react executes all of the tests for vite2.8.6-
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 4 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx) │
|
||||
│ Specs: 5 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: **/*.cy.{js,jsx,ts,tsx} │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 4)
|
||||
Running: App.cy.jsx (1 of 5)
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
@@ -46,7 +46,7 @@ exports['@cypress/vite-dev-server react executes all of the tests for vite2.8.6-
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: AppCompilationError.cy.jsx (2 of 4)
|
||||
Running: AppCompilationError.cy.jsx (2 of 5)
|
||||
|
||||
|
||||
1) An uncaught error was detected outside of a test
|
||||
@@ -98,7 +98,7 @@ We dynamically generated a new test to display this failure.
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReact.cy.jsx (3 of 4)
|
||||
Running: MissingReact.cy.jsx (3 of 5)
|
||||
|
||||
|
||||
1) is missing React
|
||||
@@ -146,7 +146,7 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 4)
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 5)
|
||||
|
||||
|
||||
1) is missing React in this file
|
||||
@@ -188,6 +188,39 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/MissingReactInSpec.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (5 of 5)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
@@ -202,8 +235,10 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
│ ✖ MissingReact.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✖ MissingReactInSpec.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 3 of 4 failed (75%) XX:XX 4 1 3 - -
|
||||
✖ 3 of 5 failed (60%) XX:XX 5 2 3 - -
|
||||
|
||||
|
||||
`
|
||||
@@ -217,15 +252,15 @@ exports['@cypress/vite-dev-server react executes all of the tests for vite2.9.1-
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 4 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx) │
|
||||
│ Specs: 5 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: **/*.cy.{js,jsx,ts,tsx} │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 4)
|
||||
Running: App.cy.jsx (1 of 5)
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
@@ -256,7 +291,7 @@ exports['@cypress/vite-dev-server react executes all of the tests for vite2.9.1-
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: AppCompilationError.cy.jsx (2 of 4)
|
||||
Running: AppCompilationError.cy.jsx (2 of 5)
|
||||
|
||||
|
||||
1) An uncaught error was detected outside of a test
|
||||
@@ -308,7 +343,7 @@ We dynamically generated a new test to display this failure.
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReact.cy.jsx (3 of 4)
|
||||
Running: MissingReact.cy.jsx (3 of 5)
|
||||
|
||||
|
||||
1) is missing React
|
||||
@@ -356,7 +391,7 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 4)
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 5)
|
||||
|
||||
|
||||
1) is missing React in this file
|
||||
@@ -398,6 +433,39 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/MissingReactInSpec.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (5 of 5)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
@@ -412,8 +480,10 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
│ ✖ MissingReact.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✖ MissingReactInSpec.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 3 of 4 failed (75%) XX:XX 4 1 3 - -
|
||||
✖ 3 of 5 failed (60%) XX:XX 5 2 3 - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
@@ -10,16 +10,15 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 4 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx) │
|
||||
│ Specs: 5 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: **/*.cy.{js,jsx,ts,tsx} │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 4)
|
||||
ℹ 「wdm」: Failed to compile.
|
||||
Running: App.cy.jsx (1 of 5)
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
@@ -50,7 +49,7 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: AppCompilationError.cy.jsx (2 of 4)
|
||||
Running: AppCompilationError.cy.jsx (2 of 5)
|
||||
|
||||
|
||||
1) An uncaught error was detected outside of a test
|
||||
@@ -62,13 +61,13 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
Error: The following error originated from your test code, not from Cypress.
|
||||
|
||||
> Module build failed (from [..]):
|
||||
SyntaxError: /foo/bar/.projects/webpack4_wds3-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (9:0)
|
||||
SyntaxError: /foo/bar/.projects/webpack4_wds3-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0)
|
||||
|
||||
7 | cy.get('h1').contains('Hello World')
|
||||
8 | }
|
||||
> 9 | })
|
||||
| ^
|
||||
10 |
|
||||
6 | cy.get('h1').contains('Hello World')
|
||||
7 | }
|
||||
> 8 | })
|
||||
| ^
|
||||
9 |
|
||||
[stack trace lines]
|
||||
|
||||
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
|
||||
@@ -110,7 +109,7 @@ We dynamically generated a new test to display this failure.
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReact.cy.jsx (3 of 4)
|
||||
Running: MissingReact.cy.jsx (3 of 5)
|
||||
|
||||
|
||||
1) is missing React
|
||||
@@ -158,7 +157,7 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 4)
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 5)
|
||||
|
||||
|
||||
1) is missing React in this file
|
||||
@@ -200,6 +199,39 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/MissingReactInSpec.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (5 of 5)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
@@ -214,8 +246,10 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
│ ✖ MissingReact.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✖ MissingReactInSpec.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 3 of 4 failed (75%) XX:XX 4 1 3 - -
|
||||
✖ 3 of 5 failed (60%) XX:XX 5 2 3 - -
|
||||
|
||||
|
||||
`
|
||||
@@ -229,26 +263,26 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 4 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx) │
|
||||
│ Specs: 5 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: **/*.cy.{js,jsx,ts,tsx} │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 4)
|
||||
48 modules
|
||||
Running: App.cy.jsx (1 of 5)
|
||||
43 modules
|
||||
|
||||
ERROR in ./src/AppCompilationError.cy.jsx
|
||||
Module build failed (from [..]):
|
||||
SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (9:0)
|
||||
SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0)
|
||||
|
||||
7 | cy.get('h1').contains('Hello World')
|
||||
8 | }
|
||||
> 9 | })
|
||||
| ^
|
||||
10 |
|
||||
6 | cy.get('h1').contains('Hello World')
|
||||
7 | }
|
||||
> 8 | })
|
||||
| ^
|
||||
9 |
|
||||
[stack trace lines]
|
||||
|
||||
|
||||
@@ -280,7 +314,7 @@ SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.j
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: AppCompilationError.cy.jsx (2 of 4)
|
||||
Running: AppCompilationError.cy.jsx (2 of 5)
|
||||
|
||||
|
||||
1) An uncaught error was detected outside of a test
|
||||
@@ -292,13 +326,13 @@ SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.j
|
||||
Error: The following error originated from your test code, not from Cypress.
|
||||
|
||||
> Module build failed (from [..]):
|
||||
SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (9:0)
|
||||
SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0)
|
||||
|
||||
7 | cy.get('h1').contains('Hello World')
|
||||
8 | }
|
||||
> 9 | })
|
||||
| ^
|
||||
10 |
|
||||
6 | cy.get('h1').contains('Hello World')
|
||||
7 | }
|
||||
> 8 | })
|
||||
| ^
|
||||
9 |
|
||||
[stack trace lines]
|
||||
|
||||
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
|
||||
@@ -340,7 +374,7 @@ We dynamically generated a new test to display this failure.
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReact.cy.jsx (3 of 4)
|
||||
Running: MissingReact.cy.jsx (3 of 5)
|
||||
|
||||
|
||||
1) is missing React
|
||||
@@ -388,7 +422,7 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 4)
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 5)
|
||||
|
||||
|
||||
1) is missing React in this file
|
||||
@@ -430,6 +464,39 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/MissingReactInSpec.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (5 of 5)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
@@ -444,8 +511,10 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
│ ✖ MissingReact.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✖ MissingReactInSpec.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 3 of 4 failed (75%) XX:XX 4 1 3 - -
|
||||
✖ 3 of 5 failed (60%) XX:XX 5 2 3 - -
|
||||
|
||||
|
||||
`
|
||||
@@ -462,16 +531,15 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 4 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx) │
|
||||
│ Specs: 5 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: **/*.cy.{js,jsx,ts,tsx} │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 4)
|
||||
ℹ 「wdm」: Failed to compile.
|
||||
Running: App.cy.jsx (1 of 5)
|
||||
|
||||
|
||||
✓ renders hello world
|
||||
@@ -502,7 +570,7 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: AppCompilationError.cy.jsx (2 of 4)
|
||||
Running: AppCompilationError.cy.jsx (2 of 5)
|
||||
|
||||
|
||||
1) An uncaught error was detected outside of a test
|
||||
@@ -514,13 +582,13 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
Error: The following error originated from your test code, not from Cypress.
|
||||
|
||||
> Module build failed (from [..]):
|
||||
SyntaxError: /foo/bar/.projects/webpack5_wds3-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (9:0)
|
||||
SyntaxError: /foo/bar/.projects/webpack5_wds3-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0)
|
||||
|
||||
7 | cy.get('h1').contains('Hello World')
|
||||
8 | }
|
||||
> 9 | })
|
||||
| ^
|
||||
10 |
|
||||
6 | cy.get('h1').contains('Hello World')
|
||||
7 | }
|
||||
> 8 | })
|
||||
| ^
|
||||
9 |
|
||||
[stack trace lines]
|
||||
|
||||
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
|
||||
@@ -562,7 +630,7 @@ We dynamically generated a new test to display this failure.
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReact.cy.jsx (3 of 4)
|
||||
Running: MissingReact.cy.jsx (3 of 5)
|
||||
|
||||
|
||||
1) is missing React
|
||||
@@ -610,7 +678,7 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 4)
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 5)
|
||||
|
||||
|
||||
1) is missing React in this file
|
||||
@@ -652,6 +720,39 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/MissingReactInSpec.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (5 of 5)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
@@ -666,8 +767,10 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
│ ✖ MissingReact.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✖ MissingReactInSpec.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 3 of 4 failed (75%) XX:XX 4 1 3 - -
|
||||
✖ 3 of 5 failed (60%) XX:XX 5 2 3 - -
|
||||
|
||||
|
||||
`
|
||||
@@ -681,27 +784,27 @@ exports['@cypress/webpack-dev-server react executes all of the tests for webpack
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 4 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx) │
|
||||
│ Specs: 5 found (App.cy.jsx, AppCompilationError.cy.jsx, MissingReact.cy.jsx, MissingReact │
|
||||
│ InSpec.cy.jsx, Unmount.cy.jsx) │
|
||||
│ Searched: **/*.cy.{js,jsx,ts,tsx} │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: App.cy.jsx (1 of 4)
|
||||
10 assets
|
||||
58 modules
|
||||
Running: App.cy.jsx (1 of 5)
|
||||
12 assets
|
||||
53 modules
|
||||
|
||||
ERROR in ./src/AppCompilationError.cy.jsx
|
||||
Module build failed (from [..]):
|
||||
SyntaxError: /foo/bar/.projects/webpack5_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (9:0)
|
||||
SyntaxError: /foo/bar/.projects/webpack5_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0)
|
||||
|
||||
7 | cy.get('h1').contains('Hello World')
|
||||
8 | }
|
||||
> 9 | })
|
||||
| ^
|
||||
10 |
|
||||
6 | cy.get('h1').contains('Hello World')
|
||||
7 | }
|
||||
> 8 | })
|
||||
| ^
|
||||
9 |
|
||||
[stack trace lines]
|
||||
|
||||
webpack x.x.x compiled with x errors in xxx ms
|
||||
@@ -735,7 +838,7 @@ webpack x.x.x compiled with x errors in xxx ms
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: AppCompilationError.cy.jsx (2 of 4)
|
||||
Running: AppCompilationError.cy.jsx (2 of 5)
|
||||
|
||||
|
||||
1) An uncaught error was detected outside of a test
|
||||
@@ -747,13 +850,13 @@ webpack x.x.x compiled with x errors in xxx ms
|
||||
Error: The following error originated from your test code, not from Cypress.
|
||||
|
||||
> Module build failed (from [..]):
|
||||
SyntaxError: /foo/bar/.projects/webpack5_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (9:0)
|
||||
SyntaxError: /foo/bar/.projects/webpack5_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0)
|
||||
|
||||
7 | cy.get('h1').contains('Hello World')
|
||||
8 | }
|
||||
> 9 | })
|
||||
| ^
|
||||
10 |
|
||||
6 | cy.get('h1').contains('Hello World')
|
||||
7 | }
|
||||
> 8 | })
|
||||
| ^
|
||||
9 |
|
||||
[stack trace lines]
|
||||
|
||||
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
|
||||
@@ -795,7 +898,7 @@ We dynamically generated a new test to display this failure.
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReact.cy.jsx (3 of 4)
|
||||
Running: MissingReact.cy.jsx (3 of 5)
|
||||
|
||||
|
||||
1) is missing React
|
||||
@@ -843,7 +946,7 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 4)
|
||||
Running: MissingReactInSpec.cy.jsx (4 of 5)
|
||||
|
||||
|
||||
1) is missing React in this file
|
||||
@@ -885,6 +988,39 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/MissingReactInSpec.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: Unmount.cy.jsx (5 of 5)
|
||||
|
||||
|
||||
Comp with componentWillUnmount
|
||||
✓ calls the prop
|
||||
|
||||
|
||||
1 passing
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 1 │
|
||||
│ Passing: 1 │
|
||||
│ Failing: 0 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 0 │
|
||||
│ Video: true │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: Unmount.cy.jsx │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Video)
|
||||
|
||||
- Started processing: Compressing to 32 CRF
|
||||
- Finished processing: /XXX/XXX/XXX/cypress/videos/Unmount.cy.jsx.mp4 (X second)
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
@@ -899,8 +1035,10 @@ When Cypress detects uncaught errors originating from your test code it will aut
|
||||
│ ✖ MissingReact.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✖ MissingReactInSpec.cy.jsx XX:XX 1 - 1 - - │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ ✔ Unmount.cy.jsx XX:XX 1 1 - - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 3 of 4 failed (75%) XX:XX 4 1 3 - -
|
||||
✖ 3 of 5 failed (60%) XX:XX 5 2 3 - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
@@ -278,7 +278,6 @@ export async function scaffoldCommonNodeModules () {
|
||||
// Used for import { defineConfig } from 'cypress'
|
||||
'cypress',
|
||||
'@cypress/code-coverage',
|
||||
'@cypress/react',
|
||||
'@cypress/webpack-dev-server',
|
||||
'@packages/socket',
|
||||
'@packages/ts',
|
||||
@@ -294,7 +293,6 @@ export async function scaffoldCommonNodeModules () {
|
||||
'lazy-ass',
|
||||
'lodash',
|
||||
'proxyquire',
|
||||
'react',
|
||||
'semver',
|
||||
'systeminformation',
|
||||
'tslib',
|
||||
|
||||
@@ -75,7 +75,7 @@ export async function scaffoldProject (project: ProjectFixtureDir): Promise<stri
|
||||
throw new Error(`Invalid project fixture directory: ${fixtureDir}, expected one of ${projectFixtureDirs}`)
|
||||
}
|
||||
|
||||
await fs.copy(_path.join(projectFixtures, fixtureDir), to)
|
||||
await fs.copy(_path.join(projectFixtures, fixtureDir), to, { overwrite: false })
|
||||
}
|
||||
} catch (e) {
|
||||
if (e.code !== 'MODULE_NOT_FOUND') {
|
||||
|
||||
@@ -142,6 +142,13 @@ 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, '')
|
||||
|
||||
// avoid race condition when webpack prints this at a non-deterministic timing
|
||||
const wdsFailedMsg = 'ℹ 「wdm」: Failed to compile.'
|
||||
|
||||
if (str.includes(wdsFailedMsg)) {
|
||||
str = str.split('\n').filter((line) => !line.includes(wdsFailedMsg)).join('\n')
|
||||
}
|
||||
|
||||
if (options.sanitizeScreenshotDimensions) {
|
||||
// screenshot dimensions
|
||||
str = str.replace(/(\(\d+x\d+\))/g, replaceScreenshotDims)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { mount, unmount } from 'cypress/react'
|
||||
|
||||
Cypress.Commands.add('mount', mount)
|
||||
Cypress.Commands.add('unmount', unmount)
|
||||
@@ -1 +0,0 @@
|
||||
//
|
||||
@@ -1,9 +1,8 @@
|
||||
import React from 'react'
|
||||
import { mount } from 'cypress/react'
|
||||
import { App } from './App'
|
||||
|
||||
it('renders hello world', () => {
|
||||
mount(<App />)
|
||||
cy.mount(<App />)
|
||||
// Click on the header here to ensure that the AUT is interactable. This ensures that the dev server overlay is not displaying
|
||||
cy.get('h1').contains('Hello World').click()
|
||||
})
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import React from 'react'
|
||||
import { mount } from 'cypress/react'
|
||||
import { App } from './App'
|
||||
|
||||
it('renders hello world', () => {
|
||||
mount(<App />)
|
||||
cy.mount(<App />)
|
||||
cy.get('h1').contains('Hello World')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from 'react'
|
||||
import { mount } from 'cypress/react'
|
||||
import { MissingReact } from './MissingReact'
|
||||
|
||||
it('is missing React', () => {
|
||||
mount(<MissingReact />)
|
||||
cy.mount(<MissingReact />)
|
||||
cy.get('h1').contains('Missing React')
|
||||
})
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/// <reference types="cypress" />
|
||||
import { mount } from 'cypress/react'
|
||||
import { App } from './App'
|
||||
|
||||
it('is missing React in this file', () => {
|
||||
mount(<App />)
|
||||
cy.mount(<App />)
|
||||
cy.get('h1').contains('Hello World')
|
||||
})
|
||||
|
||||
28
system-tests/project-fixtures/react/src/Unmount.cy.jsx
Normal file
28
system-tests/project-fixtures/react/src/Unmount.cy.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React, { Component } from 'react'
|
||||
|
||||
class Comp extends Component {
|
||||
componentWillUnmount () {
|
||||
// simply calls the prop
|
||||
this.props.onUnmount()
|
||||
}
|
||||
|
||||
render () {
|
||||
return <div>My component</div>
|
||||
}
|
||||
}
|
||||
|
||||
describe('Comp with componentWillUnmount', () => {
|
||||
it('calls the prop', () => {
|
||||
cy.mount(<Comp onUnmount={cy.stub().as('onUnmount')} />)
|
||||
cy.contains('My component')
|
||||
|
||||
// after we have confirmed the component exists let's remove it
|
||||
// unmount() command is automatically enqueued
|
||||
cy.unmount()
|
||||
|
||||
// the component is gone from the DOM
|
||||
cy.contains('My component').should('not.exist')
|
||||
// the component has called the prop on unmount
|
||||
cy.get('@onUnmount').should('have.been.calledOnce')
|
||||
})
|
||||
})
|
||||
@@ -1,9 +1,14 @@
|
||||
const path = require('path')
|
||||
/**
|
||||
* @type {import('webpack').Configuration}
|
||||
*/
|
||||
module.exports = {
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts', '.jsx', '.tsx'],
|
||||
alias: {
|
||||
'react': path.resolve(__dirname, './node_modules/react'),
|
||||
'react-dom': path.resolve(__dirname, './node_modules/react-dom'),
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
const { defineConfig } = require('cypress')
|
||||
|
||||
module.exports = defineConfig({
|
||||
e2e: {
|
||||
supportFile: false,
|
||||
specPattern: 'cypress/e2e/**/*.{js,jsx,mjs,ts,tsx,coffee}',
|
||||
setupNodeEvents (on, config) {},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
foo = require("../../lib/foo")
|
||||
bar = require("../../lib/bar")
|
||||
dom = require("../../lib/dom")
|
||||
|
||||
describe "imports work", ->
|
||||
it "foo coffee", ->
|
||||
expect(foo()).to.eq("foo")
|
||||
|
||||
it "bar babel", ->
|
||||
expect(bar()).to.eq("baz")
|
||||
|
||||
it "dom jsx", ->
|
||||
expect(dom).to.eq("dom")
|
||||
@@ -0,0 +1,30 @@
|
||||
// @ts-ignore
|
||||
import foo from '../../lib/foo'
|
||||
import bar from '../../lib/bar'
|
||||
import dom from '../../lib/dom'
|
||||
|
||||
describe('imports work', () => {
|
||||
it('foo coffee', () => {
|
||||
// @ts-ignore
|
||||
expect(foo()).to.eq('foo')
|
||||
})
|
||||
|
||||
it('bar babel', () => {
|
||||
// @ts-ignore
|
||||
expect(bar()).to.eq('baz')
|
||||
})
|
||||
|
||||
it('dom jsx', () => {
|
||||
// @ts-ignore
|
||||
expect(dom).to.eq('dom')
|
||||
})
|
||||
|
||||
// Check if typescript transpiles iterator correctly in ES5.
|
||||
// https://github.com/cypress-io/cypress/issues/7098
|
||||
it('issue 7098', () => {
|
||||
let x = [...Array(100).keys()].map((x) => `${x}`)
|
||||
|
||||
// @ts-ignore
|
||||
expect(x[0]).to.eq('0')
|
||||
})
|
||||
})
|
||||
3
system-tests/projects/coffee-react-interop/lib/bar.js
Normal file
3
system-tests/projects/coffee-react-interop/lib/bar.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import baz from './baz'
|
||||
|
||||
export default baz
|
||||
3
system-tests/projects/coffee-react-interop/lib/baz.js
Normal file
3
system-tests/projects/coffee-react-interop/lib/baz.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export default () => {
|
||||
return 'baz'
|
||||
}
|
||||
5
system-tests/projects/coffee-react-interop/lib/dom.jsx
Normal file
5
system-tests/projects/coffee-react-interop/lib/dom.jsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
<div className="dom" />
|
||||
|
||||
export default "dom"
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = -> "foo"
|
||||
6
system-tests/projects/coffee-react-interop/package.json
Normal file
6
system-tests/projects/coffee-react-interop/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
}
|
||||
}
|
||||
7
system-tests/projects/coffee-react-interop/tsconfig.json
Normal file
7
system-tests/projects/coffee-react-interop/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
}
|
||||
}
|
||||
45
system-tests/projects/coffee-react-interop/yarn.lock
Normal file
45
system-tests/projects/coffee-react-interop/yarn.lock
Normal file
@@ -0,0 +1,45 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||
|
||||
react-dom@17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
6
system-tests/projects/cypress-in-cypress/package.json
Normal file
6
system-tests/projects/cypress-in-cypress/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { mount } from '@cypress/react'
|
||||
import { mount } from 'cypress/react'
|
||||
|
||||
describe('NewComponent', () => {
|
||||
it('renders the new component', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { mount } from '@cypress/react'
|
||||
import { mount } from 'cypress/react'
|
||||
|
||||
describe('TestComponent', () => {
|
||||
it('renders the test component', () => {
|
||||
|
||||
45
system-tests/projects/cypress-in-cypress/yarn.lock
Normal file
45
system-tests/projects/cypress-in-cypress/yarn.lock
Normal file
@@ -0,0 +1,45 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||
|
||||
react-dom@17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
@@ -0,0 +1,4 @@
|
||||
import { mount, unmount } from 'cypress/react'
|
||||
|
||||
Cypress.Commands.add('mount', mount)
|
||||
Cypress.Commands.add('unmount', unmount)
|
||||
12
system-tests/projects/react17/package.json
Normal file
12
system-tests/projects/react17/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"react": "17.0.2",
|
||||
"react-dom": " 17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-react": "^1.3.2",
|
||||
"vite": "2.9.14",
|
||||
"webpack": "^4"
|
||||
},
|
||||
"projectFixtureDirectory": "react"
|
||||
}
|
||||
2986
system-tests/projects/react17/yarn.lock
Normal file
2986
system-tests/projects/react17/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
import { mount, unmount } from 'cypress/react18'
|
||||
|
||||
Cypress.Commands.add('mount', mount)
|
||||
Cypress.Commands.add('unmount', unmount)
|
||||
12
system-tests/projects/react18/package.json
Normal file
12
system-tests/projects/react18/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-react": "^1.3.2",
|
||||
"vite": "^2.8.0",
|
||||
"webpack": "^4"
|
||||
},
|
||||
"projectFixtureDirectory": "react"
|
||||
}
|
||||
7
system-tests/projects/react18/vite.config.ts
Normal file
7
system-tests/projects/react18/vite.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
})
|
||||
2983
system-tests/projects/react18/yarn.lock
Normal file
2983
system-tests/projects/react18/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"react": "^17.0.0",
|
||||
"react-dom": "^17.0.0",
|
||||
"vite": "2.9.1"
|
||||
},
|
||||
"projectFixtureDirectory": "react"
|
||||
|
||||
@@ -193,6 +193,15 @@ postcss@^8.4.12:
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
react-dom@^17.0.0:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@^17.0.0:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
@@ -217,6 +226,14 @@ rollup@^2.59.0:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"devDependencies": {
|
||||
"@cypress/vite-dev-server": "file:../../../npm/vite-dev-server",
|
||||
"react": "^17.0.0",
|
||||
"react-dom": "^17.0.0",
|
||||
"vite": "2.9.1"
|
||||
},
|
||||
"projectFixtureDirectory": "react"
|
||||
|
||||
9
system-tests/projects/vite2.9.1-react/src/App.cy.jsx
Normal file
9
system-tests/projects/vite2.9.1-react/src/App.cy.jsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import React from 'react'
|
||||
import { App } from './App'
|
||||
import { mount } from 'cypress/react'
|
||||
|
||||
it('renders hello world', () => {
|
||||
mount(<App />)
|
||||
// Click on the header here to ensure that the AUT is interactable. This ensures that the dev server overlay is not displaying
|
||||
cy.get('h1').contains('Hello World').click()
|
||||
})
|
||||
@@ -6,7 +6,8 @@
|
||||
version "0.0.0-development"
|
||||
dependencies:
|
||||
debug "4.3.3"
|
||||
find-up "5.0.0"
|
||||
find-up "6.3.0"
|
||||
local-pkg "0.4.1"
|
||||
pathe "0.2.0"
|
||||
|
||||
debug@4.3.3:
|
||||
@@ -142,13 +143,13 @@ esbuild@^0.14.27:
|
||||
esbuild-windows-64 "0.14.31"
|
||||
esbuild-windows-arm64 "0.14.31"
|
||||
|
||||
find-up@5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
|
||||
integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
|
||||
find-up@6.3.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790"
|
||||
integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==
|
||||
dependencies:
|
||||
locate-path "^6.0.0"
|
||||
path-exists "^4.0.0"
|
||||
locate-path "^7.1.0"
|
||||
path-exists "^5.0.0"
|
||||
|
||||
fsevents@~2.3.2:
|
||||
version "2.3.2"
|
||||
@@ -179,12 +180,17 @@ is-core-module@^2.8.1:
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity "sha1-GSA/tZmR35jjoocFDUZHzerzJJk= sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||
|
||||
locate-path@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
|
||||
integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
|
||||
local-pkg@0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.1.tgz#e7b0d7aa0b9c498a1110a5ac5b00ba66ef38cfff"
|
||||
integrity sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw==
|
||||
|
||||
locate-path@^7.1.0:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.1.1.tgz#8e1e5a75c7343770cef02ff93c4bf1f0aa666374"
|
||||
integrity sha512-vJXaRMJgRVD3+cUZs3Mncj2mxpt5mP0EmNOsxRSZRMlbqjvxzDEOIUWXGmavo0ZC9+tNZCBLQ66reA11nbpHZg==
|
||||
dependencies:
|
||||
p-locate "^5.0.0"
|
||||
p-locate "^6.0.0"
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
@@ -208,24 +214,24 @@ object-assign@^4.1.1:
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
|
||||
|
||||
p-limit@^3.0.2:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
|
||||
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
|
||||
dependencies:
|
||||
yocto-queue "^0.1.0"
|
||||
|
||||
p-locate@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
|
||||
integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
|
||||
dependencies:
|
||||
p-limit "^3.0.2"
|
||||
|
||||
path-exists@^4.0.0:
|
||||
p-limit@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
|
||||
integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
|
||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644"
|
||||
integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==
|
||||
dependencies:
|
||||
yocto-queue "^1.0.0"
|
||||
|
||||
p-locate@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f"
|
||||
integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==
|
||||
dependencies:
|
||||
p-limit "^4.0.0"
|
||||
|
||||
path-exists@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7"
|
||||
integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==
|
||||
|
||||
path-parse@^1.0.7:
|
||||
version "1.0.7"
|
||||
@@ -251,6 +257,15 @@ postcss@^8.4.12:
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
react-dom@^17.0.0:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@^17.0.0:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
@@ -275,6 +290,14 @@ rollup@^2.59.0:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
@@ -297,7 +320,7 @@ vite@2.9.1:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
yocto-queue@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
||||
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
||||
yocto-queue@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251"
|
||||
integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
"@babel/preset-env": "^7",
|
||||
"@babel/preset-react": "^7",
|
||||
"babel-loader": "^8.2.4",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"webpack": "^4",
|
||||
"webpack-dev-server": "^3"
|
||||
},
|
||||
|
||||
@@ -3014,7 +3014,7 @@ isobject@^3.0.0, isobject@^3.0.1:
|
||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
||||
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
|
||||
|
||||
js-tokens@^4.0.0:
|
||||
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
@@ -3133,6 +3133,13 @@ loglevel@^1.6.8:
|
||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114"
|
||||
integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
lru-cache@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
|
||||
@@ -3862,6 +3869,23 @@ raw-body@2.4.3:
|
||||
iconv-lite "0.4.24"
|
||||
unpipe "1.0.0"
|
||||
|
||||
react-dom@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6:
|
||||
version "2.3.7"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||
@@ -4074,6 +4098,14 @@ safe-regex@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
schema-utils@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
"@babel/preset-env": "^7",
|
||||
"@babel/preset-react": "^7",
|
||||
"babel-loader": "^8.2.4",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"webpack": "^4",
|
||||
"webpack-dev-server": "^4"
|
||||
},
|
||||
|
||||
@@ -3143,7 +3143,7 @@ isobject@^3.0.0, isobject@^3.0.1:
|
||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
||||
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
|
||||
|
||||
js-tokens@^4.0.0:
|
||||
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
@@ -3257,6 +3257,13 @@ lodash@^4.17.14:
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
lru-cache@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
|
||||
@@ -3989,6 +3996,23 @@ raw-body@2.4.3:
|
||||
iconv-lite "0.4.24"
|
||||
unpipe "1.0.0"
|
||||
|
||||
react-dom@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6:
|
||||
version "2.3.7"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||
@@ -4203,6 +4227,14 @@ safe-regex@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
schema-utils@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
"@babel/preset-env": "^7",
|
||||
"@babel/preset-react": "^7",
|
||||
"babel-loader": "^8.2.4",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"webpack": "^5",
|
||||
"webpack-dev-server": "^3"
|
||||
},
|
||||
|
||||
@@ -2577,7 +2577,7 @@ jest-worker@^27.4.5:
|
||||
merge-stream "^2.0.0"
|
||||
supports-color "^8.0.0"
|
||||
|
||||
js-tokens@^4.0.0:
|
||||
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
@@ -2680,6 +2680,13 @@ loglevel@^1.6.8:
|
||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114"
|
||||
integrity sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
make-dir@^3.0.2, make-dir@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
||||
@@ -2894,10 +2901,10 @@ npm-run-path@^2.0.0:
|
||||
dependencies:
|
||||
path-key "^2.0.0"
|
||||
|
||||
object-assign@^4.0.1:
|
||||
object-assign@^4.0.1, object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
|
||||
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||
|
||||
object-copy@^0.1.0:
|
||||
version "0.1.0"
|
||||
@@ -3204,6 +3211,23 @@ raw-body@2.4.3:
|
||||
iconv-lite "0.4.24"
|
||||
unpipe "1.0.0"
|
||||
|
||||
react-dom@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
readable-stream@^2.0.1, readable-stream@^2.0.2:
|
||||
version "2.3.7"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||
@@ -3394,6 +3418,14 @@ safe-regex@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
schema-utils@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
"@babel/preset-react": "^7",
|
||||
"@cypress/webpack-dev-server": "file:../../../npm/webpack-dev-server",
|
||||
"babel-loader": "^8.2.4",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"webpack": "^5",
|
||||
"webpack-dev-server": "^4"
|
||||
},
|
||||
|
||||
9
system-tests/projects/webpack5_wds4-react/src/App.cy.jsx
Normal file
9
system-tests/projects/webpack5_wds4-react/src/App.cy.jsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import React from 'react'
|
||||
import { App } from './App'
|
||||
import { mount } from 'cypress/react'
|
||||
|
||||
it('renders hello world', () => {
|
||||
mount(<App />)
|
||||
// Click on the header here to ensure that the AUT is interactable. This ensures that the dev server overlay is not displaying
|
||||
cy.get('h1').contains('Hello World').click()
|
||||
})
|
||||
@@ -950,10 +950,11 @@
|
||||
"@cypress/webpack-dev-server@file:../../../npm/webpack-dev-server":
|
||||
version "0.0.0-development"
|
||||
dependencies:
|
||||
find-up "5.0.0"
|
||||
find-up "6.3.0"
|
||||
fs-extra "9.1.0"
|
||||
html-webpack-plugin-4 "npm:html-webpack-plugin@^4"
|
||||
html-webpack-plugin-5 "npm:html-webpack-plugin@^5"
|
||||
local-pkg "0.4.1"
|
||||
speed-measure-webpack-plugin "1.4.2"
|
||||
tslib "^2.3.1"
|
||||
webpack-dev-server "^4.7.4"
|
||||
@@ -2382,13 +2383,13 @@ find-cache-dir@^3.3.1:
|
||||
make-dir "^3.0.2"
|
||||
pkg-dir "^4.1.0"
|
||||
|
||||
find-up@5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
|
||||
integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
|
||||
find-up@6.3.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790"
|
||||
integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==
|
||||
dependencies:
|
||||
locate-path "^6.0.0"
|
||||
path-exists "^4.0.0"
|
||||
locate-path "^7.1.0"
|
||||
path-exists "^5.0.0"
|
||||
|
||||
find-up@^4.0.0:
|
||||
version "4.1.0"
|
||||
@@ -2987,7 +2988,7 @@ jest-worker@^27.4.5:
|
||||
merge-stream "^2.0.0"
|
||||
supports-color "^8.0.0"
|
||||
|
||||
js-tokens@^4.0.0:
|
||||
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
@@ -3066,6 +3067,11 @@ loader-utils@^2.0.0:
|
||||
emojis-list "^3.0.0"
|
||||
json5 "^2.1.2"
|
||||
|
||||
local-pkg@0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.1.tgz#e7b0d7aa0b9c498a1110a5ac5b00ba66ef38cfff"
|
||||
integrity sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw==
|
||||
|
||||
locate-path@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
|
||||
@@ -3073,12 +3079,12 @@ locate-path@^5.0.0:
|
||||
dependencies:
|
||||
p-locate "^4.1.0"
|
||||
|
||||
locate-path@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
|
||||
integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
|
||||
locate-path@^7.1.0:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.1.1.tgz#8e1e5a75c7343770cef02ff93c4bf1f0aa666374"
|
||||
integrity sha512-vJXaRMJgRVD3+cUZs3Mncj2mxpt5mP0EmNOsxRSZRMlbqjvxzDEOIUWXGmavo0ZC9+tNZCBLQ66reA11nbpHZg==
|
||||
dependencies:
|
||||
p-locate "^5.0.0"
|
||||
p-locate "^6.0.0"
|
||||
|
||||
lodash.debounce@^4.0.8:
|
||||
version "4.0.8"
|
||||
@@ -3090,6 +3096,13 @@ lodash@^4.17.14, lodash@^4.17.20, lodash@^4.17.21:
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
lower-case@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28"
|
||||
@@ -3273,6 +3286,11 @@ nth-check@^2.0.1:
|
||||
dependencies:
|
||||
boolbase "^1.0.0"
|
||||
|
||||
object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||
|
||||
object-inspect@^1.12.0, object-inspect@^1.9.0:
|
||||
version "1.12.2"
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
||||
@@ -3365,12 +3383,12 @@ p-limit@^2.2.0:
|
||||
dependencies:
|
||||
p-try "^2.0.0"
|
||||
|
||||
p-limit@^3.0.2:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
|
||||
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
|
||||
p-limit@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644"
|
||||
integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==
|
||||
dependencies:
|
||||
yocto-queue "^0.1.0"
|
||||
yocto-queue "^1.0.0"
|
||||
|
||||
p-locate@^4.1.0:
|
||||
version "4.1.0"
|
||||
@@ -3379,12 +3397,12 @@ p-locate@^4.1.0:
|
||||
dependencies:
|
||||
p-limit "^2.2.0"
|
||||
|
||||
p-locate@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
|
||||
integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
|
||||
p-locate@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f"
|
||||
integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==
|
||||
dependencies:
|
||||
p-limit "^3.0.2"
|
||||
p-limit "^4.0.0"
|
||||
|
||||
p-map@^4.0.0:
|
||||
version "4.0.0"
|
||||
@@ -3432,6 +3450,11 @@ path-exists@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
|
||||
integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
|
||||
|
||||
path-exists@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7"
|
||||
integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
@@ -3566,6 +3589,23 @@ raw-body@2.5.1:
|
||||
iconv-lite "0.4.24"
|
||||
unpipe "1.0.0"
|
||||
|
||||
react-dom@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
|
||||
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
scheduler "^0.20.2"
|
||||
|
||||
react@^17.0.2:
|
||||
version "17.0.2"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
|
||||
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
readable-stream@^2.0.1:
|
||||
version "2.3.7"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||
@@ -3745,6 +3785,14 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0,
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
scheduler@^0.20.2:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
|
||||
integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
schema-utils@^2.6.5:
|
||||
version "2.7.1"
|
||||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7"
|
||||
@@ -4437,7 +4485,7 @@ ws@^8.4.2:
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f"
|
||||
integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==
|
||||
|
||||
yocto-queue@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
||||
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
||||
yocto-queue@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251"
|
||||
integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==
|
||||
|
||||
@@ -68,3 +68,41 @@ describe('component testing projects', function () {
|
||||
expectedExitCode: 0,
|
||||
})
|
||||
})
|
||||
|
||||
const REACT_MAJOR_VERSIONS = ['17', '18'] as const
|
||||
|
||||
describe(`React major versions with Vite`, function () {
|
||||
systemTests.setup()
|
||||
|
||||
for (const majorVersion of REACT_MAJOR_VERSIONS) {
|
||||
it(`executes all of the tests for React v${majorVersion} with Vite`, function () {
|
||||
return systemTests.exec(this, {
|
||||
project: `react${majorVersion}`,
|
||||
configFile: 'cypress-vite.config.ts',
|
||||
spec: 'src/App.cy.jsx,src/Unmount.cy.jsx',
|
||||
testingType: 'component',
|
||||
browser: 'chrome',
|
||||
snapshot: true,
|
||||
expectedExitCode: 0,
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
describe(`React major versions with Webpack`, function () {
|
||||
systemTests.setup()
|
||||
|
||||
for (const majorVersion of REACT_MAJOR_VERSIONS) {
|
||||
it(`executes all of the tests for React v${majorVersion} with Webpack`, function () {
|
||||
return systemTests.exec(this, {
|
||||
project: `react${majorVersion}`,
|
||||
configFile: 'cypress-webpack.config.ts',
|
||||
spec: 'src/App.cy.jsx,src/Unmount.cy.jsx',
|
||||
testingType: 'component',
|
||||
browser: 'chrome',
|
||||
snapshot: true,
|
||||
expectedExitCode: 0,
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,6 +5,7 @@ describe('e2e es modules', () => {
|
||||
|
||||
it('passes', function () {
|
||||
return systemTests.exec(this, {
|
||||
project: 'coffee-react-interop',
|
||||
spec: 'es_modules_in_coffee_spec.coffee',
|
||||
snapshot: true,
|
||||
noTypeScript: true,
|
||||
|
||||
@@ -5,6 +5,7 @@ describe('e2e typescript in spec and support file', function () {
|
||||
|
||||
it('spec passes', function () {
|
||||
return systemTests.exec(this, {
|
||||
project: 'coffee-react-interop',
|
||||
spec: 'typescript_passing.cy.ts',
|
||||
snapshot: true,
|
||||
})
|
||||
|
||||
43
yarn.lock
43
yarn.lock
@@ -7869,7 +7869,14 @@
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react@*", "@types/react@16.9.50":
|
||||
"@types/react-dom@^16":
|
||||
version "16.9.16"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.16.tgz#c591f2ed1c6f32e9759dfa6eb4abfd8041f29e39"
|
||||
integrity sha512-Oqc0RY4fggGA3ltEgyPLc3IV9T73IGoWjkONbsyJ3ZBn+UPPCYpU2ec0i3cEbJuEdZtkqcCF2l1zf2pBdgUGSg==
|
||||
dependencies:
|
||||
"@types/react" "^16"
|
||||
|
||||
"@types/react@*", "@types/react@16.9.50", "@types/react@^16":
|
||||
version "16.9.50"
|
||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.50.tgz#cb5f2c22d42de33ca1f5efc6a0959feb784a3a2d"
|
||||
integrity sha512-kPx5YsNnKDJejTk1P+lqThwxN2PczrocwsvqXnjvVvKpFescoY62ZiM3TV7dH1T8lFhlHZF+PE5xUyimUwqEGA==
|
||||
@@ -18566,7 +18573,7 @@ finalhandler@1.1.2, finalhandler@~1.1.2:
|
||||
statuses "~1.5.0"
|
||||
unpipe "~1.0.0"
|
||||
|
||||
find-cache-dir@3.3.1, find-cache-dir@^3.2.0, find-cache-dir@^3.3.1:
|
||||
find-cache-dir@3.3.1:
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880"
|
||||
integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==
|
||||
@@ -18593,6 +18600,15 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0:
|
||||
make-dir "^2.0.0"
|
||||
pkg-dir "^3.0.0"
|
||||
|
||||
find-cache-dir@^3.2.0, find-cache-dir@^3.3.1:
|
||||
version "3.3.2"
|
||||
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b"
|
||||
integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==
|
||||
dependencies:
|
||||
commondir "^1.0.1"
|
||||
make-dir "^3.0.2"
|
||||
pkg-dir "^4.1.0"
|
||||
|
||||
find-port@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/find-port/-/find-port-1.0.1.tgz#db084a6cbf99564d99869ae79fbdecf66e8a185c"
|
||||
@@ -31234,7 +31250,7 @@ react-devtools-inline@^4.10.1:
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-dom@16.13.1, react-dom@^16.0.0:
|
||||
react-dom@16.13.1:
|
||||
version "16.13.1"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f"
|
||||
integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==
|
||||
@@ -31264,6 +31280,16 @@ react-dom@^15.3.2:
|
||||
object-assign "^4.1.0"
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react-dom@^16, react-dom@^16.0.0:
|
||||
version "16.14.0"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89"
|
||||
integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.6.2"
|
||||
scheduler "^0.19.1"
|
||||
|
||||
react-error-overlay@^6.0.3:
|
||||
version "6.0.10"
|
||||
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6"
|
||||
@@ -31466,7 +31492,7 @@ react-test-renderer@^16.0.0-0:
|
||||
react-is "^16.8.6"
|
||||
scheduler "^0.19.1"
|
||||
|
||||
react@16.13.1, react@^16.0.0, react@^16.13.1:
|
||||
react@16.13.1:
|
||||
version "16.13.1"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
|
||||
integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
|
||||
@@ -31496,6 +31522,15 @@ react@^15.3.2:
|
||||
object-assign "^4.1.0"
|
||||
prop-types "^15.5.10"
|
||||
|
||||
react@^16, react@^16.0.0, react@^16.13.1:
|
||||
version "16.14.0"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
|
||||
integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
object-assign "^4.1.1"
|
||||
prop-types "^15.6.2"
|
||||
|
||||
read-cache@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
|
||||
|
||||
Reference in New Issue
Block a user