-
Notifications
You must be signed in to change notification settings - Fork 17
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 intermittent failing tests #1057
Conversation
@oscarwyatt Not sure this is resolved - still getting the same errors, e.g:
and
I've been taking a look this afternoon too, but haven't managed to make any progress on it. I think if we still don't have a solution tomorrow we should probably remove this test for now so we're not slowing other people down in government-frontend (as it's updated quite often). We can add it back in when we're confident it's working 🙂 |
@vanitabarrett I think you're probably right.
Although it's not exactly clear why this is happening in CI. I've made an amendment to load the file directly from source, which isn't ideal as someone could come along and change which file is used. If this still isn't working I'm happy for you to get rid of it and I'll try and think of a better way of testing the config file |
Dynamically generate the tests, not the assertions based on the links out config. This will allow us to see which test is failing and decreases the chance of a test timing out.
Let's see if the approach set out in the Rails documentation works now that we have refactored related tests.
@vanitabarrett @oscarwyatt I've made some changes that I hope will help this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good 👍 Rebuilt a few times and all passed too
Improves further on PR #1052. Moved custom configuration to a before_initialize block which seems to solve a problem with the config not being available in test environment. Based on the following stackoverflow post
https://stackoverflow.com/a/44770663
Trello: https://trello.com/c/toblYkmD/133-investigate-and-fix-failing-tests-on-government-frontend
Visual regression results:
https://government-frontend-pr-1057.surge.sh/gallery.html
Component guide for this PR:
https://government-frontend-pr-1057.herokuapp.com/component-guide