Kui API Documentation - v11.0.0 / @kui-shell/test / TestMMR
@kui-shell/test.TestMMR
- badges
- diffPlainText
- kind
- modes
- name
- namespace
- testClickResult
- toolbarButtons
- toolbarNotExist
- toolbarText
• new TestMMR(param
)
new TestMMR() instantiates a class of multi-model-response tests
Name | Type | Description |
---|---|---|
param |
TestParam |
includes: command, testName and metadata |
packages/test/src/api/mmr.ts:46
• Readonly
param: TestParam
▸ badges(badges
): void
badges() starts a Mocha Test Suite
badges() executes command
in REPL and expects badges
are showin in Sidecar
Name | Type | Description |
---|---|---|
badges |
BadgeSpec [] |
is the expected badges shown in the Sidecar |
void
packages/test/src/api/mmr.ts:195
▸ diffPlainText(mode
, textB
): void
Name | Type |
---|---|
mode |
string |
textB |
string |
void
packages/test/src/api/mmr.ts:381
▸ kind(kind
): void
kind() starts a Mocha Test Suite
kind() executes command
in REPL and expects kind
is showin in Sidecar
Name | Type | Description |
---|---|---|
kind |
string |
is the expected kind text shown in the Sidecar |
void
packages/test/src/api/mmr.ts:173
▸ modes(expectModes
, defaultMode
): void
modes() starts a Mocha Test Suite
modes() executes command
in REPL and expects modes
are showin in Sidecar
Name | Type | Description |
---|---|---|
expectModes |
MMRExpectMode [] |
is the expected modes shown as Sidecar Tabs |
defaultMode |
MMRExpectMode |
is the expected default Sidecar Tab |
void
packages/test/src/api/mmr.ts:218
▸ name(opt?
): void
name() starts a Mocha Test Suite
name() executes command
in REPL and expects prettyName
or name
is shown in Sidecar
Name | Type |
---|---|
opt? |
Object |
opt.heroName? |
boolean |
opt.nameHash? |
string |
opt.onclick? |
Object |
opt.onclick.name? |
ClickExpect |
opt.onclick.nameHash? |
ClickExpect |
opt.prettyName? |
string |
void
packages/test/src/api/mmr.ts:59
▸ namespace(opt?
): void
namespace() starts a Mocha Test Suite
namespace() executes command
in REPL and expects namespace
is shown in Sidecar
Name | Type |
---|---|
opt? |
Object |
opt.onclick |
ClickExpect |
void
packages/test/src/api/mmr.ts:131
▸ Private
testClickResult(cmdIdx
, command
, expect
): (app
: Application
) => Promise
<void
>
Name | Type |
---|---|
cmdIdx |
number |
command |
string |
expect |
string |
fn
▸ (app
): Promise
<void
>
Name | Type |
---|---|
app |
Application |
Promise
<void
>
packages/test/src/api/mmr.ts:48
▸ 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
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 |
void
packages/test/src/api/mmr.ts:405
▸ toolbarNotExist(): void
void
packages/test/src/api/mmr.ts:517
▸ toolbarText(toolbarText
): void
toolbarText() starts a Mocha Test Suite
toolbarText() executes command
and expects Sidecar Toolbar has correct text
and type
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 |
- |
void