WardrikTesting. Script
(wardrik_testing v0.1.0-rc.1)
Copy Markdown
How WardrikTesting.Server answers messages.
Each answer is written to the conversation's log as a run's events would be. Nothing is written
unless the test started WardrikEvents under WardrikTesting.Server.events/1.
Messages
echowaits on the callcall_1, to theechotool with%{"text" => "hi"}.failfails with"It broke.".- Anything else is answered
"Answered: "followed by the message.
Decisions
- Approving or denying
call_1answers"Done.". - Only a scope granted
agent.decideon the conversation may decide. Others get:forbidden. - A denial without a reason is recorded as
"Rejected.", as the hub does.
Cancelling stops the run.
Summary
Functions
Answers the message in input, as agent.ask does.
Cancels the run in input, as agent.cancel does.
Approves or denies the call in input, as agent.approve and agent.deny do.
Functions
@spec ask(Wardrik.Scope.t(), map()) :: {:ok, map()}
Answers the message in input, as agent.ask does.
@spec cancel(Wardrik.Scope.t(), map()) :: {:ok, nil}
Cancels the run in input, as agent.cancel does.
@spec decide(Wardrik.Scope.t(), String.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
Approves or denies the call in input, as agent.approve and agent.deny do.