module EDSL::PageObject

Constants

DEFAULT_PAGE_READY_LIMIT
VERSION

Public Class Methods

fixture_cache() click to toggle source
# File lib/edsl/page_object/population.rb, line 6
def self.fixture_cache
  @@cache ||= {}
end

Public Instance Methods

page_section(name, section_class, opts)
Alias for: section
section(name, section_class, opts) click to toggle source
# File lib/edsl/page_object/section.rb, line 31
def section(name, section_class, opts)
  element(name, { how: :div, assign_method: :populate_with,
                  wrapper_fn: lambda { |element, container| section_class.new(element, container) } }.merge(opts))
end
Also aliased as: page_section
sections(name, section_class, opts) click to toggle source
# File lib/edsl/page_object/section.rb, line 38
def sections(name, section_class, opts)
  i_sel = opts.delete(:item)
  item_how = i_sel.delete(:how) || :divs
  default_method = lambda { |_name, container| container.send("#{name}_element").send(item_how, i_sel).map { |i| section_class.new(i, container) } }
  element(name, { how: :div,
                  default_method:  default_method }.merge(opts))
end