Upstream sync
This commit is contained in:
@@ -194,6 +194,28 @@ feature 'User managing appearance releases' do
|
||||
expect(page).to have_content 'New Jane'
|
||||
end
|
||||
|
||||
scenario 'user can enter information for second guardian when editing non native release for minor', js: true do
|
||||
appearance_release = create(:appearance_release, :non_native, :minor, project: project)
|
||||
|
||||
visit edit_appearance_release_path(appearance_release)
|
||||
|
||||
expect(page).to have_content guardian_2_first_name_field.titleize
|
||||
expect(page).to have_content guardian_2_photo_heading
|
||||
|
||||
fill_in guardian_first_name_field, with: 'Guardian'
|
||||
fill_in guardian_last_name_field, with: 'Name'
|
||||
attach_file guardian_photo_field, file_fixture('hemsworth.jpeg'), visible: :all
|
||||
|
||||
fill_in guardian_2_first_name_field, with: 'Second'
|
||||
fill_in guardian_2_last_name_field, with: 'guardian'
|
||||
attach_file guardian_2_photo_field, file_fixture('person_photo.png'), visible: :all
|
||||
|
||||
click_button submit_update_button
|
||||
|
||||
expect(page).to have_content successful_update_message
|
||||
expect(AppearanceRelease.last.guardian_2_photo.attached?).to eq true
|
||||
end
|
||||
|
||||
scenario 'progress bar shows when user imports a release', js: true do
|
||||
visit project_appearance_releases_path(project)
|
||||
|
||||
@@ -557,6 +579,10 @@ feature 'User managing appearance releases' do
|
||||
'appearance_release[guardian_photo]'
|
||||
end
|
||||
|
||||
def guardian_2_photo_field
|
||||
'appearance_release[guardian_2_photo]'
|
||||
end
|
||||
|
||||
def person_name_field
|
||||
t('helpers.label.appearance_release.person_name')
|
||||
end
|
||||
@@ -662,4 +688,12 @@ feature 'User managing appearance releases' do
|
||||
def successful_destroy_message
|
||||
'The release has been deleted'
|
||||
end
|
||||
|
||||
def guardian_photo_heading
|
||||
t 'appearance_releases.form.photos.guardian_photo.heading'
|
||||
end
|
||||
|
||||
def guardian_2_photo_heading
|
||||
t 'appearance_releases.form.photos.guardian_2_photo.heading'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user