diff --git a/app/views/spree/admin/orders/_table_row.html.haml b/app/views/spree/admin/orders/_table_row.html.haml index 42357d161e..b65e59a399 100644 --- a/app/views/spree/admin/orders/_table_row.html.haml +++ b/app/views/spree/admin/orders/_table_row.html.haml @@ -41,7 +41,7 @@ %div.row-loading-icons - if local_assigns[:success] %i.success.icon-ok-sign{"data-controller": "ephemeral"} - %a.icon_link.with-tip.icon-edit.no-text{href: edit_admin_order_path(order), 'ofn-with-tip' => t('spree.admin.orders.index.edit')} + %a.icon_link.with-tip.icon-edit.no-text{href: edit_admin_order_path(order), "data-controller": "tooltip", "data-tooltip-tip-value": t('spree.admin.orders.index.edit'), "data-tooltip-target": "element"} - if order.ready_to_ship? %div{ "data-controller": "tooltip", "data-tooltip-tip-value": t('spree.admin.orders.index.ship') } %button.icon-road.icon_link.with-tip.no-text{"data-reflex": "click->Admin::OrdersReflex#ship", "data-id": order.id.to_s, diff --git a/app/webpacker/css/admin/components/tooltip.scss b/app/webpacker/css/admin/components/tooltip.scss index 13205329f6..0776542354 100644 --- a/app/webpacker/css/admin/components/tooltip.scss +++ b/app/webpacker/css/admin/components/tooltip.scss @@ -16,6 +16,7 @@ color: #fff; max-width: 240px; white-space: normal; + text-transform: capitalize; } .arrow { diff --git a/spec/system/admin/orders_spec.rb b/spec/system/admin/orders_spec.rb index d7d4131eb7..0cab43a75b 100644 --- a/spec/system/admin/orders_spec.rb +++ b/spec/system/admin/orders_spec.rb @@ -683,7 +683,7 @@ distributors: [distributor4, distributor5]) } # mouse-hovers and finds tooltip find(".icon-road").hover - expect(page).to have_content "SHIP" + expect(page).to have_content "Ship" end within "tr#order_#{order.id}" do @@ -692,20 +692,18 @@ distributors: [distributor4, distributor5]) } # mouse-hovers and finds tooltip find(".icon-capture").hover - expect(page).to have_content "CAPTURE" + expect(page).to have_content "Capture" end end it "displays Edit tooltip" do - pending("issue #10956") - within "tr#order_#{order.id}" do # checks shipment state expect(page).to have_content "PENDING" # mouse-hovers and finds tooltip find(".icon-edit").hover - expect(page).to have_content "EDIT" + expect(page).to have_content "Edit" end end end