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