Skip to content

Commit

Permalink
Replace selenium with poltergeist, update test
Browse files Browse the repository at this point in the history
  • Loading branch information
zarchrome committed Nov 7, 2017
1 parent 54833e4 commit d3c0ed5
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
1.9.3-p551
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -4,5 +4,5 @@ group(:test) do
gem 'cucumber'
gem 'capybara'
gem 'rspec'
gem 'selenium-webdriver'
gem 'poltergeist'
end
23 changes: 12 additions & 11 deletions Gemfile.lock
Expand Up @@ -8,16 +8,14 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
cliver (0.3.2)
cucumber (1.3.8)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12.1)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.0.2)
diff-lcs (1.2.4)
ffi (1.9.3)
gherkin (2.12.2)
multi_json (~> 1.3)
mime-types (2.0)
Expand All @@ -26,6 +24,10 @@ GEM
multi_test (0.0.2)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
poltergeist (1.16.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
Expand All @@ -37,13 +39,9 @@ GEM
rspec-expectations (2.14.3)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rubyzip (1.0.0)
selenium-webdriver (2.37.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (~> 1.0.0)
websocket (~> 1.0.4)
websocket (1.0.7)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.0.0)
nokogiri (~> 1.3)

Expand All @@ -53,5 +51,8 @@ PLATFORMS
DEPENDENCIES
capybara
cucumber
poltergeist
rspec
selenium-webdriver

BUNDLED WITH
1.16.0
4 changes: 2 additions & 2 deletions features/search.feature
Expand Up @@ -5,5 +5,5 @@ Feature: Search

Scenario: Search for cucumber
Given I am on the home page
And I have entered "cucumber bdd" into the "q" field
Then I should see "Cucumber - Making BDD fun"
And I search for "cucumber bdd"
Then I should see "Cucumber is for Behaviour-Driven Development"
5 changes: 4 additions & 1 deletion features/step_definitions/web_steps.rb
Expand Up @@ -10,4 +10,7 @@
page.should have_content(text)
end


Given(/^I search for "(.*?)"$/) do |term|
fill_in 'q', :with => term
click_button 'Google Search'
end
4 changes: 3 additions & 1 deletion features/support/env.rb
@@ -1,8 +1,10 @@
require 'capybara'
require 'capybara/cucumber'
require 'capybara/poltergeist'

Capybara.configure do |config|
config.default_driver = :selenium
config.default_driver = :poltergeist
config.app_host = 'http://www.google.com'
end

World(Capybara)

0 comments on commit d3c0ed5

Please sign in to comment.