Click away iziToast message after login

Sometimes, the popup was covering the create-post button thus failing
some cypress tests locally.
This commit is contained in:
Robert Schäfer 2019-04-18 16:53:40 +02:00
parent 57a53a44b2
commit a1744d363c

View File

@ -46,7 +46,8 @@ Cypress.Commands.add('login', ({ email, password }) => {
cy.get('button[name=submit]')
.as('submitButton')
.click()
cy.location('pathname').should('eq', '/') // we're in!
cy.get('.iziToast-message').should('contain', 'You are logged in!')
cy.get('.iziToast-close').click()
})
Cypress.Commands.add('logout', (email, password) => {