Line

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

ui/client/features/tests/hooks/useTestCode

Cockpit client (features), next. Source: ui/client/features/tests/hooks/useTestCode.tsx.

Functions#

useTestCode()#

useTestCode(feature, selected, dispatch): object

Defined in: ui/client/features/tests/hooks/useTestCode.tsx:8

"Show code" / "Just show me the code": reads one listed test's text, read-only. target selects it first.

Parameters#

feature

string

selected

TestSelection | null

dispatch

Dispatch<TestsAction>

Returns#

object

hideCode

hideCode: () => void

Returns

void

showCode

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

Parameters
target?

TestSelection

Returns

Promise<void>