lib/site_prism/element_checker.rb
# Runnable in the scope of any SitePrism::Page or Section.
# Returns +true+ when "every item" that is being checked is
# present within the current scope. See #elements_to_check
# for how the definition of "every item" is derived.
#
# Example
# @my_page.mapped_items
# { element => :button_one, element => :button_two, section => :filters }
# @my_page.all_there?
# => true - If the three items above are all present
#
# Note that #elements_to_check will check the hash of mapped_items
#
# When using the recursion parameter, one of two values is valid.
#
# Default: 'none' => Perform no recursion when calling #all_there?
# Override: 'one' => Perform one recursive dive into all section/sections
# items and call #all_there? on all of those items too.
Runnable in the scope of any SitePrism::Page or Section.
Returns +true+ when "every item" that is being checked is
present within the current scope. See #elements_to_check
for how the definition of "every item" is derived.

Example
Runnable in the scope of any SitePrism :: Page or Section . Returns + true + when " every item " that is being checked is present within the current scope . See #elements_to_check for how the definition of " every item " is derived . Example
def all_there?(recursion: :none)
      case recursion
      when :none; then elements_to_check.all? { |name| there?(name) }
      when :one;  then all_there_with_recursion
      else
        SitePrism.logger.debug("Input value '#{recursion}'. Valid values are :none or :one.")
        SitePrism.logger.error('Invalid recursion setting, Will not run #all_there?.')
      end
    end
def all_there? ( recursion : :none ) case recursion when :none ; then elements_to_check . all? { | name | there? ( name ) } when :one ; then all_there_with_recursion else SitePrism . logger . debug ( "Input value '#{recursion}'. Valid values are :none or :one." ) SitePrism . logger . error ( 'Invalid recursion setting, Will not run #all_there?.' ) end end
Runnable in the scope of any SitePrism::Page or Section.
Runnable in the scope of any SitePrism :: Page or Section .
recursion
my_page.mapped_items
{ element => :button_one, element => :button_two, section => :filters }
{ element = > : button_one element = > : button_two section = > : filters }
my_page.all_there?
> true - If the three items above are all present Note that #elements_to_check will check the hash of mapped_items When using the recursion parameter, one of two values is valid. Default: 'none' => Perform no recursion when calling #all_there. Override: 'one' => Perform one recursive dive into all section/sections items and call #all_there. on all of those items too.
> true - If the three items above are all present Note that #elements_to_check will check the hash of mapped_items When using the recursion parameter one of two values is valid . Default : ' none ' = > Perform no recursion when calling #all_there . Override : ' one ' = > Perform one recursive dive into all section / sections items and call #all_there . on all of those items too .