Complete the code to start a Cypress test with a descriptive block.
describe('[1]', () => { it('checks page title', () => { cy.visit('https://example.com') cy.title().should('include', 'Example') }) })
The describe block groups related tests under a descriptive name, organizing assertions clearly.
Complete the code to write a single test case inside the describe block.
describe('Homepage tests', () => { [1]('should load the homepage', () => { cy.visit('/') cy.get('h1').should('be.visible') }) })
The it block defines a single test case with assertions inside.
Fix the error in the assertion to check if the button is enabled.
it('checks submit button', () => { cy.get('button.submit').should([1]) })
The correct assertion is should('be.enabled') to check if the button is enabled.
Fill both blanks to organize multiple assertions inside a test case.
it('checks multiple elements', () => { cy.get('input#name').should([1]) cy.get('input#email').should([2]) })
Use should('be.visible') to check visibility and should('exist') to check presence in the DOM.
Fill all three blanks to write a test that checks text content and button state.
it('validates form elements', () => { cy.get('label[for="username"]').should([1], 'username') cy.get('input#username').should([2]) cy.get('button.submit').should([3]) })
The label should contain.text, the input should exist, and the button should be be.enabled.