Sha256: bfc718360c07533f8e42f698692a550e3c47ad1ff8edb0523e5a471728d4807b

Contents?: true

Size: 761 Bytes

Versions: 6

Compression:

Stored size: 761 Bytes

Contents

base = File.expand_path(File.dirname(__FILE__) + '/../../../..')
require base + '/lib/whirlwind'

Given /a user navigates to the (.+) page/ do |page|
  @google_searchpage.send(page)
end

Then /the user searches for (.+)/ do |term|
  @google_searchpage.search(term)
end

Then /^there shall be search results containing (.+)$/ do |term|
  # could simply search body's text 
  (@browser.text =~ /#{term}/i).should_not == nil

  #or if you want to ensure it's found within a search result:
  found=nil
  @google_searchresultspage.elements.current_page_search_results_array.each { |result|
    found = result.text =~ /#{term}/i
    break if found
  }
  found.should_not == nil
end


=begin
Then /there shall be search results containing bye bye black bird/
end
=end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
whirlwind-0.1.8 sites/google/features/step_defn/google.rb
whirlwind-0.1.7 sites/google/features/step_defn/google.rb
whirlwind-0.1.6 sites/google/features/step_defn/google.rb
whirlwind-0.1.5 sites/google/features/step_defn/google.rb
whirlwind-0.1.4 sites/google/features/step_defn/google.rb
whirlwind-0.1.3 sites/google/features/step_defn/google.rb