mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 11:44:02 +00:00
parent
4de554e0d4
commit
e5ab9b4db1
2 changed files with 7 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ FactoryBot.define do
|
|||
factory :event_type do
|
||||
title { 'Example Event Type' }
|
||||
length { 30 }
|
||||
description { 'This event type is an example.' }
|
||||
minimum_abstract_length { 0 }
|
||||
maximum_abstract_length { 500 }
|
||||
color { '#ffffff' }
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ feature Event do
|
|||
@event.accept!(@options)
|
||||
end
|
||||
|
||||
scenario 'not signed_in user submits proposal' do
|
||||
scenario 'not signed_in user submits proposal', js: true do
|
||||
expected_count_event = Event.count + 1
|
||||
expected_count_user = User.count + 1
|
||||
|
||||
|
|
@ -80,7 +80,9 @@ feature Event do
|
|||
fill_in 'user_password_confirmation', with: 'testuserpassword'
|
||||
end
|
||||
fill_in 'event_title', with: 'Example Proposal'
|
||||
expect(page).to have_selector '.in', text: 'Presentation in lecture format'
|
||||
select('Example Event Type', from: 'event[event_type_id]')
|
||||
expect(page).to have_selector '.in', text: 'This event type is an example.'
|
||||
fill_in 'event_abstract', with: 'Lorem ipsum abstract'
|
||||
|
||||
click_button 'Create Proposal'
|
||||
|
|
@ -102,7 +104,7 @@ feature Event do
|
|||
expect(page).to have_content 'Proposal Information'
|
||||
end
|
||||
|
||||
scenario 'update a proposal' do
|
||||
scenario 'update a proposal', js: true do
|
||||
conference = create(:conference)
|
||||
create(:cfp, program: conference.program)
|
||||
proposal = create(:event, program: conference.program)
|
||||
|
|
@ -113,6 +115,7 @@ feature Event do
|
|||
|
||||
fill_in 'event_subtitle', with: 'My event subtitle'
|
||||
select('Easy', from: 'event[difficulty_level_id]')
|
||||
expect(page).to have_selector '.in', text: 'Events are understandable for everyone without knowledge of the topic.'
|
||||
|
||||
click_button 'Update Proposal'
|
||||
page.find('#flash')
|
||||
|
|
@ -125,11 +128,10 @@ feature Event do
|
|||
|
||||
visit conference_program_proposals_path(conference.short_title)
|
||||
click_link 'New Proposal'
|
||||
expect(page).to have_selector(".in[id='#{find_field('event[event_type_id]').value}-help']") # End of animation
|
||||
|
||||
fill_in 'event_title', with: 'Example Proposal'
|
||||
select('Example Event Type', from: 'event[event_type_id]')
|
||||
expect(page).to have_selector(".in[id='#{find_field('event[event_type_id]').value}-help']") # End of animation
|
||||
expect(page).to have_selector '.in', text: 'This event type is an example.'
|
||||
|
||||
fill_in 'event_abstract', with: 'Lorem ipsum abstract'
|
||||
expect(page).to have_text('You have used 3 words')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue