GitHub

Interactions

API reference for Interactions.

The click hook of conformance: a way to click, for the adapter under test.

  • click(message_id, id, option) clicks an element of a message the suite posted through the adapter's real entry, failing NoSuchElement when the message has no such element.
  • submit(values) submits the modal the last click or command opened, and again after an errors reply; it does nothing when no modal is open.
  • command(thread, id, text) sends a command typed at thread; the command rules exist only when it is given.
  • All three need chat_interaction.Handler and nothing else: the suite provides its own recording handler at the call.

Attributes

AttributeTypeDescription
clickCallable[[str, str, str | None], Effect[None, NoSuchElement, ci.Handler]]
submitCallable[[Mapping[str, str]], Effect[None, Never, ci.Handler]]
commandCallable[[ChatThread, str, str], Effect[None, Never, ci.Handler]] | None = None

Functions

__init__

__init__(*, click, submit, command=None) -> None
ParameterTypeDescription
clickCallable[[str, str, str | None], Effect[None, NoSuchElement, ci.Handler]]
submitCallable[[Mapping[str, str]], Effect[None, Never, ci.Handler]]
commandCallable[[ChatThread, str, str], Effect[None, Never, ci.Handler]] | None = None