Working user order flow spec

This commit is contained in:
2013-12-02 07:38:02 +01:00
parent 7b9b784ef9
commit afb30556bd
15 changed files with 161 additions and 7 deletions
@@ -0,0 +1,17 @@
step "the user clicks on the order :product_name twice" do |product_name|
@last_product = instance_variable_get product_name.underscore.gsub(/\s/, '_').prepend('@')
button = find ".order-product-#{@last_product.id}"
2.times { button.click }
end
step "the user clicks on the order product button :product_name" do |product_name|
@last_product = instance_variable_get product_name.underscore.gsub(/\s/, '_').prepend('@')
button = find ".order-product-#{@last_product.id}"
button.click
end
step "the user clicks on the user order button" do
find('#active-order-table .btn-primary').click
sleep 1
end