mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Added automation
This commit is contained in:
parent
57dfbd6748
commit
d31da0a249
44 changed files with 7013 additions and 6 deletions
50
tests/cypress/support/request.commands.ts
Normal file
50
tests/cypress/support/request.commands.ts
Normal file
|
@ -0,0 +1,50 @@
|
|||
|
||||
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) => {
|
||||
cy.request({
|
||||
method: 'POST',
|
||||
url: '/api/v1/request/tv',
|
||||
body: {
|
||||
TvDbId: 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'),
|
||||
}
|
||||
});
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue