Merge branch 'master' into moving-users

This commit is contained in:
Shlok Srivastava 2017-08-01 13:20:51 +05:30 committed by GitHub
commit 6b55a28813
53 changed files with 1105 additions and 318 deletions

View file

@ -249,6 +249,16 @@ feature 'Has correct abilities' do
visit admin_conference_roles_path(conference.short_title)
expect(current_path).to eq(admin_conference_roles_path(conference.short_title))
visit admin_conference_booths_path(conference.short_title)
expect(current_path).to eq(admin_conference_booths_path(conference.short_title))
visit new_admin_conference_booth_path(conference.short_title)
expect(current_path).to eq(new_admin_conference_booth_path(conference.short_title))
create(:booth, conference: conference)
visit edit_admin_conference_booth_path(conference.short_title, conference.booths.first)
expect(current_path).to eq(edit_admin_conference_booth_path(conference.short_title, conference.booths.first))
visit admin_conference_resources_path(conference.short_title)
expect(current_path).to eq(admin_conference_resources_path(conference.short_title))

View file

@ -237,6 +237,16 @@ feature 'Has correct abilities' do
visit edit_admin_conference_target_path(conference.short_title, conference.targets.first)
expect(current_path).to eq(edit_admin_conference_target_path(conference.short_title, conference.targets.first))
visit admin_conference_booths_path(conference.short_title)
expect(current_path).to eq(admin_conference_booths_path(conference.short_title))
visit new_admin_conference_booth_path(conference.short_title)
expect(current_path).to eq(new_admin_conference_booth_path(conference.short_title))
create(:booth, conference: conference)
visit edit_admin_conference_booth_path(conference.short_title, conference.booths.first)
expect(current_path).to eq(edit_admin_conference_booth_path(conference.short_title, conference.booths.first))
visit admin_conference_program_tracks_path(conference.short_title)
expect(current_path).to eq(admin_conference_program_tracks_path(conference.short_title))

View file

@ -28,23 +28,23 @@ feature Event do
scenario 'rejects a proposal', feature: true, js: true do
visit admin_conference_program_events_path(conference.short_title)
expect(page.has_content?('Example Proposal')).to be true
expect(page).to have_content 'Example Proposal'
click_button 'New'
click_link "reject_event_#{@event.id}"
expect(flash).to eq('Event rejected!')
expect(page).to have_content 'Event rejected!'
@event.reload
expect(@event.state).to eq('rejected')
end
scenario 'accepts a proposal', feature: true, js: true do
visit admin_conference_program_events_path(conference.short_title)
expect(page.has_content?('Example Proposal')).to be true
expect(page).to have_content 'Example Proposal'
click_button 'New'
click_link "accept_event_#{@event.id}"
expect(flash).to eq('Event accepted!')
expect(page.has_content?('Unconfirmed')).to be true
expect(page).to have_content 'Event accepted!'
expect(page).to have_content 'Unconfirmed'
@event.reload
expect(@event.state).to eq('unconfirmed')
end
@ -52,11 +52,11 @@ feature Event do
scenario 'restarts review of a proposal', feature: true, js: true do
@event.reject!(@options)
visit admin_conference_program_events_path(conference.short_title)
expect(page.has_content?('Example Proposal')).to be true
expect(page).to have_content 'Example Proposal'
click_button 'Rejected'
click_link "restart_event_#{@event.id}"
expect(flash).to eq('Review started!')
expect(page).to have_content 'Review started!'
@event.reload
expect(@event.state).to eq('new')
end
@ -83,7 +83,7 @@ feature Event do
fill_in 'event_abstract', with: 'Lorem ipsum abstract'
click_button 'Create Proposal'
expect(flash).to eq('Proposal was successfully submitted.')
expect(page).to have_content 'Proposal was successfully submitted.'
expect(Event.count).to eq(expected_count_event)
expect(User.count).to eq(expected_count_user)
@ -101,7 +101,7 @@ feature Event do
select('Easy', from: 'event[difficulty_level_id]')
click_button 'Update Proposal'
expect(flash).to eq('Proposal was successfully updated.')
expect(page).to have_content 'Proposal was successfully updated.'
end
scenario 'signed_in user submits a valid proposal', feature: true, js: true do
@ -119,7 +119,7 @@ feature Event do
fill_in 'event_description', with: 'Lorem ipsum description'
click_button 'Create Proposal'
expect(flash).to eq('Proposal was successfully submitted.')
expect(page).to have_content 'Proposal was successfully submitted.'
expect(current_path).to eq(conference_program_proposals_path(conference.short_title))
expect(Event.count).to eq(expected_count)
@ -128,11 +128,10 @@ feature Event do
scenario 'confirms a proposal', feature: true, js: true do
sign_in participant
visit conference_program_proposals_path(conference.short_title)
expect(page.has_content?('Example Proposal')).to be true
expect(page).to have_content 'Example Proposal'
expect(@event.state).to eq('unconfirmed')
click_link "confirm_proposal_#{@event.id}"
expect(flash)
.to eq('The proposal was confirmed. Please register to attend the conference.')
expect(page).to have_content 'The proposal was confirmed. Please register to attend the conference.'
expect(current_path).to eq(new_conference_conference_registration_path(conference.short_title))
@event.reload
expect(@event.state).to eq('confirmed')
@ -142,9 +141,9 @@ feature Event do
sign_in participant
@event.confirm!
visit conference_program_proposals_path(conference.short_title)
expect(page.has_content?('Example Proposal')).to be true
expect(page).to have_content 'Example Proposal'
click_link "delete_proposal_#{@event.id}"
expect(flash).to eq('Proposal was successfully withdrawn.')
expect(page).to have_content 'Proposal was successfully withdrawn.'
@event.reload
expect(@event.state).to eq('withdrawn')
end