Stabilizing a randomly failing test

This commit is contained in:
James Mason 2017-10-12 14:06:02 -07:00 committed by Stella Rouzi
parent f2b5c2627c
commit fc64542202

View file

@ -36,7 +36,14 @@ feature Sponsor do
end
# Remove sponsor
click_link 'Delete'
visit admin_conference_sponsors_path(
conference_id: conference.short_title
)
within('table#sponsors') do
page.accept_confirm do
click_link 'Delete'
end
end
expect(flash).to eq('Sponsor successfully deleted.')
expect(page).to_not have_selector('table#sponsors')
end