Line

You are reading docs for v0.8. See latest (v0.9)

ui/client/features/tests/hooks/useTests

Cockpit client (features), v0.8. Source: ui/client/features/tests/hooks/useTests.tsx.

Functions#

useTests()#

useTests(): object

Defined in: ui/client/features/tests/hooks/useTests.tsx:15

The Tests screen: the listing, the selection, the code view, the clone dialog and a generate run, plus what is derived for drawing. Every rule about what may be written lives on the server (and in core), not here.

Returns#

cloneTag

cloneTag: (y) => string

The tag beside a clone in the tree: a word, never only a colour.

Parameters
y

YourTest

Returns

string

closeDialog

closeDialog: () => void

Returns

void

comparison

comparison: object

comparison.dismiss

dismiss: () => void | "" | null

Returns

void | "" | null

comparison.dismissed

dismissed: boolean

comparison.model

model: FreshnessModel

data

data: TestsListing | null

dialogView

dialogView: CloneDialogView | null

dismissNotice

dismissNotice: () => void

Returns

void

editName

editName: (name) => void

Parameters
name

string

Returns

void

editStep

editStep: (file, step) => void

Parameters
file

string

step

number

Returns

void

failureKinds

failureKinds: FailureKind[] = FAILURE_KINDS

features

features: string[] | null

generate

generate: () => Promise<void>

Returns

Promise<void>

hideCode

hideCode: () => void

Returns

void

openClone

openClone: (file, reason) => void

Parameters
file

string

reason?

string = LOCK_REASON

Returns

void

pickFeature

pickFeature: (f) => void

Parameters
f

string

Returns

void

row

row: CoverageRow | null

select

select: (selection) => void

Parameters
selection

TestSelection | null

Returns

void

showCode

showCode: (target?) => Promise<void>

Parameters
target?

TestSelection

Returns

Promise<void>

showCodeFromDialog

showCodeFromDialog: () => void

Returns

void

stale

stale: StaleOverview | null

state

state: TestsState

steps

steps: InlinePart[][]

submitClone

submitClone: () => Promise<void>

Returns

Promise<void>

summary

summary: string

test

test: YourTest | GeneratedTest | null

title

title: string