mirror of
https://github.com/koel/koel
synced 2024-11-28 15:00:42 +00:00
19 lines
No EOL
586 B
JavaScript
19 lines
No EOL
586 B
JavaScript
describe('authentication', () => {
|
|
it('requires login', () => {
|
|
cy.visit('/')
|
|
cy.get('[data-cy=loginForm]').should('be.visible')
|
|
})
|
|
|
|
it('logs in with valid username and password', () => {
|
|
cy.login()
|
|
cy.get('[data-cy=appHeader]').should('be.visible')
|
|
})
|
|
|
|
it('logs out', () => {
|
|
cy.login()
|
|
cy.route('DELETE', '/api/me', [])
|
|
cy.get('[data-cy=btnLogOut]').click({ force: true }) // https://github.com/cypress-io/cypress/issues/695
|
|
cy.get('[data-cy=loginForm]').should('be.visible')
|
|
cy.get('[data-cy=appHeader]').should('not.be.visible')
|
|
})
|
|
}) |