cy.get('.email-input')
cy.get('.test-email-input')
cy.get('[data-test="email-input"]')
cy.get('[data-test="email-input"]').type(testUser.email)
cy.get('[data-test="username-input"]').type(testUser.name)
cy.get('[data-test="password-input"]').type(testUser.password)
cy.contains('label', 'email', { matchCase: false }).click()
cy.focused()
.should('have.attr', 'type', 'email')
.type(testUser.email)
cy.contains('label', 'name', { matchCase: false }).click()
cy.focused()
.should('have.attr', 'type', 'text')
.type(testUser.name)
cy.contains('label', 'password', { matchCase: false }).click()
cy.focused()
.should('have.attr', 'type', 'password')
.type(testUser.password)
Cypress.Commands.add('input', (inputType, inputLabel) => {
inputLabel = inputLabel || inputType
cy.contains('label', inputLabel, { matchCase: false }).click()
return cy.focused().should('have.attr', 'type', inputType)
})
cy.input('email').type(testUser.email)
cy.input('text', 'name').type(testUser.name)
cy.input('password').type(testUser.password)
cy.get('[data-test="email-input"]').type(testUser.email)
cy.get('[data-test="username-input"]').type(testUser.name)
cy.get('[data-test="password-input"]').type(testUser.password)
cy.contains('button', 'Add to cart').click()
cy.route("GET", "api/products/1/inventory")
.as("getProductInventory")
.wait("@getProductInventory")
cy.wait(5000)
<button :disabled="isFetchingData" ...>
Add to cart
</button>
@chrisvfritz
slides.com/chrisvfritz/
adt-2020-03