Better tests

This commit is contained in:
2014-12-05 14:48:20 +01:00
parent 3941529d0d
commit 1a3f528731
11 changed files with 59 additions and 43 deletions
@@ -64,8 +64,8 @@ end
step "the user order :product_name should be in the order list with price" do |product_name|
concerning_product = Product.find_by_name(product_name)
#ember_order = ember_store['product_orders'].find{|po| po['product_id'] == concerning_product.id}
ember_order = ember_find('product_order', concerning_product.id)
binding.pry
#ember_order = ember_find('product_order', concerning_product.id)
ember_order = ember_all('product_order').find{|po| po['product_id'] == concerning_product.id }
quantity = ember_order['quantity']
order_price = quantity * concerning_product.price
within '.product-orders .product-order' do
@@ -9,6 +9,7 @@ end
step "the user clicks on the lists link in the side menu" do
page.execute_script %|$('.side-menu-lists').click()|
sleep 1
end
step "the user clicks on the about link in the side menu" do
@@ -16,6 +17,7 @@ step "the user clicks on the about link in the side menu" do
end
step "the user clicks on the active list link in the side menu" do
binding.pry
page.execute_script %|$('.side-menu-active-list').click()|
end