Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reinink committed Jul 28, 2023
1 parent 0e73e84 commit 97821e6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/vue2/tests/cypress/integration/form-helper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ describe('Form Helper', () => {
cy.get('#remember').should('be.checked')
})

it('does not reset errors when it resets a field to its initial value', () => {
it('resets error when it resets a field to its initial value', () => {
cy.get('#name').clear().type('A')
cy.get('#handle').clear().type('B')
cy.get('#remember').check()
Expand All @@ -361,11 +361,11 @@ describe('Form Helper', () => {
cy.get('#remember').should('be.checked')
cy.get('.errors-status').should('have.text', 'Form has errors')
cy.get('.name_error').should('have.text', 'Some name error')
cy.get('.handle_error').should('have.text', 'The Handle was invalid')
cy.get('.handle_error').should('not.exist')
cy.get('.remember_error').should('not.exist')
})

it('does not reset errors when it resets all fields to their initial values', () => {
it('reset errors when it resets all fields to their initial values', () => {
cy.get('#name').clear().type('A')
cy.get('#handle').clear().type('B')
cy.get('#remember').check()
Expand All @@ -379,14 +379,14 @@ describe('Form Helper', () => {
cy.get('.name_error').should('have.text', 'Some name error')
cy.get('.handle_error').should('have.text', 'The Handle was invalid')

cy.get('.reset-one').click()
cy.get('.reset').click()

cy.get('#name').should('have.value', 'A')
cy.get('#name').should('have.value', 'foo')
cy.get('#handle').should('have.value', 'example')
cy.get('#remember').should('be.checked')
cy.get('.errors-status').should('have.text', 'Form has errors')
cy.get('.name_error').should('have.text', 'Some name error')
cy.get('.handle_error').should('have.text', 'The Handle was invalid')
cy.get('#remember').should('not.be.checked')
cy.get('.errors-status').should('have.text', 'Form has no errors')
cy.get('.name_error').should('not.exist')
cy.get('.handle_error').should('not.exist')
cy.get('.remember_error').should('not.exist')
})

Expand Down

0 comments on commit 97821e6

Please sign in to comment.