Pruebas E2E
Última actualización
describe('Given a user visits https://example.cypress.io', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io')
})
describe('when clicks the link labeled type', () => {
beforeEach(() => {
cy.contains('type').click()
})
describe('and type an email into the action-email input', () => {
beforeEach(() => {
// Get an input, type into it
cy.get('.action-email').type('[email protected]')
})
it('Then the url should include /commands/actions', () => {
// Should be on a new URL which
// includes '/commands/actions'
cy.url().should('include', '/commands/actions')
})
it('and the action-email input value should contain the typed email', () => {
// Verify that the value has been updated
cy.get('.action-email').should('have.value', '[email protected]')
})
})
})
})