diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index 25a3b6a7e..3c32df517 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -42,9 +42,6 @@ // -- This will overwrite an existing command -- // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) -'use strict' - -import '../../node_modules/cypress-wait-until'; import { PageIdleDetector } from './PageIdleDetector'; import { mockWebSocket } from './websocket'; diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index 71e9ea589..8b9e29027 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -14,6 +14,7 @@ // *********************************************************** // When a command from ./commands is ready to use, import with `import './commands'` syntax +import 'cypress-wait-until'; import './commands'; import failOnConsoleError from 'cypress-fail-on-console-error'; diff --git a/frontend/cypress/tsconfig.json b/frontend/cypress/tsconfig.json index 8f044958a..20e0cc894 100644 --- a/frontend/cypress/tsconfig.json +++ b/frontend/cypress/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../tsconfig.json", "include": ["**/*.ts"], "compilerOptions": { - "types": ["cypress"], + "types": ["cypress", "node", "cypress-wait-until"], "lib": ["es2015", "dom"], "allowJs": true, "noEmit": true, diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d82eecd5b..97c023be0 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -58,6 +58,7 @@ }, "optionalDependencies": { "@cypress/schematic": "^2.5.0", + "@types/cypress": "^1.1.3", "cypress": "^12.17.2", "cypress-fail-on-console-error": "~4.0.3", "cypress-wait-until": "^2.0.0", @@ -3925,6 +3926,16 @@ "@types/node": "*" } }, + "node_modules/@types/cypress": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-1.1.3.tgz", + "integrity": "sha512-OXe0Gw8LeCflkG1oPgFpyrYWJmEKqYncBsD/J0r17r0ETx/TnIGDNLwXt/pFYSYuYTpzcq1q3g62M9DrfsBL4g==", + "deprecated": "This is a stub types definition for cypress (https://cypress.io). cypress provides its own type definitions, so you don't need @types/cypress installed!", + "optional": true, + "dependencies": { + "cypress": "*" + } + }, "node_modules/@types/eslint": { "version": "8.4.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz", @@ -18866,6 +18877,15 @@ "@types/node": "*" } }, + "@types/cypress": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-1.1.3.tgz", + "integrity": "sha512-OXe0Gw8LeCflkG1oPgFpyrYWJmEKqYncBsD/J0r17r0ETx/TnIGDNLwXt/pFYSYuYTpzcq1q3g62M9DrfsBL4g==", + "optional": true, + "requires": { + "cypress": "*" + } + }, "@types/eslint": { "version": "8.4.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index db6ee0f3a..7f6f34060 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -110,6 +110,7 @@ }, "optionalDependencies": { "@cypress/schematic": "^2.5.0", + "@types/cypress": "^1.1.3", "cypress": "^12.17.2", "cypress-fail-on-console-error": "~4.0.3", "cypress-wait-until": "^2.0.0",