Test Overview
This test uses an it block in Cypress to check if the homepage loads and contains the expected welcome text.
This test uses an it block in Cypress to check if the homepage loads and contains the expected welcome text.
describe('Homepage Tests', () => { it('should load the homepage and display welcome text', () => { cy.visit('https://example.cypress.io') cy.get('h1').should('contain.text', 'Kitchen Sink') }) })
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts with 'it' block named 'should load the homepage and display welcome text' | Test runner is ready to execute the test | - | PASS |
| 2 | Browser opens and navigates to 'https://example.cypress.io' | Browser shows the homepage of the Cypress example site | - | PASS |
| 3 | Finds the <h1> element on the page | The <h1> element with text 'Kitchen Sink' is visible | Check that <h1> contains text 'Kitchen Sink' | PASS |
| 4 | Assertion checks that the <h1> text includes 'Kitchen Sink' | Text matches expected content | cy.get('h1').should('contain.text', 'Kitchen Sink') | PASS |
| 5 | Test completes successfully | Test runner marks test as passed | - | PASS |