andrew/24pullrequests — pull request #574 by rowanhill (2013-12-18 23:18:39+00:00)
Title: Update gift dropdown after pull requests sync

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