Working user order flow spec
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user