diff --git a/cypress/integration/actions.spec.js b/cypress/integration/actions.spec.ts similarity index 100% rename from cypress/integration/actions.spec.js rename to cypress/integration/actions.spec.ts diff --git a/cypress/integration/diagramUpdate.spec.js b/cypress/integration/diagramUpdate.spec.ts similarity index 100% rename from cypress/integration/diagramUpdate.spec.js rename to cypress/integration/diagramUpdate.spec.ts diff --git a/cypress/integration/history.spec.js b/cypress/integration/history.spec.ts similarity index 100% rename from cypress/integration/history.spec.js rename to cypress/integration/history.spec.ts diff --git a/cypress/integration/loadSite.spec.js b/cypress/integration/loadSite.spec.ts similarity index 100% rename from cypress/integration/loadSite.spec.js rename to cypress/integration/loadSite.spec.ts diff --git a/cypress/support/commands.js b/cypress/support/commands.ts similarity index 80% rename from cypress/support/commands.js rename to cypress/support/commands.ts index fe152463..c80aaf8d 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.ts @@ -23,6 +23,15 @@ // // -- This will overwrite an existing command -- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) -import * as snapshot from '@cypress/snapshot'; -snapshot.register(); +import { register } from '@cypress/snapshot'; +register(); +declare global { + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace Cypress { + interface Chainable { + snapshot(): void; + } + } +} + import 'cypress-localstorage-commands'; diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 3398fd57..77501744 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -3,5 +3,5 @@ "allowJs": true, "types": ["cypress", "cypress-localstorage-commands"] }, - "include": ["**/*.*"] + "include": ["**/*.ts"] }