Cerberus.Session protocol (cerberus v0.1.4)

Copy Markdown View Source

Runtime session access protocol used by Cerberus drivers.

Summary

Types

last_result()

@type last_result() :: result() | nil

observed()

@type observed() :: %{optional(String.t() | atom()) => term()}

operation()

@type operation() ::
  :visit
  | :click
  | :fill_in
  | :select
  | :choose
  | :check
  | :uncheck
  | :upload
  | :submit
  | :assert_has
  | :refute_has
  | :assert_path
  | :refute_path
  | :unwrap

result()

@type result() :: %{
  op: operation(),
  observed: observed() | nil,
  transition: transition() | nil
}

scope_value()

@type scope_value() :: String.t() | observed() | nil

t()

@type t() :: struct()

transition()

@type transition() :: observed()

Functions

current_path(session)

@spec current_path(t()) :: String.t() | nil

last_result(session)

@spec last_result(t()) :: last_result()

scope(session)

@spec scope(t()) :: scope_value()

with_scope(session, scope)

@spec with_scope(t(), scope_value()) :: t()