spec: fix intermittent jobs spec failure

Change-Id: I20604212b2698ff7c10fd556fd4a5f809f88c6ad
Reviewed-on: https://gerrit.instructure.com/10948
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
This commit is contained in:
Jake Sorce 2012-05-22 14:14:42 -06:00
parent 9d205622c3
commit 4eeb2cca04
1 changed files with 7 additions and 4 deletions

View File

@ -173,13 +173,16 @@ describe "jobs ui" do
it "should confirm that clicking on delete button should delete all jobs" do
filter_jobs(FlavorTags::ALL)
f("#select-all-jobs").click
validate_all_jobs_selected
f("#jobs-grid .odd").should be_displayed
f("#jobs-grid .even").should be_displayed
f("#jobs-total").text.should eql "3"
f("#delete-jobs").click
driver.switch_to.alert.should_not be_nil
driver.switch_to.alert.accept
keep_trying_until do
f("#delete-jobs").click
driver.switch_to.alert.should_not be_nil
driver.switch_to.alert.accept
true
end
wait_for_ajax_requests
f("#jobs-grid .odd").should be_nil
f("#jobs-grid .even").should be_nil