mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Stylistic changes, extract commented code to private method
This commit is contained in:
@@ -233,9 +233,9 @@ div#eft-payment-alert {
|
||||
|
||||
/* Large 'Save and Continue/Process My Order' button under Order Summary on the checkout pages */
|
||||
#add_new_save_checkout_button {
|
||||
display:none;
|
||||
margin-top: 30px;
|
||||
padding-top:10px;
|
||||
display: none;
|
||||
margin-top: 30px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #d9d9db;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
:form=> "checkout_form_#{@order.state}" %>
|
||||
<script>
|
||||
//Show additional button only if form attribute is supported
|
||||
if ($("#add_new_save_checkout_button input[type=submit]")[0].form)
|
||||
{
|
||||
if ($("#add_new_save_checkout_button input[type=submit]")[0].form) {
|
||||
$("#add_new_save_checkout_button").show();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -135,16 +135,14 @@ feature %q{
|
||||
page.should have_selector "select#order_distributor_id option[value='#{@distributor_alternative.id}']"
|
||||
|
||||
#click_button 'Save and Continue'
|
||||
page.find('#add_new_save_checkout_button input[type=submit]').click
|
||||
click_continue_button
|
||||
|
||||
# -- Checkout: Delivery
|
||||
page.should have_selector 'label', :text => "Delivery $3.00"
|
||||
#click_button 'Save and Continue'
|
||||
page.find('#add_new_save_checkout_button input[type=submit]').click
|
||||
click_continue_button
|
||||
|
||||
# -- Checkout: Payment
|
||||
#click_button 'Process My Order'
|
||||
page.find('#add_new_save_checkout_button input[type=submit]').click
|
||||
click_continue_button
|
||||
|
||||
# -- Checkout: Order complete
|
||||
page.should have_content('Your order has been processed successfully')
|
||||
@@ -155,4 +153,12 @@ feature %q{
|
||||
# page.should have_content('On Tuesday, 4 PM')
|
||||
# page.should have_content('12 Bungee Rd, Carion')
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def click_continue_button
|
||||
page.find('#add_new_save_checkout_button input[type=submit]').click
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user