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

Fix flaky distributions by county spec #4816

Merged

Conversation

coalest
Copy link
Collaborator

@coalest coalest commented Dec 1, 2024

Doesn't resolve any issue.

Description

This test is flaky and blocking PR #4797 from passing all the tests.
The issue is we are searching for the text "25" which sometimes shows up as the county number, so the count of that text is then wrong.
Error:

Failures:

  1) Distributions by County handles time ranges properly works for this year
     Failure/Error: expect(page).to have_text("25", count: 4)
       expected to find text "25" 4 times but found 5 times in "Need Help?\n1\nDiaper McDiaperface\n \nDashboard\n \nDonations\n \nPurchases\n \nRequests\n \nDistributions\n \nPick Ups & Deliveries\n \nPartner Agencies\n \nInventory\n \nCommunity\n \nReports\n Activity Graph\n Annual Survey\n History\n Distributions - Summary\n Distributions - By County\n Distributions - Itemized\n Distributions - Trends\n Donations - Summary\n Donations - Itemized\n Donations - Manufacturer\n Donations - Trends\n Product Drives - Summary\n Purchases - Summary\n Purchases - Trends\nEstimated Distributions by County for Some Unique Name\n Home\nDistributions\n Filter\nCounty\tEstimated total items\tEstimated total market value\nCounty 26\t25\t$262.50\nCounty 28\t25\t$262.50\nCounty 25\t25\t$262.50\nCounty 27\t25\t$262.50\nUnspecified\t0\t$0.00\nHuman Essentials was built with  by Ruby for Good.". (However, it was found 22 times including non-visible text.)

Example screenshot when it fails:
(Note the text "25" appears 5 times instead of 4 due to the county name)
image

Type of change

  • Fix flaky test

How Has This Been Tested?

Difficult to reproduce locally, but should fix it in CI.

Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I started seeing this pretty often. Thanks!

@dorner dorner merged commit a93fd40 into rubyforgood:main Dec 2, 2024
11 checks passed
Copy link
Contributor

github-actions bot commented Dec 8, 2024

@coalest: Your PR Fix flaky distributions by county spec is part of today's Human Essentials production release: 2024.12.08.
Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants