Complete the code to visit the homepage in a Cypress test.
cy.[1]('https://example.com')
The visit command loads a page in Cypress. Here, it opens the homepage URL.
Complete the code to check if the page contains the text 'Welcome'.
cy.contains('[1]')
contains.The contains command looks for the text 'Welcome' on the page.
Fix the error in the code to click a button with id 'submit-btn'.
cy.get('#submit-btn').[1]()
The click command simulates a mouse click on the button.
Fill both blanks to check if an input with name 'email' is visible and then type an email address.
cy.get('input[name="email"]').[1]('be.visible').[2]('user@example.com')
First, should checks visibility, then type enters the email.
Fill all three blanks to write a test that visits the page, clicks a button with class 'start', and checks if the URL includes '/dashboard'.
cy.[1]('https://example.com') cy.get('.start').[2]() cy.url().[3]('include', '/dashboard')
The test visits the URL, clicks the start button, then asserts the URL includes '/dashboard' using should.