I am trying to write short test cypress for this test, how the best way to write it ?
describe('test', () => {
it('test 1', () => {
cy.get('[data-cy=edit]').first().click()
cy.get('[data-cy=t-input]').clear().type('123123123123123')
cy.get('[data-cy=s-button]').click()
cy.get('[data-cy=popup]').should('be.visible')
})
it('test2', () => {
cy.get('[data-cy=edit]').first().click()
cy.get('[data-cy=t-input]').clear().type('1231231231231216')
cy.get('[data-cy=s-button]').click()
cy.get('[data-cy=c-div]').find('div')
.should('have.class', 'error')
.and('exist')
})
})