Replace flash helper with "within"

So we can't forget to find "#flash" on the page ever again...
This commit is contained in:
Henne Vogelsang 2025-08-06 13:04:53 +02:00
parent bc1a21ae46
commit df0b9ab356
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
29 changed files with 116 additions and 180 deletions

View file

@ -20,8 +20,8 @@ feature 'Version' do
fill_in 'contact_social_tag', with: 'example'
fill_in 'contact_googleplus', with: 'http:\\www.google.com'
click_button 'Update Contact'
page.find('#flash')
expect(flash).to eq('Contact details were successfully updated.')
within('#flash') { expect(page).to have_text('Contact details were successfully updated.') }
visit admin_revision_history_path
expect(page).to have_text("#{organizer.name} updated social tag, email, googleplus and sponsor email of contact details in conference #{conference.short_title}")