diff --git a/admin/app/components/solidus_admin/ui/table/component.html.erb b/admin/app/components/solidus_admin/ui/table/component.html.erb index c9fedbe8757..d391bab0648 100644 --- a/admin/app/components/solidus_admin/ui/table/component.html.erb +++ b/admin/app/components/solidus_admin/ui/table/component.html.erb @@ -87,7 +87,7 @@ -
-target="batchToolbar" aria-role="toolbar" aria-label="<%= t(".batch_actions") %>"> +
-target="batchToolbar" role="toolbar" aria-label="<%= t(".batch_actions") %>"> <%= form_tag '', id: batch_actions_form_id %> <% @batch_actions.each do |batch_action| %> <%= render_batch_action_button(batch_action) %> diff --git a/admin/app/components/solidus_admin/ui/toggletip/component.rb b/admin/app/components/solidus_admin/ui/toggletip/component.rb index 417fd7c68a8..03d10c38f21 100644 --- a/admin/app/components/solidus_admin/ui/toggletip/component.rb +++ b/admin/app/components/solidus_admin/ui/toggletip/component.rb @@ -61,7 +61,7 @@ class SolidusAdmin::UI::Toggletip::Component < SolidusAdmin::BaseComponent # @param theme [Symbol] The theme of the toggletip. Defaults to `:light`. See # `THEMES` for available options. def initialize(text:, position: :down, theme: :light, **attributes) - @text = text || guide + @text = text @position = position @theme = theme @attributes = attributes diff --git a/admin/app/controllers/solidus_admin/products_controller.rb b/admin/app/controllers/solidus_admin/products_controller.rb index 3ceaf0640f7..d4a2d6550d8 100644 --- a/admin/app/controllers/solidus_admin/products_controller.rb +++ b/admin/app/controllers/solidus_admin/products_controller.rb @@ -26,7 +26,10 @@ def update redirect_to action: :show, status: :see_other else flash.now[:error] = @product.errors.full_messages.join(", ") - render action: :show, status: :unprocessable_entity + + respond_to do |format| + format.html { render component('products/show').new(product: @product), status: :unprocessable_entity } + end end end diff --git a/admin/spec/features/product_spec.rb b/admin/spec/features/product_spec.rb index 9948b41fb2b..1e65811b63b 100644 --- a/admin/spec/features/product_spec.rb +++ b/admin/spec/features/product_spec.rb @@ -40,6 +40,10 @@ within('header') { click_button "Save" } expect(page).to have_content("Just a product (updated)") + fill_in "Name", with: "" + within('header') { click_button "Save" } + + expect(page).to have_content("Name can't be blank") expect(page).to be_axe_clean end end