add cypress tests

This commit is contained in:
MxMarx 2023-10-21 21:47:04 -07:00
parent 0cbcfbd273
commit e8432d9a0d
34 changed files with 13497 additions and 56 deletions

25
cypress/support/e2e.js Normal file
View 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)
})
})