Upstream sync

This commit is contained in:
Senad Uka
2020-07-07 23:14:42 +02:00
parent 93a4ce462d
commit 19b1e75384
27 changed files with 140 additions and 22 deletions

View File

@@ -35,6 +35,24 @@ RSpec.feature 'User manages contract templates', type: :feature do
expect(page).to have_content(create_contract_template_success_message)
end
scenario 'creating new release template, all release types accept signature legal text' do
all_release_types = ['Acquired Media', 'Appearance', 'Location', 'Material', 'Medical', 'Misc', 'Talent']
all_release_types.each do |release_type|
visit new_project_contract_template_path(project)
dropdown_selection = "#{release_type} Release"
select dropdown_selection, from: 'Release type'
fill_in 'Name', with: "My #{release_type} template"
fill_in_trix signature_legal_text_field, with: 'LL'
expect do
click_on 'Create Release Template'
end.to change(ContractTemplate, :count).by(1)
end
end
scenario 'medical release template has a guardian clause field' do
visit new_project_contract_template_path(project)
@@ -222,7 +240,7 @@ RSpec.feature 'User manages contract templates', type: :feature do
click_on 'Manage'
accept_alert do
click_on 'Archive'
click_on 'Delete'
end
expect(page).to have_content('The release template has been archived')
@@ -273,7 +291,7 @@ RSpec.feature 'User manages contract templates', type: :feature do
visit project_contract_templates_path(project)
click_on 'Manage'
expect(page).to have_content('Archive')
expect(page).to have_content('Delete')
end
it 'does not show create release button on splash page' do
@@ -310,6 +328,10 @@ RSpec.feature 'User manages contract templates', type: :feature do
'contract_template_guardian_clause_trix_input_contract_template'
end
def signature_legal_text_field
'contract_template_signature_legal_text'
end
def create_contract_template_success_message
'The release template has been created'
end
@@ -329,4 +351,8 @@ RSpec.feature 'User manages contract templates', type: :feature do
def create_release_template
t 'contract_templates.splash.actions.create_template'
end
def signature_legal_text_trix_field
'Signature legal text'
end
end