Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support specPattern, deprecate integrationFolder and componentFolder #19168

Closed
wants to merge 91 commits into from
Closed
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e020e7d
use new specPattern API
lmiller1990 Dec 1, 2021
df3d841
remove projectApi.findSpecs
lmiller1990 Dec 1, 2021
acfaf68
do not require integration folder
lmiller1990 Dec 2, 2021
7c21ce3
support --spec
lmiller1990 Dec 2, 2021
f380d09
support --spec
lmiller1990 Dec 2, 2021
38578c6
remove old code
lmiller1990 Dec 2, 2021
09f6c6d
remove old code
lmiller1990 Dec 2, 2021
f94acf5
nuke old code
lmiller1990 Dec 2, 2021
692247b
no appvetor
lmiller1990 Dec 2, 2021
9db1091
update
lmiller1990 Dec 2, 2021
7b081a9
correct url for ct
lmiller1990 Dec 2, 2021
3947f26
work on migrating launchpad
lmiller1990 Dec 2, 2021
9933ea5
update ct spec url
lmiller1990 Dec 2, 2021
8db54d0
types
lmiller1990 Dec 2, 2021
2ca354b
types
lmiller1990 Dec 2, 2021
97a4a00
dead code
lmiller1990 Dec 2, 2021
de7a624
remove old endpiont
lmiller1990 Dec 2, 2021
2a801eb
revert back circle.yml
lmiller1990 Dec 2, 2021
983c2c4
update missing config
lmiller1990 Dec 3, 2021
b39953a
delete spec util
lmiller1990 Dec 3, 2021
99eaace
update config
lmiller1990 Dec 3, 2021
d48b274
update config
lmiller1990 Dec 3, 2021
218fb5d
config again
lmiller1990 Dec 3, 2021
882a06e
update spec pattern
lmiller1990 Dec 3, 2021
1391927
updated vue config
lmiller1990 Dec 3, 2021
8551796
update spec pattern for ui components
lmiller1990 Dec 3, 2021
102376e
update config for vite dev server
lmiller1990 Dec 3, 2021
bc9629d
update snapshots
lmiller1990 Dec 3, 2021
a88ee2b
update config
lmiller1990 Dec 3, 2021
9ca7b81
update design system config
lmiller1990 Dec 3, 2021
935aa5d
fix spec pattern in reporter
lmiller1990 Dec 3, 2021
1aef8e1
update default
lmiller1990 Dec 3, 2021
2191d77
update deprecated spec snapshots
lmiller1990 Dec 3, 2021
839cf37
update system tests
lmiller1990 Dec 3, 2021
5996dad
update run mode output
lmiller1990 Dec 3, 2021
22c7d3f
revert changes
lmiller1990 Dec 3, 2021
f6560f1
lint
lmiller1990 Dec 3, 2021
a4da5a3
remove scaffold tests
lmiller1990 Dec 3, 2021
fc8dbf7
update angular
lmiller1990 Dec 3, 2021
5b3bbc0
fix CT
lmiller1990 Dec 3, 2021
31babca
update circle yml
lmiller1990 Dec 3, 2021
c869729
fix system tests for ct
lmiller1990 Dec 3, 2021
d9adbc5
fix tests
lmiller1990 Dec 3, 2021
9c01414
work on server unit tests
lmiller1990 Dec 3, 2021
2123ef9
patch package
lmiller1990 Dec 3, 2021
8f0db6b
patch package again
lmiller1990 Dec 3, 2021
4455ca7
update test
lmiller1990 Dec 6, 2021
79a0108
try not to rely on config async loading too much
lmiller1990 Dec 6, 2021
e7f12d7
normalize specPattern to array
lmiller1990 Dec 6, 2021
c9947b8
update snapshot
lmiller1990 Dec 6, 2021
0b67c75
use base name
lmiller1990 Dec 6, 2021
1cf0e45
deal with react-scripts later
lmiller1990 Dec 6, 2021
74fb541
update snapshot
lmiller1990 Dec 6, 2021
fb7031e
hacky way to update snapshots
lmiller1990 Dec 6, 2021
3c2ea90
new hack to update snapshots
lmiller1990 Dec 6, 2021
68bb637
trying again
lmiller1990 Dec 6, 2021
aea7bcc
hacky fix
lmiller1990 Dec 6, 2021
5cf09ad
ci: snapshots
lmiller1990 Dec 6, 2021
eebc039
ci: snapshots
lmiller1990 Dec 6, 2021
aa03810
Merge branch 'lmiller1990/update-spec-pattern' of github.com:cypress-…
lmiller1990 Dec 6, 2021
221827d
snapshots
lmiller1990 Dec 6, 2021
3448071
mas updates
lmiller1990 Dec 6, 2021
b53c3bd
update spec API
lmiller1990 Dec 6, 2021
f3dc609
fix test
lmiller1990 Dec 6, 2021
a211290
fix test
lmiller1990 Dec 6, 2021
c01c219
update
lmiller1990 Dec 6, 2021
cee1f11
update test
lmiller1990 Dec 6, 2021
f3b6a53
fix test
lmiller1990 Dec 6, 2021
f80ddac
update plugin
lmiller1990 Dec 6, 2021
21303cf
update spec
lmiller1990 Dec 6, 2021
38b6504
webpack optinos
lmiller1990 Dec 6, 2021
53e3289
Update launchpad tests
estrada9166 Dec 6, 2021
a08efa7
fix screenshot paths
lmiller1990 Dec 7, 2021
a620654
Merge branch 'lmiller1990/update-spec-pattern' of https://github.com/…
lmiller1990 Dec 7, 2021
052bf82
merge in origin/10.0-release
lmiller1990 Dec 7, 2021
283ca1b
updated snapshot
lmiller1990 Dec 7, 2021
300ef6f
change pattern
lmiller1990 Dec 7, 2021
5e03714
guard
lmiller1990 Dec 7, 2021
fb215eb
fix smoke test
lmiller1990 Dec 7, 2021
30d3455
patch code coverage
lmiller1990 Dec 7, 2021
a62098c
update percy config
lmiller1990 Dec 7, 2021
0455aea
fix specs
lmiller1990 Dec 7, 2021
0f95501
try updating example project
lmiller1990 Dec 7, 2021
d24a522
update snapshots
lmiller1990 Dec 7, 2021
cd6c7be
remove old test
lmiller1990 Dec 7, 2021
23465e7
remove snapshot hack
lmiller1990 Dec 7, 2021
1d7ed8c
add back appveyor
lmiller1990 Dec 7, 2021
9c7b809
remove old code
lmiller1990 Dec 7, 2021
db12ca6
update snapshot
lmiller1990 Dec 7, 2021
84aac5e
Fix tests
estrada9166 Dec 7, 2021
ced245e
merge in origin
lmiller1990 Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
105 changes: 0 additions & 105 deletions appveyor.yml
@@ -1,105 +0,0 @@
branches:
only:
- master
- develop
- windows-code-signing
- 10.0-release
- /win*/

# https://www.appveyor.com/docs/lang/nodejs-iojs/
environment:
# use matching version of Node.js
nodejs_version: "16.5.0"
# encode secure variables which will NOT be used
# in pull requests
# https://www.appveyor.com/docs/build-configuration/#secure-variables
# the variables can be encrypted at
# https://ci.appveyor.com/tools/encrypt
ci_json:
secure: uOM7Bj+6MfQA/wiUzA4MolZDlcdhIqrOWLN0LdR+Lg4olc1onF3IpWfRf+3B6Q5uT98OTnIU71OOqSRY7inGQg==
# for uploading built binary to S3 bucket
aws_credentials_json:
secure: ttGzd2/rW+i8H+pozcFxzZKU07B5INL8+LjD4vCOKes+tI6EaKhrLvAQ9xT7r+e1p8My8f4LrqvT+i37kbRCUPY4DHmUgagj3aj0OghsT0eX/Vr/6T4v1yndB7SX7FnG07eVcGb63r9f5kT7xu7ElJ9WXh1Ok5K69W0zDPsa1RGCCYqsTi4tH2h5EAZwjY1b
# CDN control
CF_TOKEN:
secure: nVGxcWxXGvrT621HmgMf9Mwm84dqo+cKHZj94OvyyWEGIZOJJkbWHsD/l2/r4a6Y
CF_ZONEID:
secure: SrZnd4BYW9PILEEi7y9VyXuC16C+qMEDT3QuV1PZZJa47TRkjcaYpAXhAHz0j0jT
# authenticate as Cypress bot when posting commit status checks
GH_APP_ID:
secure: oR0RVDbv6GKej4wwjkz7Zw==
GH_INSTALLATION_ID:
secure: tAoqu4zIgZUxOfW0u9YQgw==
GH_PRIVATE_KEY:
secure: msLmlIBnkNovqrqTeCqa7ZPjETyS8Xn4JLuiRMWYK7gZBTO66pNnFaoeqwPFwH+ooO0cDFhAOPTToLisgTLXCo4hnw38zuBuKq+ywCh5mtk5uZn4x4F8G2XyRLD/ViZm+VuD2yZzaTWF11upDqC4xbXDe32yD6OSLKhA5ms5F5ke83zEuWSLTqVVCIpVH12rVTJHl3QHaWPwZbBBE3SFN8D6uiclvI06y3pEg2bVShU8YqlwearYTRuErsYXNCUmT0SrDd2kHznlYf08edQDHpydnQvvTViZMgomvYp5wDCXFD+/FxtTMuTptJFpspirXL8w/xjYy1/JaTd/K01oUUD2Xwl/v0cS28OpdcraETyrQ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sOycljoApACBYLAlSe+ewxEaOjrLtnIR0LfzcKXlCRYbM31YWOCtMhMRehJbX9qWGNPTQHmjabYz7/IhLKtJuaMIpj3pfYgS/oQQ36g6ItCo7vLQAq+rgU99IUyQROOGXMUgK/8umL71oijA9dht0LmH9E7EGwih0WuLO2SndovTJODDfK9YrRTEocbo3B9S05O4fpGoQ32TK99mXjoQdlyxd/dn9Q9uDD27u/fGgUoYdt9VzAIigbRIQuRx430n33V0ZyXv90QuD4ESOLxVI1vnLj6JKAS4PGRz66rouYG6U+1syDWpf5Y6DzC/2KOfdLPwmuwjMQxuhf+6+tGeJbeotNX/eJF0LkRfyieRwEGKxIo0PaxdmVwsF7vKR6ZnOpr5BuLm/+44Rg3bQdJ4bcRW6i6dIhOyHWniLvsAPLu1NZDVN6jA13KTChhcrNnSGddjRFLekawl80E3KhG1p+KvItIZX3kzG4QjJ
CSC_KEY_PASSWORD:
secure: GiXelhGGKXKUNW6T7ptKUw==
CSC_LINK:
secure: 9uSZwUYwcdZejLTpGpySd6t9JSL1Hw3iTvb4T2HZrx6iKd5DSR7AN6A7lS5ThTZ6g1JNSypSHRwDeC1Z5xkP8QEIjDqKjyNrqC19gCiSMrpdjjIR8Y8upIISrDBWjOiI

platform:
- x64

# https://www.appveyor.com/docs/build-cache/
# hmm, seems there is NPM on windows problem
# with installing over cached folder
# https://github.com/npm/npm/issues/17747
# cache:
# - node_modules -> yarn.lock
# - '%LOCALAPPDATA%/Yarn -> yarn.lock'
# # todo: cache node_modules in each package

# Install scripts. (runs after repo cloning)
install:
# it is not a given that AppVeyor has the exact version of Node we need predownloaded
# see https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs
- ps: Update-NodeJsInstallation $env:nodejs_version $env:platform
# - ps: Install-Product node $env:nodejs_version $env:platform
# upgrade npm
- yarn global add @bahmutov/print-env@1
# Output useful info for debugging.
- node --version
- node --print process.arch
- yarn --version
# prints all public variables relevant to the build
- print-env Platform
- yarn check-node-version
- print-env APPVEYOR
# prints if we have sensitive variables that start with a prefix GH
# which are used to trigger other projects
# ignore errors - forked pull requests will NOT have these variables set
- has-env GH || true
# clean cache to prevent install permission issues
- yarn cache clean
- yarn --frozen-lockfile || yarn --frozen-lockfile || yarn --frozen-lockfile
- yarn build-prod
- .\node_modules\.bin\print-arch

# Post-install test scripts.
test_script:
# Output useful info for debugging.
# beware of echo-ing environment variables that may have batch syntax (e.g. commit messages)
- node --version
- yarn --version
- 7z
- echo *** System info ***
- node cli/bin/cypress info --dev

# make sure mocha runs
- yarn test-mocha
# make sure our snapshots are compared correctly
# - npm run test-mocha-snapshot
# the other larger tests
- echo *** Building Windows NPM package ***
- yarn get-next-version --npm
- cd cli
- yarn
- yarn build
- cd build
- yarn pack
- cd ../..

- node ./scripts/win-appveyor-build.js

# Don't actually build.
build: off
45 changes: 1 addition & 44 deletions circle.yml
Expand Up @@ -500,7 +500,7 @@ commands:
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_ID \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
yarn percy upload packages/runner-ct/cypress/screenshots/screenshot.spec.tsx/percy
yarn percy upload packages/runner-ct/cypress/screenshots/cypress/component/screenshot.spec.tsx/percy
else
echo "skipping percy screenshots uploading"
fi
Expand Down Expand Up @@ -1860,46 +1860,6 @@ jobs:
echo "console.log('hello world')" > hello.ts
npx tsc hello.ts --noEmit

# testing scaffolding examples and running them
# against example.cypress.io
Comment on lines -1879 to -1880
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to record this as an action item to follow up on / add back in one way or another?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm yes probably, we want to make sure all the scaffolded specs still function and work, just without all the complexity of the existing scaffolding setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

test-cypress-scaffold:
resource_class: medium
parameters:
executor:
description: Executor name to use
type: executor
default: cy-doc
wd:
description: Working directory, should be OUTSIDE cypress monorepo folder
type: string
default: /root/test-scaffold
<<: *defaults
steps:
- restore_workspace_binaries
- run: mkdir <<parameters.wd>>
- run:
name: Create new NPM package ⚗️
working_directory: <<parameters.wd>>
command: npm init -y
- run:
name: Install dependencies 📦
working_directory: <<parameters.wd>>
environment:
CYPRESS_INSTALL_BINARY: /root/cypress/cypress.zip
# let's install Cypress, Jest and any other package that might conflict
# https://github.com/cypress-io/cypress/issues/6690
command: |
npm install /root/cypress/cypress.tgz \
typescript jest @types/jest enzyme @types/enzyme
- run:
name: Scaffold and test examples 🏗
working_directory: <<parameters.wd>>
environment:
CYPRESS_INTERNAL_FORCE_SCAFFOLD: "1"
command: |
echo 'module.exports = {}' > cypress.config.js
npx cypress run

test-full-typescript-project:
parameters:
executor:
Expand Down Expand Up @@ -2359,9 +2319,6 @@ linux-workflow: &linux-workflow
- test-types-cypress-and-jest:
requires:
- create-build-artifacts
- test-cypress-scaffold:
requires:
- create-build-artifacts
- test-full-typescript-project:
requires:
- create-build-artifacts
Expand Down
8 changes: 8 additions & 0 deletions cli/types/cypress.d.ts
Expand Up @@ -2630,6 +2630,7 @@ declare namespace Cypress {
/**
* Path to folder containing integration test files
* @default "cypress/integration"
* @deprecated
*/
integrationFolder: string
/**
Expand Down Expand Up @@ -2774,6 +2775,7 @@ declare namespace Cypress {
blockHosts: null | string | string[]
/**
* Path to folder containing component test files.
* @deprecated
*/
componentFolder: false | string
/**
Expand All @@ -2787,6 +2789,12 @@ declare namespace Cypress {
/**
* Glob pattern to determine what test files to load.
*/
specPattern: string | string[]
/**
* Glob pattern to determine what test files to load.
*
* @deprecated Use `specPattern` under `component` or `e2e`
*/
testFiles: string | string[]
/**
* The user agent the browser sends in all request headers.
Expand Down
3 changes: 1 addition & 2 deletions npm/angular/cypress.config.ts
Expand Up @@ -7,8 +7,7 @@ export default defineConfig({
'fileServerFolder': 'src',
'projectId': 'nf7zag',
'component': {
'componentFolder': 'src/app',
'testFiles': '**/*cy-spec.ts',
'specPattern': 'src/app/**/*cy-spec.ts',
'setupNodeEvents': require('./cypress/plugins'),
devServer (cypressConfig) {
const { startDevServer } = require('@cypress/webpack-dev-server')
Expand Down
3 changes: 2 additions & 1 deletion npm/angular/package.json
Expand Up @@ -13,7 +13,8 @@
"app-start": "ng serve",
"app-build": "ng build",
"test": "yarn cy:run",
"test-ci": "yarn cy:run"
"test-ci": "yarn cy:run",
"postinstall": "patch-package"
},
"dependencies": {
"@cypress/mount-utils": "0.0.0-development",
Expand Down
45 changes: 45 additions & 0 deletions npm/angular/patches/@cypress+code-coverage+3.9.5.patch
@@ -0,0 +1,45 @@
diff --git a/node_modules/@cypress/code-coverage/support-utils.js b/node_modules/@cypress/code-coverage/support-utils.js
index 31e00ee..0c56908 100644
--- a/node_modules/@cypress/code-coverage/support-utils.js
+++ b/node_modules/@cypress/code-coverage/support-utils.js
@@ -10,7 +10,7 @@ const filterSpecsFromCoverage = (totalCoverage, config = Cypress.config) => {
const integrationFolder = config('integrationFolder')
/** @type {string} Cypress run-time config has test files string pattern */
// @ts-ignore
- const testFilePattern = config('testFiles')
+ const testFilePattern = config('specPattern')

// test files chould be:
// wild card string "**/*.*" (default)
diff --git a/node_modules/@cypress/code-coverage/support.js b/node_modules/@cypress/code-coverage/support.js
index c99ceb2..f51ce4e 100644
--- a/node_modules/@cypress/code-coverage/support.js
+++ b/node_modules/@cypress/code-coverage/support.js
@@ -37,7 +37,6 @@ const logMessage = (s) => {
* If there are more files loaded from support folder, also removes them
*/
const filterSupportFilesFromCoverage = (totalCoverage) => {
- const integrationFolder = Cypress.config('integrationFolder')
const supportFile = Cypress.config('supportFile')

/** @type {string} Cypress run-time config has the support folder string */
@@ -50,16 +49,9 @@ const filterSupportFilesFromCoverage = (totalCoverage) => {
isSupportFile(filename)
)

- // check the edge case
- // if we have files from support folder AND the support folder is not same
- // as the integration, or its prefix (this might remove all app source files)
- // then remove all files from the support folder
- if (!integrationFolder.startsWith(supportFolder)) {
- // remove all covered files from support folder
- coverage = Cypress._.omitBy(totalCoverage, (fileCoverage, filename) =>
- filename.startsWith(supportFolder)
- )
- }
+ coverage = Cypress._.omitBy(totalCoverage, (fileCoverage, filename) =>
+ filename.startsWith(supportFolder)
+ )
return coverage
}

3 changes: 1 addition & 2 deletions npm/design-system/cypress.config.js
Expand Up @@ -3,17 +3,16 @@ module.exports = {
viewportHeight: 800,
video: false,
projectId: 'z9dxah',
testFiles: '**/*spec.{js,jsx,ts,tsx}',
env: {
reactDevtools: true,
},
ignoreTestFiles: [
'**/__snapshots__/*',
'**/__image_snapshots__/*',
],
componentFolder: 'src',
fixturesFolder: false,
component: {
specPattern: 'src/**/*spec.{js,jsx,ts,tsx}',
devServer (cypressConfig) {
const { startDevServer } = require('@cypress/vite-dev-server')

Expand Down
2 changes: 1 addition & 1 deletion npm/react/cypress.config.js
Expand Up @@ -5,7 +5,6 @@ module.exports = {
'viewportHeight': 400,
'video': false,
'projectId': 'z9dxah',
'testFiles': '**/*spec.{js,jsx,ts,tsx}',
'env': {
'reactDevtools': true,
},
Expand All @@ -15,6 +14,7 @@ module.exports = {
],
'experimentalFetchPolyfill': true,
'component': {
'specPattern': 'cypress/component/**/*spec.{js,jsx,ts,tsx}',
devServer (cypressConfig, devServerConfig) {
const { startDevServer } = require('@cypress/webpack-dev-server')
const path = require('path')
Expand Down
2 changes: 1 addition & 1 deletion npm/react/examples.env
Expand Up @@ -5,7 +5,7 @@
/examples/react-scripts-typescript
/examples/find-webpack
/examples/webpack-file
/examples/react-scripts-folder
# /examples/react-scripts-folder
/examples/using-babel-typescript
/examples/webpack-options
/examples/sass-and-ts
2 changes: 1 addition & 1 deletion npm/react/examples/a11y/cypress.config.js
@@ -1,10 +1,10 @@
module.exports = {
'video': false,
'fixturesFolder': false,
'testFiles': '**/*spec.js',
'viewportWidth': 500,
'viewportHeight': 500,
'component': {
'specPattern': 'cypress/component/**/*spec.js',
setupNodeEvents (on, config) {
// load file devServer that comes with this plugin
// https://github.com/bahmutov/cypress-react-unit-test#install
Expand Down
3 changes: 1 addition & 2 deletions npm/react/examples/craco/cypress.config.js
@@ -1,7 +1,6 @@
module.exports = {
'component': {
'testFiles': '**/*.test.{js,ts,jsx,tsx}',
'componentFolder': 'src',
'specPattern': 'cypress/component/**/*.test.{js,ts,jsx,tsx}',
setupNodeEvents (on, config) {
const cracoConfig = require('./craco.config.js')
const devServer = require('@cypress/react/plugins/craco')
Expand Down
3 changes: 1 addition & 2 deletions npm/react/examples/find-webpack/cypress.config.ts
Expand Up @@ -4,8 +4,7 @@ export default defineConfig({
'video': true,
'projectId': 'jq5xpp',
'component': {
'testFiles': '**/*.spec.{js,ts,jsx,tsx}',
'componentFolder': 'src',
'specPattern': 'src/**/*.spec.{js,ts,jsx,tsx}',
devServer (cypressConfig) {
const findReactScriptsWebpackConfig = require('@cypress/react/plugins/react-scripts/findReactScriptsWebpackConfig')
const { startDevServer } = require('@cypress/webpack-dev-server')
Expand Down
3 changes: 1 addition & 2 deletions npm/react/examples/nextjs-webpack-5/cypress.config.js
@@ -1,11 +1,10 @@
module.exports = {
'video': false,
'testFiles': '**/*.spec.{js,jsx}',
'viewportWidth': 500,
'viewportHeight': 800,
'componentFolder': 'cypress/components',
'pluginsFile': 'cypress/plugins.js',
'component': {
'specPattern': 'cypress/component/**/*.spec.{js,jsx}',
setupNodeEvents (on, config) {
const devServer = require('@cypress/react/plugins/next')

Expand Down
3 changes: 1 addition & 2 deletions npm/react/examples/nextjs/cypress.config.js
@@ -1,14 +1,13 @@
module.exports = {
'video': false,
'testFiles': '**/*.spec.{js,jsx}',
'viewportWidth': 500,
'viewportHeight': 800,
'experimentalFetchPolyfill': true,
'componentFolder': 'cypress/components',
'env': {
'coverage': true,
},
'component': {
'specPattern': 'cypress/components/**/*.spec.{js,jsx}',
setupNodeEvents (on, config) {
const devServer = require('@cypress/react/plugins/next')

Expand Down
3 changes: 1 addition & 2 deletions npm/react/examples/react-scripts-folder/cypress.config.js
@@ -1,11 +1,10 @@
module.exports = {
'video': false,
'fixturesFolder': false,
'testFiles': '**/*cy-spec.js',
'viewportWidth': 500,
'viewportHeight': 800,
'componentFolder': 'cypress/component',
'component': {
'specPattern': 'cypress/component/**/*cy-spec.js',
setupNodeEvents (on, config) {
// load file devServer that comes with this plugin
// https://github.com/bahmutov/cypress-react-unit-test#install
Expand Down
@@ -1,10 +1,9 @@
module.exports = {
'video': false,
'testFiles': '**/*cy-spec.tsx',
'viewportWidth': 500,
'viewportHeight': 800,
'componentFolder': 'src',
'component': {
'specPattern': 'src/**/*cy-spec.tsx',
setupNodeEvents (on, config) {
const devServer = require('@cypress/react/plugins/react-scripts')

Expand Down