mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
hide shipping icons from suppliers
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
- if local_assigns[:success]
|
||||
%i.success.icon-ok-sign{"data-controller": "ephemeral"}
|
||||
= render AdminTooltipComponent.new(text: t('spree.admin.orders.index.edit'), link_text: "", link: edit_admin_order_path(order), link_class: "icon_link with-tip icon-edit no-text")
|
||||
- if order.ready_to_ship?
|
||||
- if spree_current_user.can_manage_orders? && order.ready_to_ship?
|
||||
%form
|
||||
= render ShipOrderComponent.new(order: order)
|
||||
= render partial: 'admin/shared/tooltip_button', locals: {button_class: "icon-road icon_link with-tip no-text", reflex_data_id: order.id.to_s, tooltip_text: t('spree.admin.orders.index.ship'), shipment: true}
|
||||
|
||||
@@ -83,6 +83,12 @@ RSpec.describe 'As a producer who have the ability to update orders' do
|
||||
expect(page).to have_selector('tr', count: 1) # Only one order
|
||||
expect(page).to have_selector('td', text: name, count: 1)
|
||||
expect(page).to have_selector('td', text: email, count: 1)
|
||||
within 'td.actions' do
|
||||
# to have edit button
|
||||
expect(page).to have_selector("a.icon-edit")
|
||||
# not to have ship button
|
||||
expect(page).not_to have_selector('button.icon-road')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user