Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Feb 18, 2016
1 parent a1a7bb0 commit d6bf09b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ gem 'simple-navigation', '~> 3.14.0' # 3.x for simple_navigation_bootstrap
gem 'simple-navigation-bootstrap'
gem 'ransack'
gem 'acts_as_tree'
gem 'rails-settings-cached'
gem 'rails-settings-cached', '= 0.4.3' # caching breaks tests until Rails 5 https://github.com/huacnlee/rails-settings-cached/issues/73
gem 'resque'
gem 'whenever', require: false # For defining cronjobs, see config/schedule.rb
gem 'protected_attributes', '= 1.1.0' # 1.1.0 until tests work work with higher versions
Expand Down
21 changes: 11 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ GEM
expression_parser (0.9.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl_rails (4.6.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faker (1.6.1)
Expand Down Expand Up @@ -215,10 +215,11 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mailcatcher (0.6.3)
activesupport (>= 4.0.0, < 5)
mailcatcher (0.6.4)
activesupport (~> 4.0)
eventmachine (= 1.0.9.1)
mail (~> 2.3)
rack (~> 1.5)
sinatra (~> 1.2)
skinny (~> 0.2.3)
sqlite3 (~> 1.3)
Expand Down Expand Up @@ -295,7 +296,7 @@ GEM
rails-i18n (4.0.8)
i18n (~> 0.7)
railties (~> 4.0)
rails-settings-cached (0.5.3)
rails-settings-cached (0.4.3)
rails (>= 4.2.0)
rails_tokeninput (1.7.0)
railties (>= 3.1.0)
Expand Down Expand Up @@ -352,7 +353,7 @@ GEM
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-rails (3.4.1)
rspec-rails (3.4.2)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
Expand All @@ -378,7 +379,7 @@ GEM
tilt (>= 1.1, < 3)
select2-rails (4.0.1)
thor (~> 0.14)
selenium-webdriver (2.50.0)
selenium-webdriver (2.49.0)
childprocess (~> 0.5)
multi_json (~> 1.0)
rubyzip (~> 1.0)
Expand All @@ -392,7 +393,7 @@ GEM
simple_form (3.2.1)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
simplecov (0.11.1)
simplecov (0.11.2)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
Expand Down Expand Up @@ -437,7 +438,7 @@ GEM
execjs
rails (>= 3.1)
railties (>= 3.1)
twitter-text (1.13.0)
twitter-text (1.13.3)
unf (~> 0.1.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
Expand All @@ -446,7 +447,7 @@ GEM
json (>= 1.8.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
unf_ext (0.0.7.2)
uniform_notifier (1.9.0)
vegas (0.1.11)
rack (>= 1.0.0)
Expand Down Expand Up @@ -516,7 +517,7 @@ DEPENDENCIES
rails (~> 4.2)
rails-assets-listjs (= 0.2.0.beta.4)
rails-i18n
rails-settings-cached
rails-settings-cached (= 0.4.3)
rails_tokeninput
ransack
recurring_select
Expand Down
3 changes: 3 additions & 0 deletions spec/integration/product_distribution_example_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@
# gruppe a bestellt 2(3), weil sie auf jeden fall was von x bekommen will
login user_a
visit new_group_order_path(order_id: order.id)
scrolldown
2.times { find("[data-increase_quantity='#{oa.id}']").click }
3.times { find("[data-increase_tolerance='#{oa.id}']").click }
find('input[type=submit]').click
expect(page).to have_selector('body')
# gruppe b bestellt 2(0)
login user_b
visit new_group_order_path(order_id: order.id)
scrolldown
2.times { find("[data-increase_quantity='#{oa.id}']").click }
find('input[type=submit]').click
expect(page).to have_selector('body')
# gruppe a faellt ein dass sie doch noch mehr braucht von x und aendert auf 4(1).
login user_a
visit edit_group_order_path(id: order.group_order(user_a.ordergroup).id, order_id: order.id)
scrolldown
2.times { find("[data-increase_quantity='#{oa.id}']").click }
2.times { find("[data-decrease_tolerance='#{oa.id}']").click }
find('input[type=submit]').click
Expand Down
5 changes: 5 additions & 0 deletions spec/support/integration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# @see http://stackoverflow.com/a/11048669/2866660
def scrolldown
page.execute_script "window.scrollBy(0,10000)"
end

1 comment on commit d6bf09b

@wvengen
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see also #400

Please sign in to comment.