Stylistic changes, extract commented code to private method

This commit is contained in:
Rohan Mitchell
2013-07-23 17:02:06 +10:00
parent f0755f34aa
commit 638d7b1c33
3 changed files with 15 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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