From f1f9ddeb8902ff8db77f483dd7865cd6837084e8 Mon Sep 17 00:00:00 2001 From: Ben Kucera <14625260+Bkucera@users.noreply.github.com> Date: Wed, 10 Jun 2020 19:36:23 -0400 Subject: [PATCH 1/5] move type definition loading for driver/cypress into dedicated file --- packages/driver/cypress/integration/e2e/focus_blur_spec.js | 1 - packages/driver/cypress/ts/test-types.d.ts | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 packages/driver/cypress/ts/test-types.d.ts diff --git a/packages/driver/cypress/integration/e2e/focus_blur_spec.js b/packages/driver/cypress/integration/e2e/focus_blur_spec.js index 79d32d90768d..fa94533f9f1a 100644 --- a/packages/driver/cypress/integration/e2e/focus_blur_spec.js +++ b/packages/driver/cypress/integration/e2e/focus_blur_spec.js @@ -1,4 +1,3 @@ -/// /* eslint arrow-body-style:'off' */ /** diff --git a/packages/driver/cypress/ts/test-types.d.ts b/packages/driver/cypress/ts/test-types.d.ts new file mode 100644 index 000000000000..4daafad4aa08 --- /dev/null +++ b/packages/driver/cypress/ts/test-types.d.ts @@ -0,0 +1,4 @@ +// NOTE: this loads in the Cypress type defitions from cli/types +// to give us Cypress global types during our tests. +// Only needed for internal development +/// From b696fbbd45f7e0e6cdba6dff1796d75c4d3dfd29 Mon Sep 17 00:00:00 2001 From: Ben Kucera <14625260+Bkucera@users.noreply.github.com> Date: Wed, 10 Jun 2020 19:57:34 -0400 Subject: [PATCH 2/5] move internal-types to "types" folder, fix driver/index.d.ts --- packages/driver/cypress/ts/test-types.d.ts | 4 --- packages/driver/index.d.ts | 2 +- packages/driver/src/config/lodash.d.ts | 33 ------------------- .../driver/{ts => types}/internal-types.d.ts | 0 4 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 packages/driver/cypress/ts/test-types.d.ts delete mode 100644 packages/driver/src/config/lodash.d.ts rename packages/driver/{ts => types}/internal-types.d.ts (100%) diff --git a/packages/driver/cypress/ts/test-types.d.ts b/packages/driver/cypress/ts/test-types.d.ts deleted file mode 100644 index 4daafad4aa08..000000000000 --- a/packages/driver/cypress/ts/test-types.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// NOTE: this loads in the Cypress type defitions from cli/types -// to give us Cypress global types during our tests. -// Only needed for internal development -/// diff --git a/packages/driver/index.d.ts b/packages/driver/index.d.ts index 5557a6c2ad35..b814a4d928e4 100644 --- a/packages/driver/index.d.ts +++ b/packages/driver/index.d.ts @@ -1,4 +1,4 @@ -/// +/// /// export const $Cypress: Cypress.Cypress diff --git a/packages/driver/src/config/lodash.d.ts b/packages/driver/src/config/lodash.d.ts deleted file mode 100644 index 636b03e4e7b3..000000000000 --- a/packages/driver/src/config/lodash.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -// const _ = require('lodash') -import _ from 'lodash' - -import clean from 'underscore.string/clean' -import count from 'underscore.string/count' -import isBlank from 'underscore.string/isBlank' -import toBoolean from 'underscore.string/toBoolean' - -// only export exactly what we need, nothing more! -_.mixin({ - clean, - count, - isBlank, - toBoolean, -}) - -declare module 'lodash' { - export interface LoDashExplicitWrapper { - clean(...args): LoDashExplicitWrapper - count(...args): LoDashExplicitWrapper - isBlank(...args): LoDashExplicitWrapper - toBoolean(...args): LoDashExplicitWrapper - } - - export interface LodashStatic { - clean(...args): LoDashExplicitWrapper - count(...args): LoDashExplicitWrapper - isBlank(...args): LoDashExplicitWrapper - toBoolean(...args): LoDashExplicitWrapper - } -} - -export default _ diff --git a/packages/driver/ts/internal-types.d.ts b/packages/driver/types/internal-types.d.ts similarity index 100% rename from packages/driver/ts/internal-types.d.ts rename to packages/driver/types/internal-types.d.ts From 8882130d15877704145dd2d1bc211bbeea4612b7 Mon Sep 17 00:00:00 2001 From: Ben Kucera <14625260+Bkucera@users.noreply.github.com> Date: Thu, 11 Jun 2020 12:52:15 -0400 Subject: [PATCH 3/5] fix type-check in packages/runner. not exactly sure why --- packages/driver/index.d.ts | 10 +++++++++- packages/driver/tsconfig.json | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/driver/index.d.ts b/packages/driver/index.d.ts index b814a4d928e4..285a96bccf8f 100644 --- a/packages/driver/index.d.ts +++ b/packages/driver/index.d.ts @@ -1,4 +1,12 @@ -/// +/// +/// +/// +/// + +/// +/// +/// +/// /// export const $Cypress: Cypress.Cypress diff --git a/packages/driver/tsconfig.json b/packages/driver/tsconfig.json index 9255340ab9d0..f2ce24aef22f 100644 --- a/packages/driver/tsconfig.json +++ b/packages/driver/tsconfig.json @@ -19,5 +19,6 @@ "outDir": "dist", "esModuleInterop": true, "noErrorTruncation": true - } + }, + "exclude": ["dist"] } From 096bbf9eb0babccbe4a989f92803f59e34b9ef0f Mon Sep 17 00:00:00 2001 From: Ben Kucera <14625260+Bkucera@users.noreply.github.com> Date: Thu, 11 Jun 2020 13:27:39 -0400 Subject: [PATCH 4/5] fix runner type-check by excluding test folder in tsconfig --- packages/driver/index.d.ts | 10 +--------- packages/driver/tsconfig.json | 7 +++++-- packages/runner/jsconfig.json | 5 ----- packages/runner/tsconfig.json | 5 +++-- 4 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 packages/runner/jsconfig.json diff --git a/packages/driver/index.d.ts b/packages/driver/index.d.ts index 285a96bccf8f..b814a4d928e4 100644 --- a/packages/driver/index.d.ts +++ b/packages/driver/index.d.ts @@ -1,12 +1,4 @@ -/// -/// -/// -/// - -/// -/// -/// -/// +/// /// export const $Cypress: Cypress.Cypress diff --git a/packages/driver/tsconfig.json b/packages/driver/tsconfig.json index f2ce24aef22f..c7029cdbbe91 100644 --- a/packages/driver/tsconfig.json +++ b/packages/driver/tsconfig.json @@ -18,7 +18,10 @@ "allowSyntheticDefaultImports": true, "outDir": "dist", "esModuleInterop": true, - "noErrorTruncation": true + "noErrorTruncation": true, + "types": [] }, - "exclude": ["dist"] + "exclude": [ + "dist" + ] } diff --git a/packages/runner/jsconfig.json b/packages/runner/jsconfig.json deleted file mode 100644 index 504cd646e149..000000000000 --- a/packages/runner/jsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true - } -} diff --git a/packages/runner/tsconfig.json b/packages/runner/tsconfig.json index 0cee70cbaa64..0a551ff94e62 100644 --- a/packages/runner/tsconfig.json +++ b/packages/runner/tsconfig.json @@ -46,7 +46,7 @@ // "baseUrl": "../", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": ["../driver/src"], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "types": [], /* Type declaration files to be included in compilation. */ + "types": [], /* Type declaration files to be included in compilation. */ "allowSyntheticDefaultImports": true, "esModuleInterop": true, "noErrorTruncation": true, @@ -54,6 +54,7 @@ // "noResolve": true }, "exclude": [ - "dist" + "dist", + "test" ] } From e3257bfec326bdd074672f5858860fbb2b7f0cdc Mon Sep 17 00:00:00 2001 From: Ben Kucera <14625260+Bkucera@users.noreply.github.com> Date: Thu, 11 Jun 2020 13:48:52 -0400 Subject: [PATCH 5/5] bump timeout on e2e/8_error_ui_spec --- packages/server/test/e2e/8_error_ui_spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/test/e2e/8_error_ui_spec.ts b/packages/server/test/e2e/8_error_ui_spec.ts index 37ba21a227ca..43ac85af8da3 100644 --- a/packages/server/test/e2e/8_error_ui_spec.ts +++ b/packages/server/test/e2e/8_error_ui_spec.ts @@ -34,7 +34,7 @@ describe('e2e error ui', function () { e2e.it('displays correct UI for errors', { spec: 'various_failures_spec.js', expectedExitCode: VARIOUS_FAILURES_EXPECTED_FAILURES, - timeout: 180000, // 3 minutes + timeout: 240000, // 4 minutes noTypeScript: true, onRun (exec) { return exec().then(verifyPassedAndFailedAreSame(VARIOUS_FAILURES_EXPECTED_FAILURES)) @@ -44,7 +44,7 @@ describe('e2e error ui', function () { e2e.it('displays correct UI for errors in custom commands', { spec: 'various_failures_custom_commands_spec.js', expectedExitCode: VARIOUS_FAILURES_EXPECTED_FAILURES, - timeout: 180000, // 3 minutes + timeout: 240000, // 4 minutes noTypeScript: true, onRun (exec) { return exec().then(verifyPassedAndFailedAreSame(VARIOUS_FAILURES_EXPECTED_FAILURES))