2020-05-22 18:34:48 +02:00
|
|
|
describe('Auth', () => {
|
|
|
|
it('Logout', () => {
|
|
|
|
cy.get('[data-attr=user-options-dropdown]').trigger('mouseover')
|
|
|
|
cy.get('[data-attr=user-options-logout]').click()
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Logout and login', () => {
|
|
|
|
cy.get('[data-attr=user-options-dropdown]').trigger('mouseover')
|
|
|
|
cy.get('[data-attr=user-options-logout]').click()
|
|
|
|
|
2020-07-03 14:37:07 +02:00
|
|
|
cy.get('#inputEmail').type('fake@posthog.com').should('have.value', 'fake@posthog.com')
|
2020-05-22 18:34:48 +02:00
|
|
|
|
2020-07-03 14:37:07 +02:00
|
|
|
cy.get('#inputPassword').type('password').should('have.value', 'password')
|
2020-05-22 18:34:48 +02:00
|
|
|
|
|
|
|
cy.get('.btn').click()
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Try logging in improperly', () => {
|
|
|
|
cy.get('[data-attr=user-options-dropdown]').trigger('mouseover')
|
|
|
|
cy.get('[data-attr=user-options-logout]').click()
|
|
|
|
|
2020-07-03 14:37:07 +02:00
|
|
|
cy.get('#inputEmail').type('fake@posthog.com').should('have.value', 'fake@posthog.com')
|
2020-05-22 18:34:48 +02:00
|
|
|
|
2020-07-03 14:37:07 +02:00
|
|
|
cy.get('#inputPassword').type('wrong password').should('have.value', 'wrong password')
|
2020-05-22 18:34:48 +02:00
|
|
|
|
|
|
|
cy.get('.btn').click()
|
|
|
|
|
|
|
|
cy.get('[data-attr=login-error]').should('exist')
|
|
|
|
})
|
|
|
|
})
|