-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
The current Nav block tests have grown overly complex and are flaky. These types of tests should be optimised for testing the critical paths to provide confidence that these features continue to work.
Let's rework the tests as follows to provide greater utilility:
- Migrate to Playwright - provides a more stable foundation.
- Rewrite to focus on critical user journeys only.
We should end up with a small set of tests which are:
- reliable
- provide confidence
- run (relatively) quickly
- are easy to extend/augment
User stories
First test that we can add the block
- As a user I want to create an empty menu to replace an existing menu in a navigation block
- As a user I want to build my navigation manually using internal links (we should test external links on the link component instead of the navigation block suite)
- As a user I want to insert blocks that are not navigation links in the navigation (one test per possible block)
Submenus
- As a user I want to create submenus using the navigation block #45201
- As a user I want to change how visitors interact with the submenus
Tests
-
change how submenus open
-
As a user I want to style my submenus different than the menu they're in
Tests
- set submenu specific typography style
- set submenu specific background color
Page creation
- As a user I want to create pages from the navigation block if they don’t exist.
Multiple menu management
- Create the user stories because we have none yet
Patterns
- As a user I want demo navigation items in a pattern, even if I have existing menus
- As a user I want to be able to modify demo content in a pattern
Permissions
- As a user I want to see a warning if I don’t have permission to create a navigation menu
- As a user I want to see a warning if I don’t have permission to edit a navigation menu
- As a user I don’t want to see the delete button if I don’t have permission to delete a navigation menu
Fallbacks
Overlay
- As a user I want to set up an overlay variant of the navigation block
- As a user I want to change the colors of the submenu and overlay
Loading states
- As a user I don’t want to see loading indicator for demo content in the navigation block
- As a user I want to see loading indicator when menu data is unavailable yet
- As a user I want to see a warning if the menu referenced by a navigation block is not available
Color handling
Themes
- As a theme I want the navigation block to render an accessible aria label
- As a theme I want the navigation view script to only load if there is a rendered navigation block on screen
Developer stories:
- As a developer I want to set the nesting level of the navigation block (maybe a unit test?)
- As a plugin developer I want my custom placehol
Metadata
Metadata
Assignees
Labels
[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Type] EnhancementA suggestion for improvement.A suggestion for improvement.