Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flaky] PDF file download - './spec/system/admin/reports/sales_tax/sales_tax_totals_by_order_spec.rb #12829

Closed
filipefurtad0 opened this issue Aug 29, 2024 · 0 comments · Fixed by #12830

Comments

@filipefurtad0
Copy link
Contributor

What we should change and why (this is tech debt)


   1) Sales Tax Totals By order should filter by customer downloading behaves like reports generated as PDF downloads the file
     Got 0 failures and 2 other errors:
     Shared Example Group: "reports generated as" called from ./spec/system/admin/reports/sales_tax/sales_tax_totals_by_order_spec.rb:460

     1.1) Failure/Error:
            Timeout.timeout(TIMEOUT) do
              sleep 0.1 until downloaded?
            end
          
          Timeout::Error:
            execution expired
          # ./spec/support/downloads_helper.rb:28:in `wait_for_download'
          # ./spec/system/admin/reports/sales_tax/sales_tax_totals_by_order_spec.rb:475:in `generate_report'
          # ./spec/system/admin/reports/sales_tax/sales_tax_totals_by_order_spec.rb:428:in `block (7 levels) in <top (required)>'
          # ./spec/system/admin/reports/sales_tax/sales_tax_totals_by_order_spec.rb:428:in `block (6 levels) in <top (required)>'
          # ./spec/system/support/cuprite_setup.rb:39:in `block (2 levels) in <top (required)>'
          # ./spec/base_spec_helper.rb:153:in `block (3 levels) in <main>'
          # ./spec/base_spec_helper.rb:153:in `block (2 levels) in <main>'
          # ------------------
          # --- Caused by: ---
          # Timeout::ExitException:
          #   execution expired
          #   ./spec/support/downloads_helper.rb:29:in `sleep'

     1.2) Failure/Error: return super unless Capybara.last_used_session
          
          Ferrum::TimeoutError:
            Timed out waiting for response. It's possible that this happened because something took a very long time (for example a page load was slow). If so, setting the :timeout option to a higher value might help.
          # ./spec/system/support/cuprite_helpers.rb:25:in `take_screenshot'
          # ./spec/system/support/cuprite_setup.rb:39:in `block (2 levels) in <top (required)>'
          # ./spec/base_spec_helper.rb:153:in `block (3 levels) in <main>'
          # ./spec/base_spec_helper.rb:153:in `block (2 levels) in <main>'

Finished in 4 minutes 19.2 seconds (files took 3.61 seconds to load)
54 examples, 1 failure, 4 pending

Failed examples:

rspec './spec/system/admin/reports/sales_tax/sales_tax_totals_by_order_spec.rb[1:3:5:3:1:1]' # Sales Tax Totals By order should filter by customer downloading behaves like reports generated as PDF downloads the file

Context

https://github.com/openfoodfoundation/openfoodnetwork/actions/runs/10604450214/job/29425421763?pr=12824

Impact and timeline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant