Use helpers for repeated event dropdown links

This commit is contained in:
James Mason 2018-02-13 16:33:11 -08:00
parent 4c58104a65
commit ad19a6d753
7 changed files with 370 additions and 146 deletions

View file

@ -30,8 +30,8 @@ feature Event do
visit admin_conference_program_events_path(conference.short_title)
expect(page).to have_content 'Example Proposal'
click_button 'New'
click_link "reject_event_#{@event.id}"
click_on 'New'
click_link 'Reject'
expect(page).to have_content 'Event rejected!'
@event.reload
expect(@event.state).to eq('rejected')
@ -41,8 +41,8 @@ feature Event do
visit admin_conference_program_events_path(conference.short_title)
expect(page).to have_content 'Example Proposal'
click_button 'New'
click_link "accept_event_#{@event.id}"
click_on 'New'
click_link 'Accept'
expect(page).to have_content 'Event accepted!'
expect(page).to have_content 'Unconfirmed'
@event.reload
@ -54,8 +54,8 @@ feature Event do
visit admin_conference_program_events_path(conference.short_title)
expect(page).to have_content 'Example Proposal'
click_button 'Rejected'
click_link "restart_event_#{@event.id}"
click_on 'Rejected'
click_link 'Start review'
expect(page).to have_content 'Review started!'
@event.reload
expect(@event.state).to eq('new')

View file

@ -189,8 +189,8 @@ feature 'Version' do
click_button 'Update Proposal'
visit admin_conference_program_events_path(conference.short_title)
click_button 'New'
click_link 'Reject event'
click_on 'New'
click_link 'Reject'
visit conference_program_proposals_path(conference_id: conference.short_title)
within('#events') do
@ -198,15 +198,15 @@ feature 'Version' do
end
visit admin_conference_program_events_path(conference.short_title)
click_button 'New'
click_link 'Accept event'
click_on 'New'
click_link 'Accept'
visit conference_program_proposals_path(conference_id: conference.short_title)
click_link 'Confirm'
visit admin_conference_program_events_path(conference.short_title)
click_button 'Confirmed'
click_link 'Cancel event'
click_on 'Confirmed'
click_link 'Cancel'
visit admin_revision_history_path
expect(page).to have_text("#{organizer.name} submitted new event ABC in conference #{conference.short_title}")