Class: TestMMR

January 18, 2022 · View on GitHub

Kui API Documentation - v11.0.0 / @kui-shell/test / TestMMR

Class: TestMMR

@kui-shell/test.TestMMR

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TestMMR(param)

new TestMMR() instantiates a class of multi-model-response tests

Parameters

NameTypeDescription
paramTestParamincludes: command, testName and metadata

Defined in

packages/test/src/api/mmr.ts:46

Properties

param

Readonly param: TestParam

Methods

badges

badges(badges): void

badges() starts a Mocha Test Suite badges() executes command in REPL and expects badges are showin in Sidecar

Parameters

NameTypeDescription
badgesBadgeSpec[]is the expected badges shown in the Sidecar

Returns

void

Defined in

packages/test/src/api/mmr.ts:195


diffPlainText

diffPlainText(mode, textB): void

Parameters

NameType
modestring
textBstring

Returns

void

Defined in

packages/test/src/api/mmr.ts:381


kind

kind(kind): void

kind() starts a Mocha Test Suite kind() executes command in REPL and expects kind is showin in Sidecar

Parameters

NameTypeDescription
kindstringis the expected kind text shown in the Sidecar

Returns

void

Defined in

packages/test/src/api/mmr.ts:173


modes

modes(expectModes, defaultMode): void

modes() starts a Mocha Test Suite modes() executes command in REPL and expects modes are showin in Sidecar

Parameters

NameTypeDescription
expectModesMMRExpectMode[]is the expected modes shown as Sidecar Tabs
defaultModeMMRExpectModeis the expected default Sidecar Tab

Returns

void

Defined in

packages/test/src/api/mmr.ts:218


name

name(opt?): void

name() starts a Mocha Test Suite name() executes command in REPL and expects prettyName or name is shown in Sidecar

Parameters

NameType
opt?Object
opt.heroName?boolean
opt.nameHash?string
opt.onclick?Object
opt.onclick.name?ClickExpect
opt.onclick.nameHash?ClickExpect
opt.prettyName?string

Returns

void

Defined in

packages/test/src/api/mmr.ts:59


namespace

namespace(opt?): void

namespace() starts a Mocha Test Suite namespace() executes command in REPL and expects namespace is shown in Sidecar

Parameters

NameType
opt?Object
opt.onclickClickExpect

Returns

void

Defined in

packages/test/src/api/mmr.ts:131


testClickResult

Private testClickResult(cmdIdx, command, expect): (app: Application) => Promise<void>

Parameters

NameType
cmdIdxnumber
commandstring
expectstring

Returns

fn

▸ (app): Promise<void>

Parameters
NameType
appApplication
Returns

Promise<void>

Defined in

packages/test/src/api/mmr.ts:48


toolbarButtons

toolbarButtons(buttons): void

toolbarButtons() starts a Mocha Test Suite toolbarButtons() executes command and expects the buttons shown in Sidecar having correct labels and drildown handlers

Parameters

NameTypeDescription
buttons{ command: string | Function ; confirm?: boolean ; expectError?: 127 ; kind: "view" | "drilldown" ; label?: string ; mode: string }[]is the expected array of button shown in the Sidecar Toolbar

Returns

void

Defined in

packages/test/src/api/mmr.ts:405


toolbarNotExist

toolbarNotExist(): void

Returns

void

Defined in

packages/test/src/api/mmr.ts:517


toolbarText

toolbarText(toolbarText): void

toolbarText() starts a Mocha Test Suite toolbarText() executes command and expects Sidecar Toolbar has correct text and type

Parameters

NameTypeDescription
toolbarTextObjectis the expected text content and type shown in the Sidecar Toolbar
toolbarText.exact?boolean-
toolbarText.textstring-
toolbarText.typestring-

Returns

void

Defined in

packages/test/src/api/mmr.ts:500