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 spec: Ballots Groups Change my heading #3460

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

javierm
Copy link
Member

@javierm javierm commented Apr 25, 2019

References

Objectives

Check page after an AJAX call so the test doesn't fail sometimes due to two requests being processed simultaneosly.

Notes

  • This test started to fail after upgrading to Rails 5, since we removed the change done in commit eda47ef which set config.allow_concurrency to false in the test environment.
  • This test failed with two possible errors: "undefined method `heading' for nil:NilClass" and "stale element reference: element is not attached to the page document". This change fixes the second error; it might fix the first error as well, but since I couldn't reproduce it locally, we'll only be sure when this test stops failing in travis builds.

We were sending a new request without checking the previous one had
finished, and if it hadn't finished, the test failed.

This test started to fail after upgrading to Rails 5, since we removed
the change done in commit eda47ef which set `config.allow_concurrency`
to `false` in the test environment.

While we could re-introduce that configuration option, which might have
side effects, an easier solution is to check an AJAX request has been
completed before sending a new request depending on the previous one
seems to be a more solid option.

Note this test failed with two possible errors: "undefined method
`heading' for nil:NilClass" and "stale element reference: element is not
attached to the page document". This change fixes the second error; it
might fix the first error as well, but since I couldn't reproduce it
locally, we'll only be sure when this test stops failing in travis
builds.
@javierm javierm self-assigned this Apr 25, 2019
@javierm javierm merged commit e13c4d8 into master Apr 25, 2019
@javierm javierm deleted the backport-fix_remove_ballot_spec branch April 25, 2019 20:30
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.

Flaky spec: Ballots Groups Change my heading
2 participants