Skip to content

Commit a0e2cda

Browse files
committed
docs(playwright): update navigation test documentation
1 parent b232fcf commit a0e2cda

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/playwright/tests/navigation/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This directory contains end-to-end tests for the Canonical.com navigation system
1414
- **Click Interactions**: Tests dropdown behavior on mobile/touch devices
1515
- **Link Validation**: Verifies all dropdown links are functional and lead to valid pages
1616
- **Content Verification**: Ensures dropdown content matches navigation.yaml structure
17-
- **Closing Behavior**: Verifies dropdown collapses when clicking outside the navigation
17+
- **Closing Behavior**: Verifies dropdown collapses when clicking the same item or outside the navigation
1818
- **ARIA Buttons**: Ensures dropdown buttons have `aria-controls` and `tabindex="0"`
1919

2020
### Search Functionality Tests
@@ -86,7 +86,7 @@ npx playwright test --project=navigation --reporter=html
8686

8787
You can also generate an HTML report using the script:
8888
```bash
89-
./scripts/test-navigation.sh --suite navigation --reporter html
89+
./scripts/e2e-test.sh --suite navigation --reporter html
9090
```
9191

9292
## Test Data Sources
@@ -107,14 +107,12 @@ Core data and constants:
107107
Navigation helpers:
108108
- `acceptCookiePolicy()`: Handles cookie consent banner
109109
- `navigateToHomepage()`: Navigates to the homepage and prepares clean state
110-
- `waitForNavigationLoad()`: Ensures navigation is fully loaded
111110
- `isElementVisible()`: Convenience visibility check for selectors
112111
- `isMobileViewport()`: Returns true if current viewport is mobile-sized
113-
- `openMobileMenuIfNeeded()` / `closeMobileMenu()`: Mobile menu controls
114-
- `openNavigationDropdown()`: Opens dropdowns by clicking `.js-dropdown-button`
112+
- `toggleMobileMenuIfNeeded()`: Toggles the mobile menu when in mobile viewport
115113
- `clickNavigationItem()`: Clicks a primary navigation item
116114
- `isDropdownOpen()`: Checks if a dropdown is currently expanded
117-
- `getDropdownLinks()`: Extracts dropdown link texts and hrefs
115+
- `getDropdownLinks()`: Extracts dropdown link texts (first few links validated for href)
118116
- `clickSearchButton()`: Opens the search overlay via the toolbar button
119117
- `testSearchFunctionality()`: Performs a search and validates navigation
120118
- `hasSecondaryNavigation()` / `getSecondaryNavigationItems()`: Secondary menu helpers

0 commit comments

Comments
 (0)