Class: TestInteraction

TestInteraction(test, utterance)

Represents a single interaction inside of a Test

Constructor

new TestInteraction(test, utterance)

Parameters:
Name Type Description
test Test the test that includes this interaction
utterance string
Source:

Members

assertions

Returns the assertions inside the interaction
Source:

duration

Returns the duration of the interaction
Source:

duration

Set the duration of the interaction
Source:

expressions

Returns the expressions inside the interaction
Source:

hasDeprecatedE2EOperators

Returns true if at least one of the assertions in this interaction has operator ">", ">=", "<" and "<="
Source:

hasDeprecatedOperators

Returns true if at least one of the assertions in this interaction has operator "==" or "=~"
Source:

hasExit

Returns true if one of the assertions in the interaction includes an exit
Source:

hasGoto

Returns true if one of the assertions in the interaction includes a goto
Source:

hasPause

Returns true if one of the interactions is a PAUSE command
Source:

intent

Returns the intent set in the interaction (only for unit tests)
Source:

label

returns the label used for this interaction, so that it can be referenced in "go to" flows
Source:

lineNumber

returns the line number of the interaction
Source:

localizedSlots

Get the value of the slots used for the locale defined in the test suite
Source:

pauseSeconds

returns the pause time in seconds
Source:

relativeIndex

returns the relative index for this interaction inside the test
Source:

requestType

If the utterance matches a request type (Display.ElementSelected, LaunchRequest, SessionEndedRequest), returns it
Source:

slots

Returns the slots used along the intents (only for unit tests)
Source:

slots

Set the slots used along the intents (only for unit tests)
Source:

test

Returns the test that includes this interaction
Source:

utterance

Returns the utterance as a string
Source:

Methods

applyExpressions(request)

Replace the property indicated by the expression path with the value indicated
Parameters:
Name Type Description
request object the request generated by this interaction
Source:

toDTO(response) → {Object}

Returns a non-circular DTO version of this Test Interaction
Parameters:
Name Type Description
response object the response that was generated with this interaction
Source:
Returns:
Type
Object

toYamlObject() → {object}

Returns the interaction part of a yaml object {input: string, expect: object[]}
Source:
Returns:
Type
object