lib/kelp/visibility.rb
# Verify that all items appear in the same table row. Passes if a `tr`
# element exists containing all the given `texts`, and fails if no such
# `tr` exists. The texts may be in any order in the row.
#
# @example
#   should_see_in_same_row ["Yakko", "Rob Paulsen"]
#   should_see_in_same_row ["Wakko", "Jess Harnell"]
#   should_see_in_same_row ["Dot", "Tress MacNeille"]
#
# @param [Array] texts
#   Array of Strings that should appear in the same row
# @param [Hash] scope
#   Scoping keywords as understood by {#in_scope}
#
# @raise [Kelp::Unexpected]
#   If no row is found containing all strings in `texts`
#
Verify that all items appear in the same table row.
Verify that all items appear in the same table row .
def should_see_in_same_row(texts, scope={})
      in_scope(scope) do
        if !page.has_xpath?(xpath_row_containing(texts))
          raise Kelp::Unexpected, "Expected, but did not see: #{texts.inspect} in the same row"
        end
      end
    end
def should_see_in_same_row ( texts , scope = { } ) in_scope ( scope ) do if ! page . has_xpath? ( xpath_row_containing ( texts ) ) raise Kelp :: Unexpected , "Expected, but did not see: #{texts.inspect} in the same row" end end end
Verify that all items appear in the same table row.
Verify that all items appear in the same table row .
[Kelp::Unexpected] If no row is found containing all strings in `texts`
[ Kelp :: Unexpected ] If no row is found containing all strings in ` texts `
texts
<not_specific>
scope
<not_specific>
<not_specific>
scope Scoping keywords as understood by {#in_scope}
scope Scoping keywords as understood by { #in_scope }
example
should_see_in_same_row ["Yakko", "Rob Paulsen"] should_see_in_same_row ["Wakko", "Jess Harnell"] should_see_in_same_row ["Dot", "Tress MacNeille"]
should_see_in_same_row [ " Yakko " " Rob Paulsen " ] should_see_in_same_row [ " Wakko " " Jess Harnell " ] should_see_in_same_row [ " Dot " " Tress MacNeille " ]