externalKpiCard <NET>
Hierarchy
- InteractionObject<NET>
- KpiCard
Index
Constructors
Methods
Constructors
externalconstructor
Type parameters
- NET
Parameters
externalrootElement: PageElement<NET> | QuestionAdapter<PageElement<NET>>
externaloptionaloptions: InteractionObjectOptions
Returns KpiCard<NET>
Methods
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>
externallabel
The KPI metric name displayed on the card (e.g.
'PASS RATE','TOTAL SCENARIOS').Note:
text-transform: uppercasein CSS means the rendered text is uppercase regardless of the source markup.Example
await actor.attemptsTo(
Ensure.that(kpiCard.label(), equals('PASS RATE')),
);Returns QuestionAdapter<string>
externalvalue
The displayed metric value (e.g.
'93%','142','87.5').Example
await actor.attemptsTo(
Ensure.that(kpiCard.value(), equals('93%')),
);Returns QuestionAdapter<string>
externalsubtitle
Additional context displayed below the value (e.g.
'93 of 100 scenarios passed').Example
await actor.attemptsTo(
Ensure.that(kpiCard.subtitle(), includes('of 100 scenarios')),
);Returns QuestionAdapter<string>
externalaccessibleLabel
The
aria-labelattribute of the card's root element, providing an accessible description for assistive technology.Example
await actor.attemptsTo(
Ensure.that(kpiCard.accessibleLabel(), includes('Pass Rate: 93%')),
);Returns QuestionAdapter<string>
Interaction object representing a Key Performance Indicator card displaying a metric with label, value, and subtitle.
KPI cards appear on the Dashboard view, presenting at-a-glance metrics like pass rate, total scenarios, and confidence score. Each card is clickable and navigates to a filtered view of the relevant data.
A
KpiCardis not instantiated directly — it is obtained via a parent view's parameterised locator (e.g.dashboardView.kpiCardCalled('Pass Rate')).Usage in a test