try again

This commit is contained in:
tidusjar 2025-08-24 22:35:11 +01:00
commit ca8d998731
5 changed files with 38 additions and 6 deletions

View file

@ -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')

View file

@ -1,3 +1,12 @@
// Type definitions for mock data commands
declare global {
namespace Cypress {
interface Chainable {
addMock(mapping: any): Chainable<void>;
clearMocks(): Chainable<void>;
}
}
}
Cypress.Commands.add('addMock', (mapping) => {
cy.request({
@ -12,4 +21,6 @@ Cypress.Commands.add('clearMocks', () => {
method: 'DELETE',
url: 'http://localhost:32400/__admin/mappings'
})
})
})
export {};

View file

@ -1,3 +1,11 @@
// Type definitions for plex settings commands
declare global {
namespace Cypress {
interface Chainable {
clearPlexServers(): Chainable<void>;
}
}
}
Cypress.Commands.add('clearPlexServers', () => {
cy.request({
@ -9,4 +17,6 @@ Cypress.Commands.add('clearPlexServers', () => {
'Content-Type':"application/json"
}
})
})
})
export {};

View file

@ -1,3 +1,14 @@
// Type definitions for request commands
declare global {
namespace Cypress {
interface Chainable {
requestGenericMovie(): Chainable<void>;
requestMovie(movieId: number): Chainable<void>;
requestAllTv(tvId: number): Chainable<any>;
removeAllMovieRequests(): Chainable<void>;
}
}
}
Cypress.Commands.add('requestGenericMovie', () => {
cy.request({
@ -47,4 +58,6 @@ Cypress.Commands.add('removeAllMovieRequests', () => {
'Authorization': 'Bearer ' + window.localStorage.getItem('id_token'),
}
});
})
})
export {};

View file

@ -15,9 +15,7 @@
"types": [
"cypress",
"cypress-wait-until",
"cypress-image-snapshot",
"cypress-real-events",
"@bahmutov/cy-api",
"node"
],
"baseUrl": "./cypress",