externalTestRunsView <NET>
Hierarchy
- InteractionObject<NET>
- TestRunsView
Index
Constructors
Methods
- isPresent
- bodyText
- runCount
- hasTrendChart
- hasDetailsPanel
- detailsPanelTitle
- detailsPanelText
- detailsCtaText
- commitLinkText
- commitLinkHref
- hasModuleTable
- moduleNames
- currentRunId
- clickChart
- clickChartBar
- selectRun
- clickDetailsCtaButton
- dismissDetailsPanel
- clickModuleName
- clickModulePassedCount
- clickModuleFailedCount
- clickModuleSkippedCount
- moduleUrl
- open
Constructors
externalconstructor
Type parameters
- NET
Parameters
externalrootElement: PageElement<NET> | QuestionAdapter<PageElement<NET>>
externalnavigation: Navigation = ...
Returns TestRunsView<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>
externalbodyText
The full body text of the test runs view container.
Example
Ensure.that(testRunsView.bodyText(), includes('Test Runs'))Returns QuestionAdapter<string>
externalrunCount
The number of test run rows currently displayed in the list.
Example
Ensure.that(testRunsView.runCount(), equals(5))Returns Question<Promise<number>>
externalhasTrendChart
Whether the trend chart canvas element is present.
Example
Ensure.that(testRunsView.hasTrendChart(), equals(true))Returns Question<Promise<boolean>>
externalhasDetailsPanel
Whether the run details panel is currently visible.
The panel appears when a run is selected via the chart or the run list.
Example
await actor.attemptsTo(
testRunsView.selectRun(0),
Ensure.that(testRunsView.hasDetailsPanel(), equals(true)),
);Returns Question<Promise<boolean>>
externaldetailsPanelTitle
The title text of the run details panel (typically the run timestamp).
Example
Ensure.that(testRunsView.detailsPanelTitle(), includes('2024-'))Returns QuestionAdapter<string>
externaldetailsPanelText
The full text content of the run details panel.
Example
Ensure.that(testRunsView.detailsPanelText(), includes('modules'))Returns QuestionAdapter<string>
externaldetailsCtaText
The text of the call-to-action button in the run details panel.
Example
Ensure.that(testRunsView.detailsCtaText(), equals('View Test Run'))Returns QuestionAdapter<string>
externalcommitLinkText
The displayed commit link text (typically a short SHA).
Example
Ensure.that(testRunsView.commitLinkText(), equals('abc1234'))Returns QuestionAdapter<string>
externalcommitLinkHref
The
hrefattribute of the commit link.Example
Ensure.that(testRunsView.commitLinkHref(), includes('/commit/abc1234'))Returns QuestionAdapter<string>
externalhasModuleTable
Whether the module table is present in the run details panel.
Example
Ensure.that(testRunsView.hasModuleTable(), equals(true))Returns Question<Promise<boolean>>
externalmoduleNames
The module names displayed in the details panel's module table.
Example
Ensure.that(testRunsView.moduleNames(), contain('playwright-web'))Returns Question<Promise<string[]>>
externalcurrentRunId
Returns the current run ID from the URL's hash parameters. Returns undefined if no run parameter is found.
Returns Question<Promise<string>>
externalclickChart
Clicks the last bar in the trend chart canvas.
Uses coordinate calculation to click the rightmost bar based on the number of runs.
Example
await actor.attemptsTo(
testRunsView.clickChart(),
Ensure.that(testRunsView.hasDetailsPanel(), equals(true)),
);Returns Task
externalclickChartBar
Clicks a specific bar in the trend chart canvas by its zero-based index.
Example
await actor.attemptsTo(
testRunsView.clickChartBar(2),
Ensure.that(testRunsView.hasDetailsPanel(), equals(true)),
);Parameters
externalbarIndex: number
Zero-based index of the chart bar to click
Returns Task
externalselectRun
Selects a test run by clicking its row at the given zero-based index.
Example
await actor.attemptsTo(
testRunsView.selectRun(0),
Ensure.that(testRunsView.hasDetailsPanel(), equals(true)),
);Parameters
externalindex: number
Zero-based index of the run row to click
Returns Task
externalclickDetailsCtaButton
Clicks the call-to-action button in the run details panel (e.g. "View Test Run").
Example
await actor.attemptsTo(
testRunsView.selectRun(0),
testRunsView.clickDetailsCtaButton(),
);Returns Task
externaldismissDetailsPanel
Dismisses the run details panel by pressing Escape.
Example
await actor.attemptsTo(
testRunsView.dismissDetailsPanel(),
Ensure.that(testRunsView.hasDetailsPanel(), equals(false)),
);Returns Task
externalclickModuleName
Clicks a module name link in the details panel's module table.
Example
await actor.attemptsTo(
testRunsView.clickModuleName('playwright-web'),
);Parameters
externalmoduleName: string
Substring to match against module name links
Returns Task
externalclickModulePassedCount
Clicks the "Passed" outcome count for a module in the details panel table.
Example
await actor.attemptsTo(
testRunsView.clickModulePassedCount('playwright-web'),
);Parameters
externalmoduleName: string
Module name to locate the row
Returns Task
externalclickModuleFailedCount
Clicks the "Failed" outcome count for a module in the details panel table.
Example
await actor.attemptsTo(
testRunsView.clickModuleFailedCount('playwright-web'),
);Parameters
externalmoduleName: string
Module name to locate the row
Returns Task
externalclickModuleSkippedCount
Clicks the "Skipped" outcome count for a module in the details panel table.
Example
await actor.attemptsTo(
testRunsView.clickModuleSkippedCount('playwright-web'),
);Parameters
externalmoduleName: string
Module name to locate the row
Returns Task
externalmoduleUrl
Builds URL for viewing a module's scenarios with optional outcome filter.
Accepts Answerable parameters so Questions can be passed directly without actor.answer().
Parameters
externalmoduleName: Answerable<string>
Module identifier (e.g., 'playwright-web')
externalrunId: Answerable<string>
Test run ID (can be a Question)
externaloptionalfilter: Answerable<OutcomeFilter>
Optional outcome filter ('passed', 'failed', 'skipped')
Returns QuestionAdapter<string>
URL path with hash and query parameters
Example
// With static values
view.moduleUrl('playwright-web', '42')
// → '#/tests?run=42&search=%40module%3Aplaywright-web'
// With outcome filter
view.moduleUrl('playwright-web', '42', 'failed')
// → '#/tests?run=42&search=%40module%3Aplaywright-web&filter=failed'
// With Question (idiomatic Screenplay)
view.moduleUrl('playwright-web', view.currentRunId(), 'passed')
// Actor resolves currentRunId() automatically
externalopen
Navigates to the Test Runs view via the sidebar navigation.
Example
await actor.attemptsTo(
testRunsView.open(),
Ensure.that(testRunsView.runCount(), isGreaterThan(0)),
);Returns Task
Interaction object representing the Test Runs view in the HTML report.
Shows historical test runs with a stacked bar trend chart, a run list, and a details panel that appears when a run is selected. The details panel shows run metadata, commit information, and a module table with outcome counts.
Instantiation
Usage in an integration test