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
|
|
@ -38,7 +38,6 @@ feature Registration do
|
|||
page.accept_alert do
|
||||
click_link 'Unregister'
|
||||
end
|
||||
page.find('#flash')
|
||||
expect(page).to have_content('not registered')
|
||||
expect(conference.user_registered?(participant)).to be(false)
|
||||
end
|
||||
|
|
@ -48,8 +47,7 @@ feature Registration do
|
|||
scenario 'registers for a conference', feature: true, js: true do
|
||||
visit new_conference_conference_registration_path(conference.short_title)
|
||||
click_button 'Register'
|
||||
page.find('#flash')
|
||||
expect(flash).to eq('You are now registered and will be receiving E-Mail notifications.')
|
||||
within('#flash') { expect(page).to have_text('You are now registered and will be receiving E-Mail notifications.') }
|
||||
|
||||
expect(conference.user_registered?(participant)).to be(true)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue