Add test for covering Rest to Template button

This commit is contained in:
CactusPuppy 2021-03-07 23:00:40 -08:00
parent e00544e024
commit 58ae746e78
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82

View file

@ -191,5 +191,24 @@ feature Event do
@event.reload
expect(@event.state).to eq('withdrawn')
end
scenario 'can reset to text template', feature: true, js: true do
event_type = conference.program.event_types[-1]
event_type.description = 'Example event description'
event_type.save!
sign_in participant
visit new_conference_program_proposal_path(conference.short_title)
fill_in 'event_title', with: 'Example Proposal'
select(event_type.title, from: 'event[event_type_id]')
fill_in 'event_submission_text', with: 'Lorem ipsum example submission text'
accept_confirm do
click_button 'Reset to Template'
end
expect(page.find('#event_submission_text').value).to eq(event_type.description)
end
end
end