Skip to content

Latest commit

 

History

History
293 lines (173 loc) · 7.78 KB

kui_shell_test.TestMMR.md

File metadata and controls

293 lines (173 loc) · 7.78 KB

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

Name Type Description
param TestParam includes: 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

Name Type Description
badges BadgeSpec[] 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

Name Type
mode string
textB string

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

Name Type Description
kind string is 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

Name Type Description
expectModes MMRExpectMode[] is the expected modes shown as Sidecar Tabs
defaultMode MMRExpectMode is 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

Name Type
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

Name Type
opt? Object
opt.onclick ClickExpect

Returns

void

Defined in

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


testClickResult

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

Parameters

Name Type
cmdIdx number
command string
expect string

Returns

fn

▸ (app): Promise<void>

Parameters
Name Type
app Application
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

Name Type Description
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

Name Type Description
toolbarText Object is the expected text content and type shown in the Sidecar Toolbar
toolbarText.exact? boolean -
toolbarText.text string -
toolbarText.type string -

Returns

void

Defined in

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