Skip to content

Commit 7612841

Browse files
committed
Test login form
1 parent 1ccc23f commit 7612841

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/webapp/cypress/e2e/login.cy.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
describe('login process', () => {
2+
3+
it('login as simple user', () => {
4+
// go to login page
5+
cy.visit('/login')
6+
cy.get('#input-email').type('user@user.com')
7+
cy.get('#input-password').type('user')
8+
cy.get('button[type=submit]').click()
9+
10+
// we should be redirected to /dashboard
11+
cy.url().should('include', '/dashboard')
12+
})
13+
14+
15+
it('login as admin', () => {
16+
// go to login page
17+
cy.visit('/login')
18+
cy.get('#input-email').type('admin@admin.com')
19+
cy.get('#input-password').type('admin')
20+
cy.get('button[type=submit]').click()
21+
22+
// we should be redirected to /dashboard
23+
cy.url().should('include', '/dashboard')
24+
})
25+
})

0 commit comments

Comments
 (0)