Skip to content

Comments

Playwright test for navigation flow#2114

Merged
Onibenjo merged 5 commits intomainfrom
WD-24182/e2e-navigation
Dec 5, 2025
Merged

Playwright test for navigation flow#2114
Onibenjo merged 5 commits intomainfrom
WD-24182/e2e-navigation

Conversation

@Onibenjo
Copy link
Contributor

@Onibenjo Onibenjo commented Dec 5, 2025

Done

Add e2e playwright test flow for navigation

[Driveby]:

  • README file added with some docs about the tests

QA

  • Check out the workflow and see it passes
  • You can also checkout the branch and run the test locally with yarn test-e2e
  • Run through the following QA steps
  • [List additional steps to QA the new features or prove the bug has been resolved]

Issue / Card

Fixes # https://warthogs.atlassian.net/browse/WD-24182

Screenshots

[if relevant, include a screenshot]

@webteam-app
Copy link

@Onibenjo Onibenjo force-pushed the WD-24182/e2e-navigation branch from 2ff0d70 to c86887e Compare December 5, 2025 00:07
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.20%. Comparing base (15dd033) to head (7ed9f73).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2114   +/-   ##
=======================================
  Coverage   77.20%   77.20%           
=======================================
  Files          16       16           
  Lines        1676     1676           
=======================================
  Hits         1294     1294           
  Misses        382      382           
Flag Coverage Δ
python 77.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Onibenjo Onibenjo force-pushed the WD-24182/e2e-navigation branch from 514c6d9 to 71abda2 Compare December 5, 2025 00:27
@Onibenjo Onibenjo changed the title Wd 24182/e2e navigation Playwright test for navigation flow Dec 5, 2025
@Onibenjo Onibenjo force-pushed the WD-24182/e2e-navigation branch from a0e2cda to e45ee1b Compare December 5, 2025 03:00
@Onibenjo Onibenjo requested a review from Copilot December 5, 2025 03:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive end-to-end Playwright tests for the Canonical.com navigation system, covering primary navigation, dropdowns, search functionality, secondary navigation, mobile behavior, responsive design, and accessibility features.

Key Changes

  • Added 426 lines of navigation test coverage across multiple test suites (structure, interactions, search, mobile, responsive, accessibility)
  • Created reusable navigation helper functions and constants for test maintainability
  • Enhanced HTML navigation template with accessibility improvements (aria-labels) and test-friendly IDs
  • Updated Playwright configuration to support multiple test projects with separate test directories

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tests/playwright/tests/navigation/navigation-flows.spec.ts Main test file containing comprehensive E2E test suites for navigation flows, covering primary navigation structure, dropdown interactions, search functionality, secondary navigation, cross-linking, mobile behavior, responsive design, and accessibility
tests/playwright/helpers/navigation-helpers.ts Helper functions and constants for navigation testing including viewport configurations, navigation items, and utility functions for interactions
tests/playwright/tests/navigation/README.md Documentation describing test coverage, helper functions, viewport testing, and maintenance guidelines
templates/navigation/navigation.html Added IDs to search buttons (mobile/desktop) and aria-labels to search form buttons for improved accessibility and testability
playwright.config.ts Updated test directory from forms-specific to general tests directory and added separate projects for forms and navigation test suites
package.json Added test-e2e npm script for running Playwright tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Onibenjo Onibenjo requested a review from britneywwc December 5, 2025 09:47
@samhotep
Copy link
Member

samhotep commented Dec 5, 2025

@Onibenjo works well! I've just left a few comments

@Onibenjo Onibenjo removed the request for review from britneywwc December 5, 2025 14:34
@Onibenjo Onibenjo force-pushed the WD-24182/e2e-navigation branch from 7796470 to dbff677 Compare December 5, 2025 14:34
@Onibenjo Onibenjo requested a review from samhotep December 5, 2025 14:36
Add comprehensive end-to-end tests for the navigation system including:
- Primary navigation structure and accessibility
- Dropdown interactions for all menu items
- Search functionality testing
- Secondary navigation validation
- Responsive behavior across multiple viewports
- Accessibility and keyboard navigation
- Error handling scenarios

Includes test helpers and configuration updates to support the new test suite.
The mobile small viewport was removed as it's no longer needed for testing, while tablet landscape was added to improve test coverage for tablet devices
@Onibenjo Onibenjo force-pushed the WD-24182/e2e-navigation branch from de8bd04 to 7ed9f73 Compare December 5, 2025 14:45
@samhotep
Copy link
Member

samhotep commented Dec 5, 2025

LGTM!

@Onibenjo Onibenjo merged commit e037a42 into main Dec 5, 2025
12 checks passed
@Onibenjo Onibenjo deleted the WD-24182/e2e-navigation branch December 5, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants