Complete the code to start a Cypress test that runs in the browser.
describe('My First Test', () => { it('Visits the Kitchen Sink', () => { cy.[1]('https://example.cypress.io') }) })
The cy.visit() command loads a web page in the browser where Cypress runs the test.
Complete the code to select an element by its CSS class in Cypress.
cy.[1]('.btn-primary').click()
The cy.get() command selects elements by CSS selectors in the browser.
Fix the error in the Cypress command to wait for 2 seconds.
cy.[1](2000)
The correct Cypress command to pause test execution is cy.wait() with milliseconds.
Fill both blanks to assert that an element contains specific text in Cypress.
cy.get('.message').[1]('contain', 'Hello World').[2]('be.visible')
In Cypress, should() is used to make assertions about elements, such as text content and visibility.
Fill all three blanks to create a custom command in Cypress that logs in a user.
Cypress.Commands.[1]('login', (email, password) => { cy.get('[2]').type(email) cy.get('[3]').type(password) })
Use Cypress.Commands.add() to create custom commands. The selectors #email-input and #password-input target input fields by their IDs.