Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/tests/domain/RunShapes

Shapes for running the tests: the server's /api/tests/:feature/runs and what the run panel draws from it.

Cockpit client (features), next. Source: ui/client/features/tests/domain/RunShapes.ts.

Type Aliases#

OutcomeView#

OutcomeView = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:27

The words for one outcome, kept as data so the symbol and the word always travel together (never colour alone).

Properties#

symbol

symbol: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:27

tone

tone: "ok" | "error" | "muted"

Defined in: ui/client/features/tests/domain/RunShapes.ts:27

word

word: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:27


ResultMark#

ResultMark = OutcomeView & object

Defined in: ui/client/features/tests/domain/RunShapes.ts:29

A result as drawn: status is 'none' for a test nothing has run.

Type Declaration#

status

status: RunStatus | "none"


RunCounts#

RunCounts = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:15

Properties#

failed

failed: number

Defined in: ui/client/features/tests/domain/RunShapes.ts:15

notRun

notRun: number

Defined in: ui/client/features/tests/domain/RunShapes.ts:15

passed

passed: number

Defined in: ui/client/features/tests/domain/RunShapes.ts:15

total

total: number

Defined in: ui/client/features/tests/domain/RunShapes.ts:15


RunFailure#

RunFailure = { event: string | null; fix: string; kind: "convention"; message: string; page: string | null; selector: string; step: RunStep | null; title: string; why: string; } | { bugReport?: string; expected: string; kind: "app"; message: string; page: string | null; reached: string; step: RunStep | null; summary: string; title: string; } | { kind: "other"; message: string; step: null; title: string; }

Defined in: ui/client/features/tests/domain/RunShapes.ts:6


RunLive#

RunLive = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:13

Properties#

processId

processId: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:13

state

state: "queued" | "running" | "paused"

Defined in: ui/client/features/tests/domain/RunShapes.ts:13

target

target: RunTarget

Defined in: ui/client/features/tests/domain/RunShapes.ts:13


RunOutcome#

RunOutcome = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:11

Properties#

area

area: TestArea

Defined in: ui/client/features/tests/domain/RunShapes.ts:11

durationMs

durationMs: number

Defined in: ui/client/features/tests/domain/RunShapes.ts:11

failure?

optional failure?: RunFailure

Defined in: ui/client/features/tests/domain/RunShapes.ts:11

file

file: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:11

reason?

optional reason?: string | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:11

status

status: RunStatus

Defined in: ui/client/features/tests/domain/RunShapes.ts:11

title

title: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:11


RunPanelProps#

RunPanelProps = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:46

The run panel's props: the view, the address field, and what a click does.

Properties#

address

address: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:48

canRun

canRun: boolean

Defined in: ui/client/features/tests/domain/RunShapes.ts:51

copied

copied: string | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:50

onAddress

onAddress: (value) => void

Defined in: ui/client/features/tests/domain/RunShapes.ts:52

Parameters
value

string

Returns

void

onCancel

onCancel: () => void

Defined in: ui/client/features/tests/domain/RunShapes.ts:54

Returns

void

onCopy

onCopy: (key, text) => Promise<boolean>

Defined in: ui/client/features/tests/domain/RunShapes.ts:55

Parameters
key

string

text

string

Returns

Promise<boolean>

onOpenTest

onOpenTest: (area, file) => void

Defined in: ui/client/features/tests/domain/RunShapes.ts:56

Parameters
area

TestArea

file

string

Returns

void

onRunAll

onRunAll: () => void

Defined in: ui/client/features/tests/domain/RunShapes.ts:53

Returns

void

refused

refused: string | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:49

view

view: RunPanelView

Defined in: ui/client/features/tests/domain/RunShapes.ts:47


RunPanelView#

RunPanelView = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:34

Everything the run panel draws, as plain text and flags, so the components hold no rules.

Properties#

busy

busy: boolean

Defined in: ui/client/features/tests/domain/RunShapes.ts:35

done

done: string | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:38

failures

failures: RunOutcome[]

Defined in: ui/client/features/tests/domain/RunShapes.ts:40

live

live: { state: string; text: string; } | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:36

problem

problem: { code: string; heading: string; message: string; } | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:37

rows

rows: RunRowView[]

Defined in: ui/client/features/tests/domain/RunShapes.ts:39


RunProblem#

RunProblem = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:14

Properties#

code

code: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:14

message

message: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:14

state

state: "error" | "cancelled"

Defined in: ui/client/features/tests/domain/RunShapes.ts:14

target

target: RunTarget

Defined in: ui/client/features/tests/domain/RunShapes.ts:14


RunReply#

RunReply = { ok: true; snap: RunSnapshot; } | { code?: string; error: string; ok: false; snap?: RunSnapshot; }

Defined in: ui/client/features/tests/domain/RunShapes.ts:24


RunRowView#

RunRowView = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:32

One test's row in the results list.

Properties#

area

area: TestArea

Defined in: ui/client/features/tests/domain/RunShapes.ts:32

detail

detail: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:32

file

file: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:32

key

key: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:32

mark

mark: ResultMark

Defined in: ui/client/features/tests/domain/RunShapes.ts:32

title

title: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:32


RunSnapshot#

RunSnapshot = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:16

Properties#

defaultBaseUrl

defaultBaseUrl: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:22

lastRun

lastRun: { baseUrl: string; counts: RunCounts; durationMs: number; processId: string; target: RunTarget; } | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:20

live

live: RunLive | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:18

ok

ok: true

Defined in: ui/client/features/tests/domain/RunShapes.ts:17

problem

problem: RunProblem | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:21

tests

tests: RunOutcome[]

Defined in: ui/client/features/tests/domain/RunShapes.ts:19


RunStatus#

RunStatus = "passed" | "failed" | "not-run"

Defined in: ui/client/features/tests/domain/RunShapes.ts:10


RunStep#

RunStep = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:5

Properties#

n

n: number

Defined in: ui/client/features/tests/domain/RunShapes.ts:5

sentence

sentence: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:5


RunTarget#

RunTarget = { area: TestArea; name: string; } | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:12


TestRunProps#

TestRunProps = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:60

Running one test from its detail: its last result and the actions.

Properties#

busy

busy: boolean

Defined in: ui/client/features/tests/domain/RunShapes.ts:60

copied

copied: string | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:60

onCopy

onCopy: (key, text) => Promise<boolean>

Defined in: ui/client/features/tests/domain/RunShapes.ts:60

Parameters
key

string

text

string

Returns

Promise<boolean>

onRun

onRun: () => void

Defined in: ui/client/features/tests/domain/RunShapes.ts:60

Returns

void

view

view: TestRunView | null

Defined in: ui/client/features/tests/domain/RunShapes.ts:60


TestRunView#

TestRunView = object

Defined in: ui/client/features/tests/domain/RunShapes.ts:43

What one test's detail draws about its last run.

Properties#

detail

detail: string

Defined in: ui/client/features/tests/domain/RunShapes.ts:43

mark

mark: ResultMark

Defined in: ui/client/features/tests/domain/RunShapes.ts:43

outcome

outcome: RunOutcome

Defined in: ui/client/features/tests/domain/RunShapes.ts:43