Carla Test Helper v0.1.14 CarlaTestHelper.V1.Connector View Source

Carla test helper

Link to this section Summary

Functions

Similar to quick_reply/4 but instead of quick replies, this scans text and gallery card item buttons for a button with the label label

Similar to quick_reply/4 but instead of quick replies, this scans text and gallery card item buttons for a button with the label label

Similar to quick_reply/4 but instead of quick replies, this scans text and gallery card item buttons for a button with the label label

Similar to button_action/4 The difference is that we don’t decode the payload

Prints the last response from a request

Retrieves a gallery card from the response and searches for a button with the label label sends its payload as the given user for uuid. Then asserts that the resulting response is expected_action

Retrieves a gallery card from the response and searches for a button with the label label. Asserts the button linkout url contains value

Retrieves a gallery card from the response and searches for a button with the label label. Asserts the button linkout url contains value

Sends message for the given uuid and asserts the response is the expected_action

Scans the buttons portion of the given response for the first quick reply button with the label label and sends its payload as the given user for uuid. Then asserts that the resulting response is expected_action

Link to this section Functions

Link to this function button_action(response, uuid, label, expected_action) View Source
button_action(map(), String.t(), String.t(), String.t()) :: map()

Similar to quick_reply/4 but instead of quick replies, this scans text and gallery card item buttons for a button with the label label.

Parameters:

  • response - Response to look for a button with label
  • uuid - The user uuid to send the message as
  • label - The label of the button you want to “click”
  • expected_action - The resulting response’s action

Returns the response after clicking the button.

Link to this function button_linkout(response, uuid, label, value) View Source
button_linkout(map(), String.t(), String.t(), String.t()) :: map()

Similar to quick_reply/4 but instead of quick replies, this scans text and gallery card item buttons for a button with the label label.

Parameters:

  • response - Response to look for a button with label
  • uuid - The user uuid to send the message as
  • label - The label of the button you want to “click”
  • value - The linkout button payload value

Returns the response after clicking the button.

Link to this function button_linkout(response, uuid, label, value, params) View Source
button_linkout(map(), String.t(), String.t(), String.t(), [String.t()]) :: map()

Similar to quick_reply/4 but instead of quick replies, this scans text and gallery card item buttons for a button with the label label.

Parameters:

  • response - Response to look for a button with label
  • uuid - The user uuid to send the message as
  • label - The label of the button you want to “click”
  • value - The linkout button payload value
  • params - The params expected in the value

Returns the response after clicking the button.

Link to this function button_user_response(response, uuid, label, expected_action) View Source
button_user_response(map(), String.t(), String.t(), String.t()) :: map()

Similar to button_action/4 The difference is that we don’t decode the payload.

Parameters:

  • response - Response to look for a button with label
  • uuid - The user uuid to send the message as
  • label - The label of the button you want to “click”
  • expected_action - The resulting response’s action

Returns the response after clicking the button.

Link to this function debug_last_response(response, uuid) View Source
debug_last_response(map(), String.t()) :: map()

Prints the last response from a request.

Parameters:

  • response - Response to print
  • uuid - Unused, The user uuid passed down
Link to this function message(response, uuid, message, expected_action) View Source
message(map(), String.t(), String.t(), String.t()) :: map()

Sends message for the given uuid and asserts the response is the expected_action.

Parameters:

  • _response - Unused, just made it 4 args to be in line w/ quick_reply and button
  • uuid - The user to send the message as
  • message - The message to send
  • expected_action - The action to assert when it comes back

Returns a Response object.

Link to this function quick_reply(response, uuid, label, expected_action) View Source
quick_reply(map(), String.t(), String.t(), String.t()) :: map()

Scans the buttons portion of the given response for the first quick reply button with the label label and sends its payload as the given user for uuid. Then asserts that the resulting response is expected_action.

Parameters:

  • response - Response to look for a button with label
  • uuid - The user uuid to send the message as
  • label - The label of the button you want to “click”
  • expected_action - the resulting response’s action

Returns the response after clicking the quick_reply.