Skip to content

Commit 537ed94

Browse files
committed
Test logout process
1 parent 7cfe50c commit 537ed94

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
describe('Log out process', () => {
2+
it('Log out', () => {
3+
// go to login page
4+
cy.visit('/login')
5+
cy.get('#input-email').type('admin@admin.com')
6+
cy.get('#input-password').type('admin')
7+
cy.get('button[type=submit]').click()
8+
9+
// we should be redirected to /dashboard
10+
cy.url()
11+
.should('include', '/dashboard')
12+
.then(() => {
13+
// dropdown user menu
14+
cy.get('li.nav-item.b-nav-dropdown a[role=button]')
15+
.first()
16+
.click()
17+
.then(() => {
18+
// click on log out button
19+
cy.get(':nth-child(2) > .dropdown-item').click()
20+
})
21+
})
22+
})
23+
})

0 commit comments

Comments
 (0)