User specs in the green

This commit is contained in:
2015-09-21 15:22:43 +02:00
parent cb744943bd
commit 2c3705790c
27 changed files with 112 additions and 30 deletions
+1 -1
View File
@@ -49,5 +49,5 @@ step "the user orders list gets closed" do
end
step "the order gets cancelled" do
@order.cancel!
when_ember_is_ready { @order.cancel! }
end
@@ -1,6 +1,6 @@
step "there is no user information stored in the local storage" do
user_visit '/'
visit empty_page_path
page.execute_script %|Qstorage = window.localStorage|
page.execute_script(%|Qstorage.removeItem('user_id')|)
page.execute_script(%|Qstorage.removeItem('auth_token')|)
@@ -27,7 +27,7 @@ step "there is a instagram user" do
end
step "the user is redirected to the sign in page" do
ember_route_should_be '/sign_in'
when_ember_is_ready { ember_route_should_be '/sign-in' }
end
step "I am signed in as a user" do
@@ -23,7 +23,7 @@ step "another user scans the QR code on the table" do
end
step "the original user should see the other user added below the active list" do
page.evaluate_script(%|$('.list-user-total-container').length()|).should eq 2
page.evaluate_script(%|$('.list-user-total-container').length|).should eq 2
end
step "the original user approves the other user's join request" do
@@ -67,7 +67,7 @@ step "the user order :product_name should be in the order list with price" do |p
#ember_order = ember_store['product_orders'].find{|po| po['product_id'] == concerning_product.id}
#ember_order = ember_find('product_order', concerning_product.id)
sleep 0.1
ember_order = ember_all('product_order').find{|po| po['product_id'] == concerning_product.id }
ember_order = ember_all('product_order').find{|po| po['product'] == concerning_product.id }
quantity = ember_order['quantity']
order_price = quantity * concerning_product.price
within '.product-orders .product-order' do