Sha256: 713927cd2930dd0fa22443412428edba898690447ddaecf3a786e5c4aee83039

Contents?: true

Size: 1.02 KB

Versions: 37

Compression:

Stored size: 1.02 KB

Contents

require 'yaml'
require 'active_support/core_ext/hash'
require 'acceptance_test'
require 'rspec/expectations'

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

AcceptanceTest.instance.configure(config)

AcceptanceTest.instance.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}"
puts "Browser           : #{config[:browser]}"  if config[:browser]

RSpec.describe 'Wikipedia Search' do
  include Capybara::DSL
  include_context "WikipediaAcceptanceTest"

  before do
    puts "Capybara current driver: #{Capybara.current_driver}"
  end

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

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

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

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

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
acceptance_test-1.11.7 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.11.6 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.11.5 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.11.4 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.11.3 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.11.2 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.11.1 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.11.0 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.12 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.11 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.10 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.9 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.8 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.7 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.6 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.5 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.4 spec/acceptance/search_with_config_spec.rb
acceptance_test-1.10.3 spec/wikipedia/acceptance/search_with_config_spec.rb
acceptance_test-1.10.2 spec/wikipedia/acceptance/search_with_config_spec.rb
acceptance_test-1.10.1 spec/wikipedia/acceptance/search_with_config_spec.rb