From 5168d1ed9c44e7e6ab386a6e3232a4212fcd2e13 Mon Sep 17 00:00:00 2001 From: Travis Grathwell Date: Thu, 14 Mar 2013 01:19:31 -0700 Subject: [PATCH] Attempt to de-flake event volunteer request spec by waiting more --- .travis.yml | 4 +--- config/before-travis.sh | 2 -- spec/requests/event_volunteers_request_spec.rb | 15 +++++++++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b082a7d4..be1d9f9ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,4 @@ before_script: "./config/before-travis.sh" script: "bundle exec rake" notifications: - irc: - channels: - - 'irc.freenode.org:6667#railsbridge' + email: false diff --git a/config/before-travis.sh b/config/before-travis.sh index 2ddfbda69..dea5a377f 100755 --- a/config/before-travis.sh +++ b/config/before-travis.sh @@ -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 diff --git a/spec/requests/event_volunteers_request_spec.rb b/spec/requests/event_volunteers_request_spec.rb index 6f4c26919..b8227d68b 100644 --- a/spec/requests/event_volunteers_request_spec.rb +++ b/spec/requests/event_volunteers_request_spec.rb @@ -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,