This commit is contained in:
tidusjar 2022-12-02 12:27:46 +00:00
commit cd6b70f771
15 changed files with 3540 additions and 440 deletions

View file

@ -113,7 +113,7 @@ Cypress.Commands.add("getByData", (selector) => {
if (element.fireEvent) {
element.fireEvent('on' + event);
} else {
var evObj = document.createEvent('Events');
const evObj = document.createEvent('Events');
evObj.initEvent(event, true, false);

View file

@ -16,6 +16,7 @@
// Import commands.js using ES2015 syntax:
import './commands'
import './request.commands';
import './plex-settings.commands';
import "cypress-real-events/support";
import '@bahmutov/cy-api/support';

View file

@ -0,0 +1,12 @@
Cypress.Commands.add('clearPlexServers', () => {
cy.request({
method: 'POST',
url: '/api/v1/Settings/Plex/',
body: `{"enable":false,"enableWatchlistImport":false,"monitorAll":false,"installId":"0c5c597d-56ea-4f34-8f59-18d34ec82482","servers":[],"id":2}`,
headers: {
'Authorization': 'Bearer ' + window.localStorage.getItem('id_token'),
'Content-Type':"application/json"
}
})
})