Replace flash helper with "within"
So we can't forget to find "#flash" on the page ever again...
This commit is contained in:
parent
bc1a21ae46
commit
df0b9ab356
29 changed files with 116 additions and 180 deletions
|
|
@ -25,8 +25,8 @@ feature Sponsor do
|
|||
select(conference.sponsorship_levels.first.title, from: 'sponsor_sponsorship_level_id')
|
||||
|
||||
click_button 'Create Sponsor'
|
||||
page.find('#flash')
|
||||
expect(flash).to eq('Sponsor successfully created.')
|
||||
|
||||
within('#flash') { expect(page).to have_text('Sponsor successfully created.') }
|
||||
within('table#sponsors') do
|
||||
expect(page.has_content?('SUSE')).to be true
|
||||
expect(page.has_content?('The original provider')).to be true
|
||||
|
|
@ -45,8 +45,7 @@ feature Sponsor do
|
|||
click_link 'Delete'
|
||||
end
|
||||
end
|
||||
page.find('#flash')
|
||||
expect(flash).to eq('Sponsor successfully deleted.')
|
||||
within('#flash') { expect(page).to have_text('Sponsor successfully deleted.') }
|
||||
expect(page).to have_no_selector('table#sponsors')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue