Skip to content

Context structs

This patch rewrites tests to use more Object friendly code in the step definitions and @context object, using Ruby Structs (Simple classes with methods).

it is the first step towards makes scenarios demanding more than one patron possible easier to write, as the structs can have methods, and can be nested

patron = generates also a branch and a patron category from this struct

Patron =, :surname, :branch, :category) do
  def initialize
    self.cardnumber = generateRandomString
    self.surname    = generateRandomString
    self.branch     =
    self.category   =

and can further trigger page objects or steps to actually generate the branch and patron category

Merge request reports