diff --git a/app/views/enterprises/show.html.haml b/app/views/enterprises/show.html.haml index b99d5aacfd..3026952714 100644 --- a/app/views/enterprises/show.html.haml +++ b/app/views/enterprises/show.html.haml @@ -1,4 +1,5 @@ -%h2= @enterprise.name +- if @enterprise != current_order(false).andand.distributor + %h2= @enterprise.name .enterprise-description= @enterprise.long_description.andand.html_safe diff --git a/spec/features/consumer/browse_products_spec.rb b/spec/features/consumer/browse_products_spec.rb index 849c98a7bf..214d674dbf 100644 --- a/spec/features/consumer/browse_products_spec.rb +++ b/spec/features/consumer/browse_products_spec.rb @@ -18,7 +18,7 @@ feature %q{ visit spree.select_distributor_order_path(d) # Then I should see the name of the distributor that I've selected - page.should have_selector 'h2', :text => 'Melb Uni Co-op' + page.should have_selector 'h1', :text => 'Melb Uni Co-op' # And I should see the distributor's long description page.should have_selector 'div.enterprise-description', :text => 'Hello, world!' diff --git a/spec/features/consumer/distributors_spec.rb b/spec/features/consumer/distributors_spec.rb index 5c315e6d6c..1871af4a72 100644 --- a/spec/features/consumer/distributors_spec.rb +++ b/spec/features/consumer/distributors_spec.rb @@ -101,10 +101,9 @@ feature %q{ # And when I choose an order cycle select_by_value order_cycle.id, :from => 'order_order_cycle_id' - page.execute_script "$('#order_order_cycle_id').trigger('change');" # Then I should see the distributor details - page.should have_selector 'h2', :text => d1.name + page.should have_selector 'h1', :text => d1.name page.should have_selector 'div.enterprise-description', :text => 'Hello, world!' # And I should see the first, but not the second product