Skip to main content

externalScenarioItem <NET>

Interaction object representing a single scenario row in the ScenariosView.

A ScenarioItem is not instantiated directly — it is obtained via ScenariosView.scenarioCalled, which locates the matching row in the scenario list using PEQL filtering:

const scenario = scenariosView.scenarioCalled('Payment should reject an expired card');

From there, tests can observe the scenario's state (outcome, source location, error preview) and perform actions (view details, click tags).

Usage in a test

await actor.attemptsTo(
scenariosView.open(),
scenariosView.selectFilter('Failed'),
scenariosView.find('expired card'),

Ensure.that(scenariosView.scenarioCalled(failingTest).outcome(), equals('FAILURE')),
Ensure.that(scenariosView.scenarioCalled(failingTest).sourceLocation(), includes('checkout.spec.ts')),
Ensure.that(scenariosView.scenarioCalled(failingTest).errorPreview(), includes('Payment rejected')),
);

Hierarchy

Index

Constructors

externalconstructor

Methods

externalname

  • The scenario's display name.

    Example

    Ensure.that(scenario.name(), equals('Payment should reject an expired card'))

    Returns QuestionAdapter<string>

externaloutcome

  • The scenario's execution outcome (e.g. 'SUCCESS', 'FAILURE', 'PENDING').

    Reads the data-outcome attribute from the outcome badge element, which reflects the scenario's final execution result.

    Example

    Ensure.that(scenario.outcome(), equals('FAILURE'))

    Returns QuestionAdapter<string>

externalsourceLocation

  • The scenario's source file location (e.g. 'checkout.spec.ts:42').

    Example

    Ensure.that(scenario.sourceLocation(), includes('checkout.spec.ts'))

    Returns QuestionAdapter<string>

externalerrorPreview

  • The inline error preview shown for failed scenarios.

    This is the truncated error message visible in the scenario list row without navigating to the detail view.

    Example

    Ensure.that(scenario.errorPreview(), includes('Payment rejected'))

    Returns QuestionAdapter<string>

externalisPresent

  • Whether the scenario row is present in the DOM.

    Useful after filtering — verifies that a scenario appears (or doesn't) in the filtered results.

    Example

    await actor.attemptsTo(
    scenariosView.selectFilter('Failed'),
    Ensure.that(scenariosView.scenarioCalled('should pass').isPresent(), equals(false)),
    Ensure.that(scenariosView.scenarioCalled('should fail').isPresent(), equals(true)),
    );

    Returns Question<Promise<boolean>>

externaltagChipLabels

  • tagChipLabels(): Question<Promise<string[]>>
  • Labels of the tag chips displayed on the scenario row.

    Example

    Ensure.that(scenario.tagChipLabels(), contain('@smoke'))

    Returns Question<Promise<string[]>>

externalclickTag

  • clickTag(name: string): Task
  • Clicks a tag chip on the scenario row, triggering tag-based filtering.

    Example

    await actor.attemptsTo(
    scenario.clickTag('@checkout'),
    Ensure.that(scenariosView.scenarioCount(), equals(3)),
    );

    Parameters

    • externalname: string

      The tag label text to click (substring match)

    Returns Task

externalviewDetails

  • Clicks on the scenario name to navigate to the scenario detail view.

    Example

    await actor.attemptsTo(
    scenariosView.scenarioCalled('Payment should reject an expired card').viewDetails(),
    Ensure.that(scenarioDetailView.errorMessage(), includes('Card expired')),
    );

    Returns Task