Skip to content

Commit

Permalink
Attempt to de-flake event volunteer request spec by waiting more
Browse files Browse the repository at this point in the history
  • Loading branch information
tjgrathwell committed Mar 14, 2013
1 parent 3c3df6f commit 5168d1e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ before_script: "./config/before-travis.sh"
script: "bundle exec rake"

notifications:
irc:
channels:
- 'irc.freenode.org:6667#railsbridge'
email: false
2 changes: 0 additions & 2 deletions config/before-travis.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
sudo ci/install_phantomjs
export PATH=phantomjs/bin:$PATH
phantomjs --version
bundle exec rake db:create:all
bundle exec rake db:migrate
15 changes: 11 additions & 4 deletions spec/requests/event_volunteers_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,27 @@
visit "/events/#{@event.id}/volunteers"
end

def wait_for_save
within '#saving_indicator' do
page.should have_content 'Saved!'
end
end

it 'allows organizers to change volunteer assignments' do
within "#edit_rsvp_#{@rsvp1.id}" do
choose('TA')
end
wait_for_save

within "#edit_rsvp_#{@rsvp2.id}" do
choose('Unassigned')
end
wait_for_save

within "#edit_rsvp_#{@rsvp3.id}" do
choose('Teacher')
end

within '#saving_indicator' do
page.should have_content 'Saved!'
end
wait_for_save

[@rsvp1, @rsvp2, @rsvp3].map { |rsvp| rsvp.reload.volunteer_assignment_id }.should == [
VolunteerAssignment::TA,
Expand Down

0 comments on commit 5168d1e

Please sign in to comment.