Test Overview
This test checks if clicking navigation links correctly changes the page URL and content. It verifies that routing works as expected in the web app.
This test checks if clicking navigation links correctly changes the page URL and content. It verifies that routing works as expected in the web app.
describe('Navigation Routing Test', () => { it('should navigate to About page and verify URL and content', () => { cy.visit('http://localhost:3000/') cy.get('nav').contains('About').click() cy.url().should('include', '/about') cy.get('h1').should('contain.text', 'About Us') }) })
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts | Test runner initialized, browser ready | - | PASS |
| 2 | Browser opens and visits 'http://localhost:3000/' | Home page loads with navigation bar visible | - | PASS |
| 3 | Find navigation bar and click 'About' link | User clicks About link in nav bar | - | PASS |
| 4 | Check that URL includes '/about' | Browser URL updated to include '/about' | URL contains '/about' | PASS |
| 5 | Verify page heading contains 'About Us' | About page content displayed with heading 'About Us' | Heading text is 'About Us' | PASS |