Changed JavaScript driver from selenium to phantomjs.

This commit is contained in:
alexs
2013-07-23 17:54:05 +10:00
parent 418393afbd
commit 37a88a1be6
5 changed files with 15 additions and 4 deletions

View File

@@ -60,6 +60,7 @@ group :test, :development do
gem 'simplecov', :require => false
gem 'awesome_print'
gem "letter_opener"
gem 'poltergeist'
end
group :development do

View File

@@ -201,6 +201,7 @@ GEM
devise (>= 2.1.0)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (1.0.3)
excon (0.25.3)
execjs (1.4.0)
multi_json (~> 1.0)
@@ -211,6 +212,8 @@ GEM
railties (>= 3.0.0)
faker (1.0.1)
i18n (~> 0.4)
faye-websocket (0.4.7)
eventmachine (>= 0.12.0)
ffaker (1.15.0)
ffi (1.4.0)
fog (1.14.0)
@@ -227,6 +230,7 @@ GEM
haml (3.1.6)
highline (1.6.18)
hike (1.2.3)
http_parser.rb (0.5.3)
httparty (0.11.0)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
@@ -269,6 +273,10 @@ GEM
cocaine (>= 0.0.2)
mime-types
pg (0.13.2)
poltergeist (1.1.2)
capybara (~> 2.0.1)
faye-websocket (~> 0.4.4)
http_parser.rb (~> 0.5.3)
polyamorous (0.5.0)
activerecord (~> 3.0)
polyglot (0.3.3)
@@ -415,6 +423,7 @@ DEPENDENCIES
newrelic_rpm
oj
pg
poltergeist
pry-debugger
rabl
rails (= 3.2.13)

View File

@@ -299,7 +299,6 @@ feature %q{
page.should have_selector "a.delete-product", :count => 3
first("a.delete-product").click
page.driver.browser.switch_to.alert.accept
sleep(0.5) if page.has_selector? "a.delete-product", :count => 3 # Wait for product to be removed from page
page.should have_selector "a.delete-product", :count => 2
@@ -322,7 +321,6 @@ feature %q{
page.should have_selector "a.delete-variant", :count => 3
first("a.delete-variant").click
page.driver.browser.switch_to.alert.accept
sleep(0.5) if page.has_selector? "a.delete-variant", :count => 3 # Wait for variant to be removed from page
page.should have_selector "a.delete-variant", :count => 2

View File

@@ -23,7 +23,7 @@ feature %q{
click_link 'Configuration'
click_link 'Enterprise Fees'
page.should have_selector "#enterprise_fee_set_collection_attributes_0_enterprise_id", :text => fee.enterprise.name
page.should have_selector "#enterprise_fee_set_collection_attributes_0_enterprise_id"
page.should have_selector "option[selected]", text: 'Packing'
page.should have_selector "input[value='$0.50 / kg']"
page.should have_selector "option[selected]", text: 'Weight (per kg)'
@@ -93,7 +93,6 @@ feature %q{
# And I click delete
find("a.delete-resource").click
page.driver.browser.switch_to.alert.accept
# Then my enterprise fee should have been deleted
visit admin_enterprise_fees_path

View File

@@ -19,6 +19,10 @@ require 'active_record/fixtures'
fixtures_dir = File.expand_path('../../db/default', __FILE__)
ActiveRecord::Fixtures.create_fixtures(fixtures_dir, ['spree/states', 'spree/countries'])
# Capybara config
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
RSpec.configure do |config|
# ## Mock Framework