diff --git a/spec/system/admin/reports/customers_report_spec.rb b/spec/system/admin/reports/customers_report_spec.rb index 7f5caaab46..a9fc0746c8 100644 --- a/spec/system/admin/reports/customers_report_spec.rb +++ b/spec/system/admin/reports/customers_report_spec.rb @@ -14,12 +14,14 @@ RSpec.describe "Customers report" do end run_report - rows = find("table.report__table").all("thead tr") - table = rows.map { |r| r.all("th").map { |c| c.text.strip } } - expect(table.sort).to eq([ - ["First Name", "Last Name", "Billing Address", "Email", "Phone", "Hub", "Hub Address", - "Shipping Method", "Total Number of Orders", "Total incl. tax ($)", - "Last completed order date"] - ].sort) + expect(table_headers).to eq( + [ + [ + "First Name", "Last Name", "Billing Address", "Email", "Phone", + "Hub", "Hub Address", "Shipping Method", "Total Number of Orders", + "Total incl. tax ($)", "Last completed order date", + ] + ] + ) end end