Skip to content

Commit

Permalink
Atualização ref. seção 12 - aula 50 - exercício extra 2
Browse files Browse the repository at this point in the history
  • Loading branch information
gilsongs committed Oct 23, 2023
1 parent 29c437e commit dd1e31b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cypress/integration/CAC-TAT.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,22 @@ describe('Central de Atendimento ao Cliente TAT', function() {

cy.contains('Talking About Testing').should('be.visible')
})

it('exibe e esconde as mensagens de sucesso e erro usando o .invoke', () => {
cy.get('.success')
.should('not.be.visible')
.invoke('show')
.should('be.visible')
.and('contain', 'Mensagem enviada com sucesso.')
.invoke('hide')
.should('not.be.visible')
cy.get('.error')
.should('not.be.visible')
.invoke('show')
.should('be.visible')
.and('contain', 'Valide os campos obrigatórios!')
.invoke('hide')
.should('not.be.visible')
})
})

0 comments on commit dd1e31b

Please # to comment.