mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-15 13:51:35 +00:00
add cypress tests
This commit is contained in:
parent
0cbcfbd273
commit
e8432d9a0d
34 changed files with 13497 additions and 56 deletions
25
cypress/support/e2e.js
Normal file
25
cypress/support/e2e.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
require('./commands')
|
||||
require('@cypress/code-coverage/support')
|
||||
|
||||
|
||||
before(() => {
|
||||
|
||||
if (Cypress.env('SEED_DATABASE')) {
|
||||
cy.exec('npm run cypress:prepare')
|
||||
}
|
||||
|
||||
// Set ADMIN_TOKEN from the value store in fixtures/token.json
|
||||
// This is set by initializeDatabase.
|
||||
cy.fixture('token.json').then((token) => {
|
||||
Cypress.env('ADMIN_TOKEN', 'Bearer ' + token.bearerToken)
|
||||
})
|
||||
|
||||
// Do a healthcheck
|
||||
cy.request({
|
||||
url: '/healthcheck/',
|
||||
method: 'GET',
|
||||
}).then((res) => {
|
||||
expect(res.status).to.eq(200)
|
||||
})
|
||||
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue