Sha256: 064ae8cdcc3b9703b956c9adf01c071da424384688c55b84150db69b43b5b2a0

Contents?: true

Size: 819 Bytes

Versions: 3

Compression:

Stored size: 819 Bytes

Contents

require 'acceptance_test'
require 'yaml'

config_name = File.expand_path("spec/acceptance_config.yml")
config = config_name ? HashWithIndifferentAccess.new(YAML.load_file(config_name)) : {}

acceptance_test = AcceptanceTest.new config

acceptance_test.create_shared_context "WikipediaAcceptanceTest"

puts "Application URL   : #{config[:webapp_url]}"  if config[:webapp_url]
puts "Selenium URL      : #{config[:selenium_url]}" if config[:selenium_url]
puts "Default Wait Time : #{Capybara.default_wait_time}"

RSpec.describe 'Wikipedia Search' do
  include_context "WikipediaAcceptanceTest"

  it "uses selenium driver", driver: :selenium do
    visit('/')

    fill_in "searchInput", :with => "Capybara"

    find(".formBtn", match: :first).click

    expect(page).to have_content "Hydrochoerus hydrochaeris"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acceptance_test-1.4.8 spec/wikipedia_search_with_config_spec.rb
acceptance_test-1.4.7 spec/wikipedia_search_with_config_spec.rb
acceptance_test-1.4.6 spec/wikipedia_search_with_config_spec.rb