Kui API Documentation - v11.0.0 / @kui-shell/test / ReplExpect
@kui-shell/test.ReplExpect
- blank
- blankWithOpts
- blockAfter
- blockCount
- comment
- consoleToBeClear
- elsewhere
- error
- justOK
- ok
- okWith
- okWithAny
- okWithCustom
- okWithDropDownList
- okWithEvents
- okWithOnly
- okWithPtyOutput
- okWithPtyOutputEventually
- okWithStreamingOutput
- okWithString
- okWithStringEventually
- okWithTextContent
- splitCount
- tableWithNRows
▸ Const blank(res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:201
▸ Const blankWithOpts(opts?): (res: AppAndCount) => Promise<boolean>
| Name | Type |
|---|---|
opts |
Object |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:198
▸ blockAfter(res, delta?): AppAndCount
Transform the given block finder to one that can find the next block
| Name | Type | Default value |
|---|---|---|
res |
AppAndCount |
undefined |
delta |
number |
1 |
packages/test/src/api/repl-expect.ts:469
▸ blockCount(): Object
Verify that the number of blocks equals the expected count
Object
| Name | Type |
|---|---|
inSplit |
(splitIndex: number) => { is: (expected: number | () => number) => void } |
packages/test/src/api/repl-expect.ts:437
▸ comment(expectedBody, expectedTitle?): (res: AppAndCount) => Promise<AppAndCount>
Expect a CommentaryResponse
| Name | Type |
|---|---|
expectedBody |
string |
expectedTitle? |
string |
fn
▸ (res): Promise<AppAndCount>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<AppAndCount>
packages/test/src/api/repl-expect.ts:413
▸ Const consoleToBeClear(app, residualBlockCount?, splitIndex?): Promise<boolean>
The return type any comes from webdriverio waitUntil
| Name | Type | Default value |
|---|---|---|
app |
Application |
undefined |
residualBlockCount |
number |
1 |
splitIndex |
number |
1 |
Promise<boolean>
packages/test/src/api/repl-expect.ts:204
▸ elsewhere(expectedBody, N?): (res: AppAndCount) => Promise<Application>
Expect an ElsewhereCommentaryResponse
| Name | Type |
|---|---|
expectedBody |
string |
N? |
number |
fn
▸ (res): Promise<Application>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<Application>
packages/test/src/api/repl-expect.ts:392
▸ Const error(statusCode, expect?): (res: AppAndCount) => Promise<Application>
| Name | Type |
|---|---|
statusCode |
string | number |
expect? |
string |
fn
▸ (res): Promise<Application>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<Application>
packages/test/src/api/repl-expect.ts:174
▸ Const justOK(res): Promise<AppAndCount>
expect just ok, and no result value
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<AppAndCount>
packages/test/src/api/repl-expect.ts:353
▸ Const ok(res): Promise<AppAndCount>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<AppAndCount>
packages/test/src/api/repl-expect.ts:168
▸ Const okWith(entityName): (res: AppAndCount) => Promise<boolean>
expect ok and at least the given result value
| Name | Type |
|---|---|
entityName |
string |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:350
▸ Const okWithAny(res): Promise<boolean>
as long as its ok, accept anything
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:342
▸ Const okWithCustom<T>(custom): (res: AppAndCount) => Promise<T>
as long as its ok, accept anything
| Name | Type |
|---|---|
T |
extends string | boolean |
| Name | Type |
|---|---|
custom |
CustomSpec |
fn
▸ (res): Promise<T>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<T>
packages/test/src/api/repl-expect.ts:221
▸ Const okWithDropDownList(openAndExpectLabel, click?, closeAfterOpen?): (res: AppAndCount) => Promise<AppAndCount>
| Name | Type | Default value |
|---|---|---|
openAndExpectLabel |
string |
undefined |
click |
boolean |
false |
closeAfterOpen |
boolean |
true |
fn
▸ (res): Promise<AppAndCount>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<AppAndCount>
packages/test/src/api/repl-expect.ts:294
▸ Const okWithEvents(ctx, res): Promise<AppAndCount>
| Name | Type |
|---|---|
ctx |
ISuite |
res |
AppAndCount |
Promise<AppAndCount>
packages/test/src/api/repl-expect.ts:325
▸ Const okWithOnly(entityName): (res: AppAndCount) => Promise<boolean>
expect ok and only the given result value
| Name | Type |
|---|---|
entityName |
string |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:345
▸ Const okWithPtyOutput(expect, exact?): (res: AppAndCount) => Promise<boolean>
| Name | Type | Default value |
|---|---|---|
expect |
string |
undefined |
exact |
boolean |
false |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:266
▸ Const okWithPtyOutputEventually(expect, exact?): (res: AppAndCount) => Promise<boolean>
| Name | Type | Default value |
|---|---|---|
expect |
string |
undefined |
exact |
boolean |
false |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:281
▸ Const okWithStreamingOutput(expect, exact?): (res: AppAndCount) => Promise<boolean>
| Name | Type | Default value |
|---|---|---|
expect |
string |
undefined |
exact |
boolean |
false |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:265
▸ Const okWithString(expect, exact?, streaming?): (res: AppAndCount) => Promise<boolean>
| Name | Type | Default value |
|---|---|---|
expect |
string |
undefined |
exact |
boolean |
false |
streaming |
boolean |
false |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:252
▸ Const okWithStringEventually(expect, exact?): (res: AppAndCount) => Promise<boolean>
| Name | Type | Default value |
|---|---|---|
expect |
string |
undefined |
exact |
boolean |
false |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:268
▸ Const okWithTextContent(expect, exact?, failFast?, sel?): (res: AppAndCount) => Promise<boolean>
| Name | Type | Default value |
|---|---|---|
expect |
string |
undefined |
exact |
boolean |
false |
failFast |
boolean |
true |
sel |
string |
' ' |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>
packages/test/src/api/repl-expect.ts:224
▸ splitCount(expectedSplitCount, inverseColors?, expectedSplitIndex?): (app: Application) => Promise<void>
Expect the given number of terminal splits in the current tab, and check whether the last split has inverse colors
| Name | Type | Default value |
|---|---|---|
expectedSplitCount |
number |
undefined |
inverseColors |
boolean |
false |
expectedSplitIndex? |
number |
undefined |
fn
▸ (app): Promise<void>
| Name | Type |
|---|---|
app |
Application |
Promise<void>
packages/test/src/api/repl-expect.ts:356
▸ tableWithNRows(N): (res: AppAndCount) => Promise<boolean>
Expect table with N rows
| Name | Type |
|---|---|
N |
number |
fn
▸ (res): Promise<boolean>
| Name | Type |
|---|---|
res |
AppAndCount |
Promise<boolean>