From 2fa842e8f740217a002fecf2bc44e0f8658db98d Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Mon, 25 Oct 2021 12:11:56 +0100 Subject: [PATCH] Update/move payments_report_spec into system --- spec/system/admin/reports/packing_report_spec.rb | 2 +- .../admin/reports/payments_report_spec.rb | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) rename spec/{features => system}/admin/reports/payments_report_spec.rb (90%) diff --git a/spec/system/admin/reports/packing_report_spec.rb b/spec/system/admin/reports/packing_report_spec.rb index ad84de8aa3..217c944351 100644 --- a/spec/system/admin/reports/packing_report_spec.rb +++ b/spec/system/admin/reports/packing_report_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "spec_helper" +require "system_helper" describe "Packing Reports", js: true do include AuthenticationHelper diff --git a/spec/features/admin/reports/payments_report_spec.rb b/spec/system/admin/reports/payments_report_spec.rb similarity index 90% rename from spec/features/admin/reports/payments_report_spec.rb rename to spec/system/admin/reports/payments_report_spec.rb index 8b0df8520d..21dede0dca 100644 --- a/spec/features/admin/reports/payments_report_spec.rb +++ b/spec/system/admin/reports/payments_report_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'spec_helper' +require 'system_helper' describe "Payments Reports" do include AuthenticationHelper @@ -40,16 +40,16 @@ describe "Payments Reports" do select I18n.t(:report_itemised_payment), from: "report_type" find("[type='submit']").click - expect(page.find("#listing_orders thead tr").text).to eq([ + expect(page.find("#listing_orders thead tr").text).to have_content([ I18n.t(:report_header_payment_state), I18n.t(:report_header_distributor), I18n.t(:report_header_product_total_price, currency: currency_symbol), I18n.t(:report_header_shipping_total_price, currency: currency_symbol), I18n.t(:report_header_outstanding_balance_price, currency: currency_symbol), I18n.t(:report_header_total_price, currency: currency_symbol) - ].join(" ")) + ].join(" ").upcase) - expect(page.find("#listing_orders tbody tr").text).to eq([ + expect(page.find("#listing_orders tbody tr").text).to have_content([ order.payment_state, order.distributor.name, order.item_total.to_f + other_order.item_total.to_f, @@ -77,7 +77,7 @@ describe "Payments Reports" do select I18n.t(:report_payment_totals), from: "report_type" find("[type='submit']").click - expect(page.find("#listing_orders thead tr").text).to eq([ + expect(page.find("#listing_orders thead tr").text).to have_content([ I18n.t(:report_header_payment_state), I18n.t(:report_header_distributor), I18n.t(:report_header_product_total_price, currency: currency_symbol), @@ -86,9 +86,9 @@ describe "Payments Reports" do I18n.t(:report_header_eft_price, currency: currency_symbol), I18n.t(:report_header_paypal_price, currency: currency_symbol), I18n.t(:report_header_outstanding_balance_price, currency: currency_symbol), - ].join(" ")) + ].join(" ").upcase) - expect(page.find("#listing_orders tbody tr").text).to eq([ + expect(page.find("#listing_orders tbody tr").text).to have_content([ order.payment_state, order.distributor.name, order.item_total.to_f + other_order.item_total.to_f,