Fix failing tests
This commit is contained in:
parent
a1a7bb02fe
commit
d6bf09b0b8
4 changed files with 20 additions and 11 deletions
|
|
@ -22,6 +22,7 @@ feature 'product distribution', js: true do
|
|||
# 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
|
||||
|
|
@ -29,12 +30,14 @@ feature 'product distribution', js: true do
|
|||
# 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
|
||||
|
|
|
|||
5
spec/support/integration.rb
Normal file
5
spec/support/integration.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
# @see http://stackoverflow.com/a/11048669/2866660
|
||||
def scrolldown
|
||||
page.execute_script "window.scrollBy(0,10000)"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue