Skip to content

Commit

Permalink
Merge pull request #5382 from solidusio/elia/admin/orders-index-spec
Browse files Browse the repository at this point in the history
[admin] Add a spec for /admin/orders
  • Loading branch information
elia authored Sep 14, 2023
2 parents 9aba822 + 1de8533 commit 14c0127
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</div>
</div>

<div class="<%= toolbar_classes %>" data-<%= stimulus_id %>-target="batchToolbar" aria-label="<%= t(".batch_actions") %>">
<div class="<%= toolbar_classes %>" data-<%= stimulus_id %>-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) %>
Expand Down
17 changes: 17 additions & 0 deletions admin/spec/features/orders_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

require 'spec_helper'

describe "Orders", type: :feature do
before { sign_in create(:admin_user, email: '[email protected]') }

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

0 comments on commit 14c0127

Please sign in to comment.