Update report spec for background reports

This commit is contained in:
Maikel Linke
2023-11-30 14:38:12 +11:00
parent bbe37e1392
commit 0b7cf86b5b
2 changed files with 6 additions and 1 deletions

View File

@@ -98,7 +98,6 @@ RSpec.configure do |config|
Flipper.disable(:background_reports) if example.file_path.in?(
[
# rubocop:disable Layout/LineLength
"./spec/system/admin/reports/enterprise_fee_summaries_spec.rb",
"./spec/system/admin/reports/enterprise_summary_fees/enterprise_summary_fee_with_tax_report_by_order_spec.rb",
"./spec/system/admin/reports/enterprise_summary_fees/enterprise_summary_fee_with_tax_report_by_producer_spec.rb",
"./spec/system/admin/reports/orders_and_fulfillment_spec.rb",

View File

@@ -94,6 +94,8 @@ describe "enterprise fee summaries" do
it "generates file with data for all enterprises" do
select "CSV"
click_on "Go"
perform_enqueued_jobs(only: ReportJob)
click_on "Download Report"
expect(downloaded_filename).to include ".csv"
expect(downloaded_content).to have_content(distributor.name)
end
@@ -117,6 +119,8 @@ describe "enterprise fee summaries" do
it "generates file with data for the enterprise" do
select "CSV"
click_on "Go"
perform_enqueued_jobs(only: ReportJob)
click_on "Download Report"
expect(downloaded_filename).to include ".csv"
expect(downloaded_content).to have_content(distributor.name)
@@ -151,6 +155,8 @@ describe "enterprise fee summaries" do
find("#report_format").click
select "CSV"
click_on "Go"
perform_enqueued_jobs(only: ReportJob)
click_on "Download Report"
expect(downloaded_filename).to include ".csv"
expect(downloaded_content).to have_content(distributor.name)