test coverage on the plex settings page

This commit is contained in:
tidusjar 2022-12-02 15:37:32 +00:00
commit dc0a66f4d8
9 changed files with 142 additions and 19 deletions

View file

@ -17,6 +17,7 @@
import './commands'
import './request.commands';
import './plex-settings.commands';
import './mock-data.commands';
import "cypress-real-events/support";
import '@bahmutov/cy-api/support';

View file

@ -0,0 +1,15 @@
Cypress.Commands.add('addMock', (mapping) => {
cy.request({
method: 'POST',
url: 'http://localhost:32400/__admin/mappings',
body: mapping
})
})
Cypress.Commands.add('clearMocks', () => {
cy.request({
method: 'DELETE',
url: 'http://localhost:32400/__admin/mappings'
})
})