mirror of
https://github.com/Ombi-app/Ombi.git
synced 2024-11-23 05:50:09 -08:00
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
|
|
Cypress.Commands.add('requestGenericMovie', () => {
|
|
cy.request({
|
|
method: 'POST',
|
|
url: '/api/v1/request/movie',
|
|
body: {
|
|
TheMovieDbId: 299536
|
|
},
|
|
headers: {
|
|
'Authorization': 'Bearer ' + window.localStorage.getItem('id_token'),
|
|
}
|
|
})
|
|
})
|
|
|
|
Cypress.Commands.add('requestMovie', (movieId) => {
|
|
cy.request({
|
|
method: 'POST',
|
|
url: '/api/v1/request/movie',
|
|
body: {
|
|
TheMovieDbId: movieId
|
|
},
|
|
headers: {
|
|
'Authorization': 'Bearer ' + window.localStorage.getItem('id_token'),
|
|
}
|
|
})
|
|
})
|
|
|
|
Cypress.Commands.add('requestAllTv', (tvId) => {
|
|
return cy.request({
|
|
method: 'POST',
|
|
url: '/api/v2/requests/tv',
|
|
body: {
|
|
TheMovieDbId: tvId,
|
|
RequestAll: true
|
|
},
|
|
headers: {
|
|
'Authorization': 'Bearer ' + window.localStorage.getItem('id_token'),
|
|
}
|
|
});
|
|
})
|
|
|
|
Cypress.Commands.add('removeAllMovieRequests', () => {
|
|
cy.request({
|
|
method: 'DELETE',
|
|
url: '/api/v1/request/movie/all',
|
|
headers: {
|
|
'Authorization': 'Bearer ' + window.localStorage.getItem('id_token'),
|
|
}
|
|
});
|
|
}) |