diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 4073f87..c211ba1 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -315,3 +315,8 @@ When /^(?:|I )follow exact "([^"]*)"(?: within "([^"]*)")?$/ do |link, selector| find("a", :text => /\A#{link}\z/).click end end + +When /^(?:|I )wait ([^ ]+) seconds?(?:| .+)$/ do |seconds| + sleep seconds.to_f +end + diff --git a/plugins/shopping_cart/features/delivery_admin.feature b/plugins/shopping_cart/features/delivery_admin.feature index 00d1b5b..44ecf4b 100644 --- a/plugins/shopping_cart/features/delivery_admin.feature +++ b/plugins/shopping_cart/features/delivery_admin.feature @@ -62,7 +62,7 @@ Feature: delivery administration Then I should see "Bike" And I follow "Remove" within ".delivery-method" When I confirm the browser dialog - Then I should see "Bike" + Then I should not see "Bike" @selenium Scenario: edit delivery diff --git a/plugins/shopping_cart/features/delivery_client.feature b/plugins/shopping_cart/features/delivery_client.feature index 35bb4ba..a512742 100644 --- a/plugins/shopping_cart/features/delivery_client.feature +++ b/plugins/shopping_cart/features/delivery_client.feature @@ -35,9 +35,10 @@ Feature: delivery client Given I follow "Add to basket" And I follow "Add to basket" And I should see "Show basket" - And I follow "Show basket" + And I follow "Show " + And I wait 1 second for animations And I follow "Shopping checkout" - And I fill in "order_consumer_data_contact_phone" with "123456789" + And I fill in "Contact phone" with "123456789" When I select "Bike ($8.00)" from "Option" Then I should see "My good old bike." within ".instructions" And I should see "Address" @@ -50,8 +51,9 @@ Feature: delivery client And I follow "Add to basket" And I should see "Show basket" And I follow "Show basket" + And I wait 1 second for animations And I follow "Shopping checkout" - And I fill in "order_consumer_data_contact_phone" with "123456789" + And I fill in "Contact phone" with "123456789" When I select "Bar" from "Option" Then I should see "Come to my bar and drink it!" within ".instructions" And I should not see "Address" @@ -68,8 +70,9 @@ Feature: delivery client And I follow "Add to basket" And I should see "Show basket" And I follow "Show basket" + And I wait 1 second for animations And I follow "Shopping checkout" - And I fill in "order_consumer_data_contact_phone" with "123456789" + And I fill in "Contact phone" with "123456789" When I select "Bike ($8.00)" from "Option" Then I should see "My good old bike." within ".instructions" And I should see "Address" diff --git a/plugins/shopping_cart/features/purchases.feature b/plugins/shopping_cart/features/purchases.feature index f57335d..4e8eb2b 100644 --- a/plugins/shopping_cart/features/purchases.feature +++ b/plugins/shopping_cart/features/purchases.feature @@ -121,11 +121,14 @@ Feature: purchases | pickup | Bar | Come to my bar and drink it! | 0.00 | 0.00 | And I am on moes-tavern's products page And I follow "Add to basket" + And I wait 0.2 seconds to finish the request And I follow "Add to basket" + And I wait 0.2 seconds to finish the request And I follow "Add to basket" And I follow "Show basket" + And I wait 1 second for animations And I follow "Shopping checkout" - And I fill in "order_consumer_data_contact_phone" with "123456789" + And I fill in "Contact phone" with "123456789" And I select "Bike ($8.00)" from "Option" And I press "Send buy request" And I go to homer's control panel -- libgit2 0.21.2