add admin login page at /login
This commit is contained in:
parent
f0da523ae4
commit
e8e7cf9ea9
7 changed files with 289 additions and 7 deletions
|
|
@ -27,13 +27,11 @@ describe('admin login page', () => {
|
|||
cy.get('[data-cy="login-error"]').should('be.visible')
|
||||
})
|
||||
|
||||
it('redirects to home on successful login', () => {
|
||||
cy.visit('/login')
|
||||
it('is not linked from any navigation element on the home page', () => {
|
||||
cy.visit('/')
|
||||
|
||||
cy.get('[data-cy="login-email"]').type('admin@example.com')
|
||||
cy.get('[data-cy="login-password"]').type('password123')
|
||||
cy.get('[data-cy="login-submit"]').click()
|
||||
|
||||
cy.url().should('eq', Cypress.config().baseUrl + '/')
|
||||
cy.get('header a').each(($link) => {
|
||||
cy.wrap($link).should('not.have.attr', 'href', '/login')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue