From 5eec9114f6b9a89371b00111423baca7f4114f35 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Mon, 15 Mar 2021 14:00:21 -0700 Subject: [PATCH 01/47] Added more strict JSX rules --- packages/runner-ct/.eslintrc | 32 ++++++++++++++++++++++++++++++-- packages/runner-ct/package.json | 7 +++++-- yarn.lock | 7 ++++++- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/packages/runner-ct/.eslintrc b/packages/runner-ct/.eslintrc index 896389b435..99f068b546 100644 --- a/packages/runner-ct/.eslintrc +++ b/packages/runner-ct/.eslintrc @@ -6,13 +6,27 @@ "extends": [ "plugin:@cypress/dev/general", "plugin:@cypress/dev/tests", - "plugin:@cypress/dev/react" + "plugin:@cypress/dev/react", + "plugin:react/recommended", + "plugin:react-hooks/recommended" ], "parser": "@typescript-eslint/parser", "env": { "cypress/globals": true }, "rules": { + "react/display-name": "off", + "react/function-component-definition": ["error", { + "namedComponents": "arrow-function", + "unnamedComponents": "arrow-function" + }], + "react/jsx-boolean-value": ["error", "always"], + "react/jsx-closing-bracket-location": ["error", "line-aligned"], + "react/jsx-closing-tag-location": "error", + "react/jsx-curly-brace-presence": [ + "error", { "props": "never", "children": "never" }], + "react/jsx-curly-newline": "error", + "react/jsx-filename-extension": [ "warn", { @@ -22,7 +36,21 @@ ".tsx" ] } - ] + ], + "react/jsx-first-prop-new-line": "error", + "react/jsx-max-props-per-line": ["error", {"maximum": 1, "when": "multiline"}], + "react/jsx-no-bind": "error", + "react/jsx-no-useless-fragment": "error", + "react/jsx-one-expression-per-line": "error", + "react/jsx-sort-props": ["error", {"callbacksLast": true, "ignoreCase": true, "noSortAlphabetically": true, "reservedFirst": true}], + "react/jsx-tag-spacing": ["error", { + "closingSlash": "never", + "beforeSelfClosing": "always" + }], + "react/jsx-wrap-multilines": ["error", {"declaration": "parens-new-line", "assignment": "parens-new-line", "return": "parens-new-line", "arrow": "parens-new-line", "condition": "parens-new-line", "logical": "parens-new-line", "prop": "parens-new-line"}], + "react/no-array-index-key": "error", + "react/prop-types": "off", + "quote-props": ["error", "as-needed"] }, "overrides": [ { diff --git a/packages/runner-ct/package.json b/packages/runner-ct/package.json index 69397c6e8e..f91b9f9376 100644 --- a/packages/runner-ct/package.json +++ b/packages/runner-ct/package.json @@ -10,6 +10,7 @@ "clean-deps": "rm -rf node_modules", "cypress:open": "ts-node ../../scripts/cypress.js open-ct --project ${PWD}", "cypress:run": "ts-node ../../scripts/cypress.js run-ct --project ${PWD}", + "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json src", "postinstall": "echo '@packages/runner needs: yarn build'", "test": "ts-node ../../scripts/cypress.js run-ct --project ${PWD}", "watch": "webpack --watch --progress --config webpack.config.ts" @@ -24,7 +25,6 @@ "chai": "^4.2.0", "classnames": "2.2.6", "cypress-real-events": "1.2.0", - "eslint-plugin-mocha": "^8.0.0", "express": "^4.17.1", "globby": "^11.0.1", "hotkeys-js": "3.8.2", @@ -51,6 +51,9 @@ "babel-loader": "8.1.0", "clean-webpack-plugin": "^3.0.0", "dart-sass": "^1.25.0", + "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-react": "^7.22.0", + "eslint-plugin-react-hooks": "^4.2.0", "html-webpack-plugin": "^4.5.0", "sass-loader": "^10.0.3", "ts-loader": "^8.0.5", @@ -67,4 +70,4 @@ "src", "lib" ] -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index da4e06e784..16e4fc19ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15117,6 +15117,11 @@ eslint-plugin-react-hooks@^1.6.1: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz#6210b6d5a37205f0b92858f895a4e827020a7d04" integrity sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA== +eslint-plugin-react-hooks@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556" + integrity sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ== + eslint-plugin-react@7.14.3: version "7.14.3" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz#911030dd7e98ba49e1b2208599571846a66bdf13" @@ -15166,7 +15171,7 @@ eslint-plugin-react@7.19.0: string.prototype.matchall "^4.0.2" xregexp "^4.3.0" -eslint-plugin-react@^7.20.6: +eslint-plugin-react@^7.20.6, eslint-plugin-react@^7.22.0: version "7.22.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.22.0.tgz#3d1c542d1d3169c45421c1215d9470e341707269" integrity sha512-p30tuX3VS+NWv9nQot9xIGAHBXR0+xJVaZriEsHoJrASGCJZDJ8JLNM0YqKqI0AKm6Uxaa1VUHoNEibxRCMQHA== From f3b0430505aa1674a64309cdb3a8b4d8b9361694 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 15 Mar 2021 20:47:43 -0400 Subject: [PATCH 02/47] chore: release @cypress/react-v5.1.1 [skip ci] --- npm/react/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npm/react/CHANGELOG.md b/npm/react/CHANGELOG.md index e0182d5c62..0949139df5 100644 --- a/npm/react/CHANGELOG.md +++ b/npm/react/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/react-v5.1.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.1.0...@cypress/react-v5.1.1) (2021-03-16) + + +### Bug Fixes + +* Revert cypress.json changes ([#15499](https://github.com/cypress-io/cypress/issues/15499)) ([237c426](https://github.com/cypress-io/cypress/commit/237c426707714a287ff20ef2bdabff5f0c39e93a)) + # [@cypress/react-v5.1.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.0.1...@cypress/react-v5.1.0) (2021-03-15) From a72ecebedfdb15974cba04780d7c534c2b83abb0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 15 Mar 2021 20:47:57 -0400 Subject: [PATCH 03/47] chore: release @cypress/vue-v2.1.1 [skip ci] --- npm/vue/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npm/vue/CHANGELOG.md b/npm/vue/CHANGELOG.md index 68e3b12df7..1a94902216 100644 --- a/npm/vue/CHANGELOG.md +++ b/npm/vue/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/vue-v2.1.1](https://github.com/cypress-io/cypress/compare/@cypress/vue-v2.1.0...@cypress/vue-v2.1.1) (2021-03-16) + + +### Bug Fixes + +* Revert cypress.json changes ([#15499](https://github.com/cypress-io/cypress/issues/15499)) ([237c426](https://github.com/cypress-io/cypress/commit/237c426707714a287ff20ef2bdabff5f0c39e93a)) + # [@cypress/vue-v2.1.0](https://github.com/cypress-io/cypress/compare/@cypress/vue-v2.0.2...@cypress/vue-v2.1.0) (2021-03-15) From 393a8ca9cac905e0f6d8623bff889b041dd076b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9l=C3=A9my=20Ledoux?= Date: Tue, 16 Mar 2021 10:38:04 -0500 Subject: [PATCH 04/47] fix: add missing script for building wizard (#15502) * fix: add missing script for building wizard * docs: readme needs componentFolder * fix: make build script work on windows --- npm/create-cypress-tests/package.json | 3 ++- npm/react/README.md | 15 ++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/npm/create-cypress-tests/package.json b/npm/create-cypress-tests/package.json index 93d99582a4..bc9161101e 100644 --- a/npm/create-cypress-tests/package.json +++ b/npm/create-cypress-tests/package.json @@ -5,7 +5,8 @@ "private": false, "main": "index.js", "scripts": { - "build": "yarn prepare-example && tsc -p ./tsconfig.json && chmod +x dist/src/index.js && node scripts/example copy-to ./dist/initial-template && copy src/**/*.template.js dist/src", + "build": "yarn prepare-example && tsc -p ./tsconfig.json && node scripts/example copy-to ./dist/initial-template && yarn copy \"./src/**/*.template.js\" \"./dist/src\"", + "build-prod": "yarn build", "prepare-example": "node scripts/example copy-to ./initial-template", "test": "cross-env TS_NODE_PROJECT=./tsconfig.test.json mocha --config .mocharc.json './src/**/*.test.ts'", "test:watch": "yarn test -w" diff --git a/npm/react/README.md b/npm/react/README.md index 930777ae50..31fc885493 100644 --- a/npm/react/README.md +++ b/npm/react/README.md @@ -69,18 +69,12 @@ npm install --save-dev cypress @cypress/react You can use our command line wizard to give you instructions on configuring this plugin. It will try to determine which framework or bundling tool you are using and give you instructions on right configuration. ```sh -@cypress/react init +npx create-cypress-tests --component-testing ``` -Or continue with manual installation: +Or continue with manual installation in the plugin file -1. Include this plugin from your project's `cypress/support/index.js` - -```js -require('@cypress/react/support') -``` - -2. Tell Cypress how your React application is transpiled or bundled (using Webpack), so Cypress can load your components. For example, if you use `react-scripts` (even after ejecting) do: +1. Tell Cypress how your React application is transpiled or bundled (using Webpack), so Cypress can load your components. For example, if you use `react-scripts` (even after ejecting) do: ```js // cypress/plugins/index.js @@ -94,11 +88,10 @@ module.exports = (on, config) => { See [Recipes](./docs/recipes.md) for more examples. -3. ⚠️ Turn the experimental component support on in your `cypress.json`. You can also specify where component spec files are located. For example, to have them located in `src` folder use: +2. You can specify where component spec files are located. For example, to have them located in `src` folder use: ```json { - "experimentalComponentTesting": true, "componentFolder": "src" } ``` From e88a7aba78b48b3ff9805284df0dd79b9f938fc8 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 16 Mar 2021 11:52:04 -0400 Subject: [PATCH 05/47] chore: release create-cypress-tests-v1.0.1 [skip ci] --- npm/create-cypress-tests/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npm/create-cypress-tests/CHANGELOG.md b/npm/create-cypress-tests/CHANGELOG.md index 5d571e3e77..196ad2ad5b 100644 --- a/npm/create-cypress-tests/CHANGELOG.md +++ b/npm/create-cypress-tests/CHANGELOG.md @@ -1,3 +1,10 @@ +# [create-cypress-tests-v1.0.1](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v1.0.0...create-cypress-tests-v1.0.1) (2021-03-16) + + +### Bug Fixes + +* add missing script for building wizard ([#15502](https://github.com/cypress-io/cypress/issues/15502)) ([393a8ca](https://github.com/cypress-io/cypress/commit/393a8ca9cac905e0f6d8623bff889b041dd076b6)) + # create-cypress-tests-v1.0.0 (2021-03-15) From b640d67b80d1e574a2d55615726d8347bbb912ec Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 16 Mar 2021 11:52:26 -0400 Subject: [PATCH 06/47] chore: release @cypress/react-v5.1.2 [skip ci] --- npm/react/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npm/react/CHANGELOG.md b/npm/react/CHANGELOG.md index 0949139df5..fdaad388c8 100644 --- a/npm/react/CHANGELOG.md +++ b/npm/react/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/react-v5.1.2](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.1.1...@cypress/react-v5.1.2) (2021-03-16) + + +### Bug Fixes + +* add missing script for building wizard ([#15502](https://github.com/cypress-io/cypress/issues/15502)) ([393a8ca](https://github.com/cypress-io/cypress/commit/393a8ca9cac905e0f6d8623bff889b041dd076b6)) + # [@cypress/react-v5.1.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.1.0...@cypress/react-v5.1.1) (2021-03-16) From 319787bba4958dcc9c9ceaad0a6954fbf28158d7 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Tue, 16 Mar 2021 12:04:19 -0700 Subject: [PATCH 07/47] Improved CT lint rules and fixed react-hooks --- package.json | 5 +- packages/runner-ct/.eslintrc | 74 ----------- packages/runner-ct/.eslintrc.json | 125 ++++++++++++++++++ .../cypress/component/RunnerCt.spec.tsx | 3 +- .../cypress/component/screenshot.spec.tsx | 12 +- packages/runner-ct/package.json | 2 +- packages/runner-ct/src/.eslintrc.json | 5 - .../runner-ct/src/SpecList/SpecFileItem.tsx | 3 +- .../runner-ct/src/SpecList/SpecGroupItem.tsx | 2 +- packages/runner-ct/src/SpecList/SpecList.tsx | 2 +- packages/runner-ct/src/app/KeyboardHelper.tsx | 12 +- packages/runner-ct/src/app/NoSpecSelected.tsx | 6 +- packages/runner-ct/src/app/Plugins.tsx | 8 +- packages/runner-ct/src/app/RunnerCt.tsx | 9 +- .../src/errors/automation-disconnected.jsx | 12 +- .../runner-ct/src/errors/no-automation.jsx | 21 ++- packages/runner-ct/src/header/header.tsx | 51 +++++-- packages/runner-ct/src/iframe/iframes.jsx | 3 +- .../src/iframe/snapshot-controls.jsx | 2 +- packages/runner-ct/src/lib/ResizableBox.tsx | 2 +- .../src/lib/config-file-formatted.jsx | 34 ++++- packages/runner-ct/src/message/message.tsx | 10 +- .../src/plugins/ReactDevtoolsFallback.tsx | 4 +- .../selector-playground.jsx | 50 ++++--- packages/runner-ct/webpack.config.ts | 16 +-- yarn.lock | 30 +---- 26 files changed, 329 insertions(+), 174 deletions(-) delete mode 100644 packages/runner-ct/.eslintrc create mode 100644 packages/runner-ct/.eslintrc.json delete mode 100644 packages/runner-ct/src/.eslintrc.json diff --git a/package.json b/package.json index 6dbfb7520a..c9174466ad 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,8 @@ "eslint-plugin-cypress": "2.11.2", "eslint-plugin-json-format": "2.0.0", "eslint-plugin-mocha": "6.1.0", - "eslint-plugin-react": "7.18.3", + "eslint-plugin-react": "7.22.0", + "eslint-plugin-react-hooks": "4.2.0", "execa": "4.0.0", "execa-wrap": "1.4.0", "filesize": "4.1.2", @@ -253,4 +254,4 @@ "**/pretty-format": "26.4.0", "**/socket.io-parser": "4.0.2" } -} +} \ No newline at end of file diff --git a/packages/runner-ct/.eslintrc b/packages/runner-ct/.eslintrc deleted file mode 100644 index 99f068b546..0000000000 --- a/packages/runner-ct/.eslintrc +++ /dev/null @@ -1,74 +0,0 @@ -{ - "plugins": [ - "cypress", - "@cypress/dev" - ], - "extends": [ - "plugin:@cypress/dev/general", - "plugin:@cypress/dev/tests", - "plugin:@cypress/dev/react", - "plugin:react/recommended", - "plugin:react-hooks/recommended" - ], - "parser": "@typescript-eslint/parser", - "env": { - "cypress/globals": true - }, - "rules": { - "react/display-name": "off", - "react/function-component-definition": ["error", { - "namedComponents": "arrow-function", - "unnamedComponents": "arrow-function" - }], - "react/jsx-boolean-value": ["error", "always"], - "react/jsx-closing-bracket-location": ["error", "line-aligned"], - "react/jsx-closing-tag-location": "error", - "react/jsx-curly-brace-presence": [ - "error", { "props": "never", "children": "never" }], - "react/jsx-curly-newline": "error", - - "react/jsx-filename-extension": [ - "warn", - { - "extensions": [ - ".js", - ".jsx", - ".tsx" - ] - } - ], - "react/jsx-first-prop-new-line": "error", - "react/jsx-max-props-per-line": ["error", {"maximum": 1, "when": "multiline"}], - "react/jsx-no-bind": "error", - "react/jsx-no-useless-fragment": "error", - "react/jsx-one-expression-per-line": "error", - "react/jsx-sort-props": ["error", {"callbacksLast": true, "ignoreCase": true, "noSortAlphabetically": true, "reservedFirst": true}], - "react/jsx-tag-spacing": ["error", { - "closingSlash": "never", - "beforeSelfClosing": "always" - }], - "react/jsx-wrap-multilines": ["error", {"declaration": "parens-new-line", "assignment": "parens-new-line", "return": "parens-new-line", "arrow": "parens-new-line", "condition": "parens-new-line", "logical": "parens-new-line", "prop": "parens-new-line"}], - "react/no-array-index-key": "error", - "react/prop-types": "off", - "quote-props": ["error", "as-needed"] - }, - "overrides": [ - { - "files": [ - "lib/*" - ], - "rules": { - "no-console": 1 - } - }, - { - "files": [ - "**/*.json" - ], - "rules": { - "quotes": "off", - "comma-dangle": "off" - } - } - ] -} diff --git a/packages/runner-ct/.eslintrc.json b/packages/runner-ct/.eslintrc.json new file mode 100644 index 0000000000..bf32a92ae6 --- /dev/null +++ b/packages/runner-ct/.eslintrc.json @@ -0,0 +1,125 @@ +{ + "plugins": [ + "cypress", + "@cypress/dev" + ], + "extends": [ + "plugin:@cypress/dev/general", + "plugin:@cypress/dev/tests", + "plugin:@cypress/dev/react", + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "../reporter/src/.eslintrc.json" + ], + "parser": "@typescript-eslint/parser", + "env": { + "cypress/globals": true + }, + "rules": { + "no-unused-vars": "error", + "react/display-name": "off", + "react/function-component-definition": [ + "error", + { + "namedComponents": "arrow-function", + "unnamedComponents": "arrow-function" + } + ], + "react/jsx-boolean-value": [ + "error", + "always" + ], + "react/jsx-closing-bracket-location": [ + "error", + "line-aligned" + ], + "react/jsx-closing-tag-location": "error", + "react/jsx-curly-brace-presence": [ + "error", + { + "props": "never", + "children": "never" + } + ], + "react/jsx-curly-newline": "error", + "react/jsx-filename-extension": [ + "warn", + { + "extensions": [ + ".js", + ".jsx", + ".tsx" + ] + } + ], + "react/jsx-first-prop-new-line": "error", + "react/jsx-max-props-per-line": [ + "error", + { + "maximum": 1, + "when": "multiline" + } + ], + "react/jsx-no-bind": [ + "error", + { + "ignoreDOMComponents": true + } + ], + "react/jsx-no-useless-fragment": "error", + "react/jsx-one-expression-per-line": "error", + "react/jsx-sort-props": [ + "error", + { + "callbacksLast": true, + "ignoreCase": true, + "noSortAlphabetically": true, + "reservedFirst": true + } + ], + "react/jsx-tag-spacing": [ + "error", + { + "closingSlash": "never", + "beforeSelfClosing": "always" + } + ], + "react/jsx-wrap-multilines": [ + "error", + { + "declaration": "parens-new-line", + "assignment": "parens-new-line", + "return": "parens-new-line", + "arrow": "parens-new-line", + "condition": "parens-new-line", + "logical": "parens-new-line", + "prop": "parens-new-line" + } + ], + "react/no-array-index-key": "error", + "react/prop-types": "off", + "quote-props": [ + "error", + "as-needed" + ] + }, + "overrides": [ + { + "files": [ + "lib/*" + ], + "rules": { + "no-console": 1 + } + }, + { + "files": [ + "**/*.json" + ], + "rules": { + "quotes": "off", + "comma-dangle": "off" + } + } + ] +} diff --git a/packages/runner-ct/cypress/component/RunnerCt.spec.tsx b/packages/runner-ct/cypress/component/RunnerCt.spec.tsx index 411ed6795b..a69a6a64dc 100644 --- a/packages/runner-ct/cypress/component/RunnerCt.spec.tsx +++ b/packages/runner-ct/cypress/component/RunnerCt.spec.tsx @@ -93,7 +93,8 @@ describe('RunnerCt', () => { state={makeState({ spec: null })} // @ts-ignore - this is difficult to stub. Real one breaks things. eventManager={new FakeEventManager()} - config={fakeConfig} />) + config={fakeConfig} + />) cy.get(selectors.reporter).should('not.be.visible') cy.percySnapshot() diff --git a/packages/runner-ct/cypress/component/screenshot.spec.tsx b/packages/runner-ct/cypress/component/screenshot.spec.tsx index cd4aa86ebb..769d0c2aa9 100644 --- a/packages/runner-ct/cypress/component/screenshot.spec.tsx +++ b/packages/runner-ct/cypress/component/screenshot.spec.tsx @@ -28,9 +28,15 @@ const styles = ` const Layout: React.FC = () => { return (
- -
Body
- + +
+Body +
+
) } diff --git a/packages/runner-ct/package.json b/packages/runner-ct/package.json index f91b9f9376..25bd389eb8 100644 --- a/packages/runner-ct/package.json +++ b/packages/runner-ct/package.json @@ -10,8 +10,8 @@ "clean-deps": "rm -rf node_modules", "cypress:open": "ts-node ../../scripts/cypress.js open-ct --project ${PWD}", "cypress:run": "ts-node ../../scripts/cypress.js run-ct --project ${PWD}", - "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json src", "postinstall": "echo '@packages/runner needs: yarn build'", + "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json src", "test": "ts-node ../../scripts/cypress.js run-ct --project ${PWD}", "watch": "webpack --watch --progress --config webpack.config.ts" }, diff --git a/packages/runner-ct/src/.eslintrc.json b/packages/runner-ct/src/.eslintrc.json deleted file mode 100644 index 3675f61490..0000000000 --- a/packages/runner-ct/src/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "../../reporter/src/.eslintrc.json" - ] -} \ No newline at end of file diff --git a/packages/runner-ct/src/SpecList/SpecFileItem.tsx b/packages/runner-ct/src/SpecList/SpecFileItem.tsx index c66122a25a..e9b1d379bd 100644 --- a/packages/runner-ct/src/SpecList/SpecFileItem.tsx +++ b/packages/runner-ct/src/SpecList/SpecFileItem.tsx @@ -46,5 +46,6 @@ export const SpecFileItem: React.FC = (props: SpecFileProps) => { {props.spec.shortName} - ) + + ) } diff --git a/packages/runner-ct/src/SpecList/SpecGroupItem.tsx b/packages/runner-ct/src/SpecList/SpecGroupItem.tsx index 55313cdf90..dac0fd7f1d 100644 --- a/packages/runner-ct/src/SpecList/SpecGroupItem.tsx +++ b/packages/runner-ct/src/SpecList/SpecGroupItem.tsx @@ -23,9 +23,9 @@ export const SpecGroupItem: React.FC = (props) => { className='spec-list__group' > setIsOpen(!open)} className='spec-list__group-name' title={props.group.shortName} + onClick={() => setIsOpen(!open)} > {open ? : } diff --git a/packages/runner-ct/src/SpecList/SpecList.tsx b/packages/runner-ct/src/SpecList/SpecList.tsx index c7a56703b0..82b0d4d00d 100644 --- a/packages/runner-ct/src/SpecList/SpecList.tsx +++ b/packages/runner-ct/src/SpecList/SpecList.tsx @@ -48,8 +48,8 @@ export const SpecList: React.FC = observer((props) => { return (
= return (
  • -

    {description}

    +

    + {' '} + {description} + {' '} +

    {shortcut.map((key) => ( -
    {key === 'Meta' ? metaSymbol : key}
    +
    + {' '} + {key === 'Meta' ? metaSymbol : key} + {' '} +
    ))}
  • diff --git a/packages/runner-ct/src/app/NoSpecSelected.tsx b/packages/runner-ct/src/app/NoSpecSelected.tsx index d6a700fb15..547483f13d 100644 --- a/packages/runner-ct/src/app/NoSpecSelected.tsx +++ b/packages/runner-ct/src/app/NoSpecSelected.tsx @@ -8,7 +8,11 @@ export const NoSpecSelected: React.FC = ({ children }) => { -

    No spec selected.

    +

    + {' '} +No spec selected. + {' '} +

    {children && (
    diff --git a/packages/runner-ct/src/app/Plugins.tsx b/packages/runner-ct/src/app/Plugins.tsx index 79278e09ad..2f7e96e0c8 100644 --- a/packages/runner-ct/src/app/Plugins.tsx +++ b/packages/runner-ct/src/app/Plugins.tsx @@ -30,10 +30,12 @@ export const Plugins = observer( {props.state.plugins.map((plugin) => (
    diff --git a/packages/runner-ct/src/errors/no-automation.jsx b/packages/runner-ct/src/errors/no-automation.jsx index fc2e555880..5bd19923e1 100644 --- a/packages/runner-ct/src/errors/no-automation.jsx +++ b/packages/runner-ct/src/errors/no-automation.jsx @@ -21,7 +21,12 @@ const noBrowsers = () => ( const browser = (browser) => ( - Run {displayName(browser.displayName)} {browser.majorVersion} + +Run + {displayName(browser.displayName)} + {' '} + {browser.majorVersion} + ) @@ -34,13 +39,15 @@ const browserPicker = (browsers, onLaunchBrowser) => { return (
    -

    This browser was not launched through Cypress. Tests cannot run.

    +

    +This browser was not launched through Cypress. Tests cannot run. +

    ) @@ -49,11 +56,15 @@ const browserPicker = (browsers, onLaunchBrowser) => { export default ({ browsers, onLaunchBrowser }) => (
    diff --git a/packages/runner-ct/src/header/header.tsx b/packages/runner-ct/src/header/header.tsx index aea0a3bef1..5538a379d1 100644 --- a/packages/runner-ct/src/header/header.tsx +++ b/packages/runner-ct/src/header/header.tsx @@ -43,8 +43,8 @@ export default class Header extends Component {