externalFilterBar <NET>
Hierarchy
- InteractionObject<NET>
- FilterBar
Index
Constructors
Methods
Constructors
externalconstructor
Type parameters
- NET
Parameters
externalrootElement: PageElement<NET> | QuestionAdapter<PageElement<NET>>
externaloptionaloptions: InteractionObjectOptions
Returns FilterBar<NET>
Methods
externalfilterLabels
The labels of all filter chips in the bar (e.g.
['All', 'Passed', 'Failed', 'Pending']).Returns the visible text of every chip regardless of its pressed state.
Example
await actor.attemptsTo(
Ensure.that(filterBar.filterLabels(), equals(['All', 'Passed', 'Failed', 'Pending', 'Skipped'])),
);Returns Question<Promise<string[]>>
externalactiveFilters
The labels of currently pressed (active) filter chips.
Only returns chips where
aria-pressed="true", indicating the filter is actively narrowing results.Example
await actor.attemptsTo(
filterBar.selectFilter('Failed'),
Ensure.that(filterBar.activeFilters(), equals(['Failed'])),
);Returns Question<Promise<string[]>>
externalselectFilter
Clicks a filter chip by its label text to toggle the filter on or off.
Uses PEQL substring matching — the label doesn't need to be an exact match.
Example
await actor.attemptsTo(
filterBar.selectFilter('Failed'),
Ensure.that(filterBar.activeFilters(), equals(['Failed'])),
);Parameters
externallabel: Answerable<string>
The filter chip label to click (e.g.
'Failed','Passed','Pending')
Returns Task
externalselectedSort
The current value of the sort dropdown (e.g.
'name','duration','outcome').Example
await actor.attemptsTo(
Ensure.that(filterBar.selectedSort(), equals('name')),
);Returns QuestionAdapter<string>
externallabel
The filter bar's heading text (e.g.
'FILTER BY OUTCOME').Example
await actor.attemptsTo(
Ensure.that(filterBar.label(), equals('FILTER BY OUTCOME')),
);Returns QuestionAdapter<string>
externalisPresent
Checks whether the interaction object's root element is present in the DOM.
Since
InteractionObjectimplementsOptional, you can assert on presence directly:Ensure.that(view, isPresent())Returns Answerable<boolean>
Interaction object representing a bar of toggle filter chips used to narrow results by outcome (Passed, Failed, Pending, etc.).
A
FilterBaris composed into views like ScenariosView,ConsistencyView, andTagsView. It is not instantiated directly by tests — instead, views expose delegating methods likeselectFilter()at the view level. TheFilterBarinstance itself is accessible for component tests that exercise the filter chip API in isolation.Instantiation (within a parent interaction object)
Usage in a component test