Edytuj

Udostępnij za pośrednictwem


AssertReply class

Test Script action to assert that the bots' reply matches expectations.

Extends

Properties

$kind
exact

A value indicating whether text should be an exact match.

text

The text value to look for in the reply.

Inherited Properties

assertions

The expressions for assertions.

description

Description of what this assertion is.

timeout

The milliseconds to wait for a reply.

Methods

getConditionDescription()

Gets the text to assert for an activity.

validateReply(Activity)

Validates the reply of an activity.

Inherited Methods

configure(Record<string, unknown>)

Fluent method for configuring the object.

execute(TestAdapter, (context: TurnContext) => Promise<any>, Inspector)

Execute the test.

getConverter(string)

Property Details

$kind

static $kind: string

Property Value

string

exact

A value indicating whether text should be an exact match.

exact: boolean

Property Value

boolean

text

The text value to look for in the reply.

text: string

Property Value

string

Inherited Property Details

assertions

The expressions for assertions.

assertions: string[]

Property Value

string[]

Inherited From AssertReplyActivity.assertions

description

Description of what this assertion is.

description: string

Property Value

string

Inherited From AssertReplyActivity.description

timeout

The milliseconds to wait for a reply.

timeout: number

Property Value

number

Inherited From AssertReplyActivity.timeout

Method Details

getConditionDescription()

Gets the text to assert for an activity.

function getConditionDescription(): string

Returns

string

String.

validateReply(Activity)

Validates the reply of an activity.

function validateReply(activity: Activity)

Parameters

activity

Activity

The activity to verify.

Inherited Method Details

configure(Record<string, unknown>)

Fluent method for configuring the object.

function configure(config: Record<string, unknown>): this

Parameters

config

Record<string, unknown>

Configuration settings to apply.

Returns

this

The Configurable after the operation is complete.

Inherited From Configurable.configure

execute(TestAdapter, (context: TurnContext) => Promise<any>, Inspector)

Execute the test.

function execute(testAdapter: TestAdapter, _callback: (context: TurnContext) => Promise<any>, _inspector?: Inspector): Promise<any>

Parameters

testAdapter

TestAdapter

Adapter to execute against.

_callback

(context: TurnContext) => Promise<any>

Logic for the bot to use.

_inspector
Inspector

Inspector for dialog context.

Returns

Promise<any>

A Promise that represents the work queued to execute.

Inherited From AssertReplyActivity.execute

getConverter(string)

function getConverter(_property: string): Converter | ConverterFactory

Parameters

_property

string

The key of the conditional selector configuration.

Returns

Converter | ConverterFactory

The converter for the selector configuration.

Inherited From Configurable.getConverter