diff --git a/tests/cypress/support/e2e.ts b/tests/cypress/support/e2e.ts index 69b55842a..eebf39fdb 100644 --- a/tests/cypress/support/e2e.ts +++ b/tests/cypress/support/e2e.ts @@ -19,7 +19,7 @@ import './request.commands'; import './plex-settings.commands'; import './mock-data.commands'; import "cypress-real-events/support"; -import '@bahmutov/cypress-cucumber-preprocessor/support'; +import '@badeball/cypress-cucumber-preprocessor/cypress'; // Alternatively you can use CommonJS syntax: // require('./commands') diff --git a/tests/cypress/support/mock-data.commands.ts b/tests/cypress/support/mock-data.commands.ts index cee19af26..91993d6b2 100644 --- a/tests/cypress/support/mock-data.commands.ts +++ b/tests/cypress/support/mock-data.commands.ts @@ -1,3 +1,12 @@ +// Type definitions for mock data commands +declare global { + namespace Cypress { + interface Chainable { + addMock(mapping: any): Chainable; + clearMocks(): Chainable; + } + } +} Cypress.Commands.add('addMock', (mapping) => { cy.request({ @@ -12,4 +21,6 @@ Cypress.Commands.add('clearMocks', () => { method: 'DELETE', url: 'http://localhost:32400/__admin/mappings' }) -}) \ No newline at end of file +}) + +export {}; \ No newline at end of file diff --git a/tests/cypress/support/plex-settings.commands.ts b/tests/cypress/support/plex-settings.commands.ts index 859f80da2..0b8872729 100644 --- a/tests/cypress/support/plex-settings.commands.ts +++ b/tests/cypress/support/plex-settings.commands.ts @@ -1,3 +1,11 @@ +// Type definitions for plex settings commands +declare global { + namespace Cypress { + interface Chainable { + clearPlexServers(): Chainable; + } + } +} Cypress.Commands.add('clearPlexServers', () => { cy.request({ @@ -9,4 +17,6 @@ Cypress.Commands.add('clearPlexServers', () => { 'Content-Type':"application/json" } }) -}) \ No newline at end of file +}) + +export {}; \ No newline at end of file diff --git a/tests/cypress/support/request.commands.ts b/tests/cypress/support/request.commands.ts index 1d48d6f05..6496aa557 100644 --- a/tests/cypress/support/request.commands.ts +++ b/tests/cypress/support/request.commands.ts @@ -1,3 +1,14 @@ +// Type definitions for request commands +declare global { + namespace Cypress { + interface Chainable { + requestGenericMovie(): Chainable; + requestMovie(movieId: number): Chainable; + requestAllTv(tvId: number): Chainable; + removeAllMovieRequests(): Chainable; + } + } +} Cypress.Commands.add('requestGenericMovie', () => { cy.request({ @@ -47,4 +58,6 @@ Cypress.Commands.add('removeAllMovieRequests', () => { 'Authorization': 'Bearer ' + window.localStorage.getItem('id_token'), } }); -}) \ No newline at end of file +}) + +export {}; \ No newline at end of file diff --git a/tests/tsconfig.json b/tests/tsconfig.json index dfdb9bfea..1ee65506a 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -15,9 +15,7 @@ "types": [ "cypress", "cypress-wait-until", - "cypress-image-snapshot", "cypress-real-events", - "@bahmutov/cy-api", "node" ], "baseUrl": "./cypress",