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

[Backport] Fix flaky spec checking price without currency symbol #3115

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

microweb10
Copy link
Member

References

PR AyuntamientoMadrid#1758

Error message

bin/rspec --seed 53044

Failures:

  1) Budget Investments Balloting Phase Confirm
     Failure/Error: expect(page).not_to have_content "#{sp3.price}"
       expected not to find text "100" in "Global Group - Global Heading You still have €999,989 to invest. Amount spent €11 Budget Investment 1006 title €10 Budget Investment 1005 title €1"
     # ./spec/features/budgets/investments_spec.rb:1466:in `block (4 levels) in <top (required)>'
     # ./spec/features/budgets/investments_spec.rb:1458:in `block (3 levels) in <top (required)>'
     # -e:1:in `<main>'

Failed examples:

rspec ./spec/features/budgets/investments_spec.rb:1419 # Budget Investments Balloting Phase Confirm

Explain why the test is flaky

When we check the price not to appear we don't include the currency symbol, so if the number is anywhere else the test will fail.

Explain why your PR fixes it

We will check the number doesn't appear, but with the currency symbol.

bin/rspec --seed 53044

Failures:

  1) Budget Investments Balloting Phase Confirm
     Failure/Error: expect(page).not_to have_content "#{sp3.price}"
       expected not to find text "100" in "Global Group - Global Heading You still have €999,989 to invest. Amount spent €11 Budget Investment 1006 title €10 Budget Investment 1005 title €1"
     # ./spec/features/budgets/investments_spec.rb:1466:in `block (4 levels) in <top (required)>'
     # ./spec/features/budgets/investments_spec.rb:1458:in `block (3 levels) in <top (required)>'
     # -e:1:in `<main>'

Failed examples:

rspec ./spec/features/budgets/investments_spec.rb:1419 # Budget Investments Balloting Phase Confirm
@microweb10 microweb10 merged commit a421df3 into master Dec 19, 2018
@microweb10 microweb10 deleted the backport-1758-flaky_spec_currency_symbol branch December 19, 2018 16:29
@javierm javierm assigned javierm and unassigned javierm Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants