externalNavigation
Index
Constructors
Methods
Constructors
externalconstructor
Returns Navigation
Methods
externalsummaryLink
The
hrefattribute of the<link rel="alternate">element pointing to the machine-readablesummary.jsonfile.Example
await actor.attemptsTo(
Ensure.that(navigation.summaryLink(), includes('summary.json')),
);Returns QuestionAdapter<string>
externalsummaryLinkTitle
The
titleattribute of the<link rel="alternate">element forsummary.json.Example
await actor.attemptsTo(
Ensure.that(navigation.summaryLinkTitle(), equals('Test results summary (JSON)')),
);Returns QuestionAdapter<string>
externalopenView
Navigates to a view by clicking its sidebar navigation item.
On mobile viewports where the sidebar is hidden, this opens the hamburger menu first, then clicks the nav item. Waits until the route has changed before completing.
Example
await actor.attemptsTo(
navigation.openView('Test Scenarios'),
Ensure.that(scenariosView.scenarioCount(), isGreaterThan(0)),
);Parameters
externalviewName: Answerable<string>
The visible text of the sidebar navigation item (e.g.
'Dashboard','Test Scenarios','Capabilities','Consistency')
Returns Task
externalselectTheme
Switches the report's colour theme via the sidebar theme toggle.
On mobile viewports where the sidebar is hidden, this opens the hamburger menu first before interacting with the theme switcher.
Example
await actor.attemptsTo(
navigation.selectTheme('dark'),
);Parameters
externalpreference: string
The theme to activate (e.g.
'light','dark','system')
Returns Task
Interaction object for navigating between views via the sidebar.
Unlike most interaction objects in the HTML reporter,
Navigationdoes not extend InteractionObject — it operates on global page elements (the sidebar, hamburger menu, theme toggle) rather than a scoped root element.Handles responsive navigation transparently: on mobile viewports where the sidebar is hidden behind a hamburger menu,
openView()andselectTheme()open the menu first before interacting with navigation items.Instantiation
Usage in a test
Wiring into view interaction objects
Views typically accept a
Navigationinstance and delegate via anopen()method: