From 86847d99da9c62f2eb1dade328b9367c6c8a1226 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Sun, 1 Jul 2012 11:33:40 +1000 Subject: [PATCH] Make Leave Distributor link more intuitive --- app/views/spree/products/_source_sidebar.html.haml | 4 ++-- spec/requests/consumer/distributors_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/spree/products/_source_sidebar.html.haml b/app/views/spree/products/_source_sidebar.html.haml index 2ee2e7da7a..90f7337e6a 100644 --- a/app/views/spree/products/_source_sidebar.html.haml +++ b/app/views/spree/products/_source_sidebar.html.haml @@ -15,5 +15,5 @@ = link_to distributor.name, root_path - else %span.inactive= distributor.name - - if current_distributor && order.can_change_distributor? - %li.nowrap= link_to 'Leave distributor', deselect_distributors_path + - if current_distributor && order.can_change_distributor? + = button_to 'Browse All Distributors', deselect_distributors_path, :method => :get diff --git a/spec/requests/consumer/distributors_spec.rb b/spec/requests/consumer/distributors_spec.rb index 12c3c17091..421c05b2c8 100644 --- a/spec/requests/consumer/distributors_spec.rb +++ b/spec/requests/consumer/distributors_spec.rb @@ -71,7 +71,7 @@ feature %q{ # When I select the distributor and then leave it visit spree.root_path click_link d.name - click_link 'Leave distributor' + click_button 'Browse All Distributors' # Then I should have left the distributor page.should_not have_selector '#current-distributor', :text => 'You are shopping at Melb Uni Co-op'