From 6d5134383b34354bd9464f0908a3854992178b38 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Thu, 14 Sep 2023 12:43:28 +0200 Subject: [PATCH 1/2] Add a missing aria-role to the batch actions toolbar --- admin/app/components/solidus_admin/ui/table/component.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 67321a9db0a..c9fedbe8757 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-label="<%= t(".batch_actions") %>"> +
-target="batchToolbar" aria-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) %> From 1de8533cd6b2fd719700a274435a0720eb1422a0 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Thu, 14 Sep 2023 12:52:14 +0200 Subject: [PATCH 2/2] Add a spec for /admin/orders --- admin/spec/features/orders_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 admin/spec/features/orders_spec.rb diff --git a/admin/spec/features/orders_spec.rb b/admin/spec/features/orders_spec.rb new file mode 100644 index 00000000000..4761d320585 --- /dev/null +++ b/admin/spec/features/orders_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe "Orders", type: :feature do + before { sign_in create(:admin_user, email: 'admin@example.com') } + + it "lists products", :js do + create(:order, number: "R123456789", total: 19.99) + + visit "/admin/orders" + + expect(page).to have_content("R123456789") + expect(page).to have_content("$19.99") + expect(page).to be_axe_clean + end +end