|
1234567891011121314151617181920212223242526 |
- describe('login', () => {
- beforeEach(() => {
- cy
- .visit('/api/auth/logout')
- })
-
- it('should log the current user in', () => {
- cy
- .visit('/api/auth/login')
-
- cy
- .get('input[name="email"]')
- .type(Cypress.env('USERNAME'))
-
- cy
- .get('input[name="password"]')
- .type(Cypress.env('PASSWORD'))
-
- cy
- .get('form')
- .submit()
- .wait(3000)
- .location('href')
- .should('equal', 'http://localhost:3000')
- })
- })
|