Skip to content

Commit

Permalink
fix: importing react and fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaSachs committed Oct 13, 2020
1 parent 6716d70 commit e37a242
Show file tree
Hide file tree
Showing 397 changed files with 69,403 additions and 52,366 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ npm/webpack-preprocessor/examples/use-babelrc/cypress/integration/spec.js
**/.history
**/.cy
**/.git

/npm/react/bin/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,5 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

/npm/react/bin/*
# End of https://www.gitignore.io/api/osx,git,node,windows,intellij,linux
144 changes: 142 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ commands:
steps:
- run:
name: "Waiting on Circle CI jobs: <<parameters.job-names>>"
command: node ./scripts/wait-on-circle-jobs.js --job-names="<<parameters.job-names>>"

command: node ./scripts/wait-on-circle-jobs.js --job-names="<<parameters.job-names>>"q
jobs:
## code checkout and yarn installs
build:
Expand Down Expand Up @@ -1066,6 +1065,66 @@ jobs:
- run:
name: Release
command: yarn semantic-release @cypress/vue

npm-react:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Build
command: yarn workspace @cypress/react build
- run:
name: Run unit test
command: yarn workspace @cypress/react test:unit
- run:
name: Run tests
command: yarn workspace @cypress/react test
- store-npm-logs
- persist_to_workspace:
root: ~/
paths: cypress/npm/react

npm-react-e2e-example:
<<: *defaults
description: Run react component testing end-to-end examples
parameters:
executor:
description: Executor name to use
type: executor
default: cy-doc
path:
description: relative to npm/react path of example
type: string
steps:
- attach_workspace:
at: ~/
- restore_cache:
name: Restore Cache
keys:
- yarn-packages-{{ checksum "npm/react/<<parameters.path>>/yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
working_directory: npm/react/<<parameters.path>>
- save_cache:
name: Save Cache
key: yarn-packages-{{ checksum "npm/react/<<parameters.path>>/yarn.lock" }}
paths:
- ~/.cache
- run:
name: Run e2e example tests
command: yarn test
working_directory: npm/react/<<parameters.path>>

npm-react-release:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Release
command: yarn semantic-release @cypress/react

npm-eslint-plugin-dev:
<<: *defaults
Expand Down Expand Up @@ -1885,6 +1944,87 @@ linux-workflow: &linux-workflow
- build
- npm-vue

- npm-react:
requires:
- build

# Run tests for end-to-end react component tests examples
- npm-react-e2e-example:
name: React + Axe component testing
path: examples/a11y
requires:
- npm-react
- npm-react-e2e-example:
name: React + Next component testing
path: examples/nextjs
requires:
- npm-react
- npm-react-e2e-example:
name: React + CRA component testing
path: examples/react-scripts
requires:
- npm-react
- npm-react-e2e-example:
name: React + CRA folder component testing
path: examples/react-scripts-folder
requires:
- npm-react
- npm-react-e2e-example:
name: React + Rollup component testing
path: examples/rollup
requires:
- npm-react
- npm-react-e2e-example:
name: React + Sass + TS component testing
path: examples/sass-and-ts
requires:
- npm-react
- npm-react-e2e-example:
name: React + Snapshots component testing
path: examples/snapshots
requires:
- npm-react
- npm-react-e2e-example:
name: React + Tailwind component testing
path: examples/tailwind
requires:
- npm-react
# Requires Applitools key in the env
# - npm-react-e2e-example:
# name: React + Applitools component testing
# path: examples/visual-testing-with-applitools
# requires:
# - npm-react
- npm-react-e2e-example:
name: React + Percy component testing
path: examples/visual-testing-with-percy
requires:
- npm-react
- npm-react-e2e-example:
name: React + Happo component testing
path: examples/visual-testing-with-happo
requires:
- npm-react
- npm-react-e2e-example:
name: React + Webpack file component testing
path: examples/webpack-file
requires:
- npm-react
- npm-react-e2e-example:
name: React + Webpack options component testing
path: examples/webpack-options
requires:
- npm-react

- npm-react-release:
filters:
branches:
only:
- master
requires:
- build
- npm-vue

- npm-eslint-plugin-dev:
requires:
- build
Expand Down
52 changes: 52 additions & 0 deletions npm/react/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"plugins": [
"cypress",
"@cypress/dev"
],
"extends": [
"plugin:@cypress/dev/general",
"plugin:@cypress/dev/tests",
"plugin:@cypress/dev/react"
],
"parser": "@typescript-eslint/parser",
"env": {
"cypress/globals": true
},
"globals": {
"jest": "readonly"
},
"rules": {
"no-console": "off",
"mocha/no-global-tests": "off",
"@typescript-eslint/no-unused-vars": "off",
"react/jsx-filename-extension": [
"warn",
{
"extensions": [
".js",
".jsx",
".tsx"
]
}
]
},
"overrides": [
{
"files": [
"lib/*"
],
"rules": {
"no-console": 1
}
},
{
"files": [
"**/*.json"
],
"rules": {
"quotes": "off",
"comma-dangle": "off"
}
}
]
}
9 changes: 0 additions & 9 deletions npm/react/.github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

12 changes: 0 additions & 12 deletions npm/react/.gitignore

This file was deleted.

7 changes: 7 additions & 0 deletions npm/react/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"watch-ignore": [
"node_modules"
],
"require": "ts-node/register",
"exit": true
}
2 changes: 0 additions & 2 deletions npm/react/.npmrc

This file was deleted.

6 changes: 0 additions & 6 deletions npm/react/.prettierrc.json

This file was deleted.

29 changes: 0 additions & 29 deletions npm/react/.vscode/launch.json

This file was deleted.

29 changes: 0 additions & 29 deletions npm/react/.vscode/settings.json

This file was deleted.

0 comments on commit e37a242

Please sign in to comment.