Line

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

ui/client/features/tests/domain/StepMoves

Pure (DOMAIN-001): moving and inserting rows of a draft.

Cockpit client (features), v0.8. Source: ui/client/features/tests/domain/StepMoves.ts.

Functions#

canMove()#

canMove(draft, key, dir): boolean

Defined in: ui/client/features/tests/domain/StepMoves.ts:8

Parameters#

draft

DraftStep[]

key

number

dir

-1 | 1

Returns#

boolean


insertStep()#

insertStep(draft, afterKey, step, key): DraftStep[]

Defined in: ui/client/features/tests/domain/StepMoves.ts:23

Insert after the given row (or at the end), never before the page is opened.

Parameters#

draft

DraftStep[]

afterKey

number | null

step

StepFields

key

number

Returns#

DraftStep[]


move()#

move(draft, key, dir): DraftStep[]

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

Parameters#

draft

DraftStep[]

key

number

dir

-1 | 1

Returns#

DraftStep[]