Update gift dropdown after pull requests sync #574
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for issue #567 (by adding some data-attributes to the .pull_request elements and using that data to populate the dropdown after a sync) - but I'm not happy with it!
The big problem with it is the #TODO in the dashboard_spec.rb: there's a sleep in there, because I can't seem to convince Capybara to wait for the spinner to disappear. I'm pretty rusty with Rails, though, so I'm sure I'm just missing something obvious - can anyone point me in the right direction? I'll very happily update this PR if so.
As the comment says, I've tried
page.find('#spinner', visible: false)
, but that doesn't appear to introduce a wait at all. I thought this might be because the find was executing before the spinner had been shown, but searching for visible:true followed by visible:false didn't seem to wait, either. I've tried various other things (e.g.page.should have_selector('#spinner', visible:false)
,page.find('#spinner').should_not be_visible
) but all without success.As I say, any pointers gratefully received!
Thanks,
Rowan