mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Update specs for background reports
This commit is contained in:
@@ -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_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",
|
||||
"./spec/system/admin/reports/packing_report_spec.rb",
|
||||
@@ -255,4 +254,5 @@ RSpec.configure do |config|
|
||||
config.include Features::DatepickerHelper, type: :system
|
||||
config.include Features::TrixEditorHelper, type: :system
|
||||
config.include DownloadsHelper, type: :system
|
||||
config.include ReportsHelper, type: :system
|
||||
end
|
||||
|
||||
8
spec/support/reports_helper.rb
Normal file
8
spec/support/reports_helper.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ReportsHelper
|
||||
def run_report
|
||||
click_on "Go"
|
||||
perform_enqueued_jobs(only: ReportJob)
|
||||
end
|
||||
end
|
||||
@@ -163,8 +163,7 @@ describe "Enterprise Summary Fee with Tax Report By Order" do
|
||||
visit admin_reports_path
|
||||
click_on I18n.t("admin.reports.enterprise_fees_with_tax_report_by_order")
|
||||
|
||||
expect(page).to have_button("Go")
|
||||
click_on "Go"
|
||||
run_report
|
||||
|
||||
expect(page.find("table.report__table thead tr").text).to have_content(table_header)
|
||||
|
||||
@@ -242,8 +241,7 @@ describe "Enterprise Summary Fee with Tax Report By Order" do
|
||||
visit admin_reports_path
|
||||
click_on I18n.t("admin.reports.enterprise_fees_with_tax_report_by_order")
|
||||
|
||||
expect(page).to have_button("Go")
|
||||
click_on "Go"
|
||||
run_report
|
||||
|
||||
expect(page.find("table.report__table thead tr").text).to have_content(table_header)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user