Merge branch 'master' into org-name-in-conf
This commit is contained in:
commit
e652880dd1
120 changed files with 2844 additions and 408 deletions
|
|
@ -64,29 +64,51 @@ feature 'Has correct abilities' do
|
|||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
# Both event and booth exists
|
||||
# Event and booth cfps exist
|
||||
cfb = create(:cfp, cfp_type: 'booths', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq root_path
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, conference.program.cfp)
|
||||
expect(current_path).to eq(edit_admin_conference_program_cfp_path(conference.short_title, conference.program.cfp))
|
||||
|
||||
# Event, booth, track cfps exist
|
||||
call_for_tracks = create(:cfp, cfp_type: 'tracks', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq root_path
|
||||
|
||||
# Booth and track cfps exist
|
||||
conference.program.cfp.destroy!
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
# Only booth exists
|
||||
call_for_tracks.destroy!
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, cfb)
|
||||
expect(current_path). to eq(edit_admin_conference_program_cfp_path(conference.short_title, cfb))
|
||||
|
||||
# No cfp exists
|
||||
cfb.destroy
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
# Only Tracks cfp exists
|
||||
call_for_tracks = create(:cfp, cfp_type: 'tracks', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, call_for_tracks)
|
||||
expect(current_path).to eq edit_admin_conference_program_cfp_path(conference.short_title, call_for_tracks)
|
||||
|
||||
# Event and track cfps exist
|
||||
create(:cfp, cfp_type: 'events', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
call_for_tracks.destroy!
|
||||
create(:event, program: conference.program)
|
||||
visit edit_admin_conference_program_event_path(conference.short_title, conference.program.events.first)
|
||||
expect(current_path).to eq(edit_admin_conference_program_event_path(conference.short_title, conference.program.events.first))
|
||||
|
|
@ -269,6 +291,12 @@ feature 'Has correct abilities' do
|
|||
visit edit_admin_conference_resource_path(conference.short_title, conference.resources.first)
|
||||
expect(current_path).to eq(edit_admin_conference_resource_path(conference.short_title, conference.resources.first))
|
||||
|
||||
visit admin_users_path
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_user_path(user_cfp)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(current_path).to eq(root_path)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -73,6 +73,15 @@ feature Conference do
|
|||
end
|
||||
|
||||
describe 'admin' do
|
||||
let!(:conference) { create(:conference) }
|
||||
|
||||
scenario 'has organization name in menu bar for conference views', feature: true, js: true do
|
||||
sign_in user
|
||||
visit admin_conference_path(conference.short_title)
|
||||
|
||||
expect(find('.navbar-brand').text).to eq(conference.organization.name)
|
||||
end
|
||||
|
||||
it_behaves_like 'add and update conference'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -237,6 +237,12 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_program_tracks_path(conference.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_users_path
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_user_path(user_info_desk)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_conference_emails_path(conference.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -106,29 +106,51 @@ feature 'Has correct abilities' do
|
|||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
# Both event and booth exists
|
||||
# Event and booth cfps exist
|
||||
cfb = create(:cfp, cfp_type: 'booths', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq root_path
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, conference.program.cfp)
|
||||
expect(current_path).to eq(edit_admin_conference_program_cfp_path(conference.short_title, conference.program.cfp))
|
||||
|
||||
# Event, booth, track cfps exist
|
||||
call_for_tracks = create(:cfp, cfp_type: 'tracks', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq root_path
|
||||
|
||||
# Booth and track cfps exist
|
||||
conference.program.cfp.destroy!
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
# Only booth exists
|
||||
call_for_tracks.destroy!
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, cfb)
|
||||
expect(current_path). to eq(edit_admin_conference_program_cfp_path(conference.short_title, cfb))
|
||||
|
||||
# No cfp exists
|
||||
cfb.destroy
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
# Only Tracks cfp exists
|
||||
call_for_tracks = create(:cfp, cfp_type: 'tracks', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, call_for_tracks)
|
||||
expect(current_path).to eq edit_admin_conference_program_cfp_path(conference.short_title, call_for_tracks)
|
||||
|
||||
# Event and track cfps exist
|
||||
create(:cfp, cfp_type: 'events', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
call_for_tracks.destroy!
|
||||
visit admin_conference_program_events_path(conference.short_title)
|
||||
expect(current_path).to eq(admin_conference_program_events_path(conference.short_title))
|
||||
|
||||
|
|
|
|||
|
|
@ -112,29 +112,51 @@ feature 'Has correct abilities' do
|
|||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
# Both event and booth exists
|
||||
# Event and booth cfps exist
|
||||
cfb = create(:cfp, cfp_type: 'booths', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq root_path
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, conference.program.cfp)
|
||||
expect(current_path).to eq(edit_admin_conference_program_cfp_path(conference.short_title, conference.program.cfp))
|
||||
|
||||
# Event, booth, track cfps exist
|
||||
call_for_tracks = create(:cfp, cfp_type: 'tracks', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq root_path
|
||||
|
||||
# Booth and track cfps exist
|
||||
conference.program.cfp.destroy!
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
# Only booth exists
|
||||
call_for_tracks.destroy!
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, cfb)
|
||||
expect(current_path). to eq(edit_admin_conference_program_cfp_path(conference.short_title, cfb))
|
||||
|
||||
# No cfp exists
|
||||
cfb.destroy
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference.short_title))
|
||||
|
||||
# Only Tracks cfp exists
|
||||
call_for_tracks = create(:cfp, cfp_type: 'tracks', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference.short_title, call_for_tracks)
|
||||
expect(current_path).to eq edit_admin_conference_program_cfp_path(conference.short_title, call_for_tracks)
|
||||
|
||||
# Event and track cfps exist
|
||||
create(:cfp, cfp_type: 'events', program: conference.program)
|
||||
visit new_admin_conference_program_cfp_path(conference.short_title)
|
||||
expect(current_path).to eq new_admin_conference_program_cfp_path(conference.short_title)
|
||||
|
||||
call_for_tracks.destroy!
|
||||
visit admin_conference_program_events_path(conference.short_title)
|
||||
expect(current_path).to eq(admin_conference_program_events_path(conference.short_title))
|
||||
|
||||
|
|
@ -266,6 +288,12 @@ feature 'Has correct abilities' do
|
|||
visit edit_admin_conference_resource_path(conference.short_title, conference.resources.first)
|
||||
expect(current_path).to eq(edit_admin_conference_resource_path(conference.short_title, conference.resources.first))
|
||||
|
||||
visit admin_users_path
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_user_path(user_organizer)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(current_path).to eq(admin_revision_history_path)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -61,4 +61,15 @@ feature Splashpage do
|
|||
expect(current_path).to eq(root_path)
|
||||
end
|
||||
end
|
||||
|
||||
context 'public splashpage already created' do
|
||||
let!(:splashpage) { create(:splashpage, conference: conference, public: true)}
|
||||
|
||||
scenario 'should have organization name', feature: true, js: true do
|
||||
sign_in participant
|
||||
visit conference_path(conference.short_title)
|
||||
|
||||
expect(page).to have_text(conference.organization.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ feature 'Has correct abilities' do
|
|||
let(:organization) { create(:organization) }
|
||||
let(:conference) { create(:full_conference, organization: organization) }
|
||||
let(:self_organized_track) { create(:track, :self_organized, program: conference.program) }
|
||||
let(:role_track_organizer) { Role.find_by(name: 'track_organizer', resource: self_organized_track) }
|
||||
let(:role_track_organizer) { Role.where(name: 'track_organizer', resource: self_organized_track).first_or_create }
|
||||
let(:user_track_organizer) { create(:user, role_ids: [role_track_organizer.id]) }
|
||||
|
||||
context 'when user is info desk' do
|
||||
context 'when user is track organizer' do
|
||||
before do
|
||||
sign_in user_track_organizer
|
||||
end
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ feature Track do
|
|||
within('table#tracks') do
|
||||
expect(page.has_content?(track.name)).to be false
|
||||
expect(page.has_content?(track.description)).to be false
|
||||
expect(page.assert_selector('tr', count: 1)).to be true
|
||||
expect(page.has_content?('No data available in table')).to eq true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue