Upstream sync
This commit is contained in:
@@ -205,34 +205,6 @@ RSpec.feature 'User manages contract templates', type: :feature do
|
||||
expect(pdf_body).to have_content('Guardian')
|
||||
end
|
||||
|
||||
context 'preventing creation of release template with wrong fee value' do
|
||||
before do
|
||||
visit new_project_contract_template_path(project)
|
||||
|
||||
fill_in 'Name', with: 'My Release Template'
|
||||
select 'Appearance Release', from: 'Release type'
|
||||
fill_in_trix body_field, with: 'You agree to this release.'
|
||||
fill_hidden guardian_clause_field, with: 'Your minor agrees to this release.'
|
||||
select 'All', from: 'Applicable Media'
|
||||
select 'Other', from: 'Territory'
|
||||
fill_in 'Describe other territory', with: 'North America only'
|
||||
select 'In perpetuity', from: 'Term'
|
||||
select 'None', from: 'Restriction'
|
||||
end
|
||||
|
||||
scenario 'Should not allow negative fees' do
|
||||
fill_in 'Fee', with: '-200'
|
||||
click_on create_release_template_button
|
||||
expect(page).not_to have_content(create_contract_template_success_message)
|
||||
end
|
||||
|
||||
scenario 'Should not allow fees with more than 9 digits' do
|
||||
fill_in 'Fee', with: '9999999999'
|
||||
click_on create_release_template_button
|
||||
expect(page).not_to have_content(create_contract_template_success_message)
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'contract template preview is shown before printing' do
|
||||
create(:appearance_release_contract_template, body: 'Contract legal language', project: project)
|
||||
visit project_contract_templates_path(project)
|
||||
|
||||
@@ -186,6 +186,30 @@ feature 'User managing broadcasts' do
|
||||
expect(page).not_to have_selector("li.media.playing-highlight")
|
||||
end
|
||||
|
||||
scenario 'opening broadcast page starts in normal mode if director mode is not available' do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project)
|
||||
broadcast.director_mode_video_embed = nil
|
||||
broadcast.save
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
expect(page).not_to have_selector('#director_broadcast_video')
|
||||
expect(page).to have_selector('#broadcast_video')
|
||||
|
||||
expect(page).not_to have_selector('#director_mode_switch')
|
||||
end
|
||||
|
||||
scenario 'opening broadcast page starts in director mode if available' do
|
||||
broadcast = create(:broadcast, :with_stream, :with_files, project: project, director_mode_video_embed: 'director_mode')
|
||||
|
||||
visit project_broadcast_path(project, broadcast)
|
||||
|
||||
expect(page).not_to have_selector('#broadcast_video')
|
||||
expect(page).to have_selector('#director_broadcast_video')
|
||||
|
||||
expect(page).to have_selector('#director_mode_switch')
|
||||
end
|
||||
|
||||
context 'When the user is associate' do
|
||||
let(:current_user) { create(:user, :associate) }
|
||||
|
||||
|
||||
@@ -83,11 +83,7 @@ feature "User performs video analysis" do
|
||||
create(:material_release, name: "Apple MacBook Air", project: project),
|
||||
create(:material_release, name: "Microsoft Surface Pro", project: project)
|
||||
]
|
||||
acquired_media = create(:acquired_media_release, project: project)
|
||||
acquired_file_info_1, acquired_file_info_2 = [
|
||||
create(:file_info, filename: "Still Image", releasable: acquired_media),
|
||||
create(:file_info, filename: "Artwork", releasable: acquired_media)
|
||||
]
|
||||
acquired_media = create(:acquired_media_release, :with_files, project: project)
|
||||
music_release = create(:music_release, project: project)
|
||||
music_file_info_1, music_file_info_2 = [
|
||||
create(:file_info, filename: "I'm not afraid", releasable: music_release),
|
||||
@@ -116,9 +112,10 @@ feature "User performs video analysis" do
|
||||
end
|
||||
|
||||
within "#acquired_media_releases_section" do
|
||||
search_for(:acquired_media_releases, text: "till")
|
||||
expect(page).to have_content("Still Image")
|
||||
expect(page).not_to have_content("Artwork")
|
||||
search_for(:acquired_media_releases, text: "cont")
|
||||
expect(page).to have_content("contract.pdf")
|
||||
expect(page).not_to have_content("audio.mp3")
|
||||
expect(page).not_to have_content("video_file.mp4")
|
||||
end
|
||||
|
||||
within "#music_releases_section" do
|
||||
@@ -350,34 +347,31 @@ feature "User performs video analysis" do
|
||||
end
|
||||
|
||||
scenario "confirming an acquired media release", js: true do
|
||||
acquired_media_release = create(:acquired_media_release_with_file_infos, project: project)
|
||||
acquired_media_release.file_infos.first.update(filename: "shark jumping")
|
||||
acquired_media_release.file_infos.second.update(filename: "pig flying")
|
||||
acquired_media_release.file_infos.third.update(filename: "panda sneezing")
|
||||
acquired_media_release = create(:acquired_media_release, :with_files, project: project)
|
||||
|
||||
sign_in current_user
|
||||
visit video_video_analyses_path(video)
|
||||
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "shark jumping", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "pig flying", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "panda sneezing", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "contract.pdf", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "audio.mp3", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "video_file.mp4", count: 1)
|
||||
|
||||
confirm_first_release_using_edl_modal(video, acquired_media_release, text: "shark jumping")
|
||||
confirm_first_release_using_edl_modal(video, acquired_media_release, text: "contract.pdf")
|
||||
|
||||
expect(page).to have_confirmed_release(acquired_media_release, text: "shark jumping")
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "pig flying", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "panda sneezing", count: 1)
|
||||
expect(page).to have_confirmed_release(acquired_media_release, text: "contract.pdf")
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "audio.mp3", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "video_file.mp4", count: 1)
|
||||
|
||||
unconfirm_release(VideoReleaseConfirmation.last)
|
||||
|
||||
expect(page).not_to have_confirmed_release(acquired_media_release, text: "shark jumping")
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "shark jumping", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "pig flying", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "panda sneezing", count: 1)
|
||||
expect(page).not_to have_confirmed_release(acquired_media_release, text: "contract.pdf")
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "contract.pdf", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "audio.mp3", count: 1)
|
||||
expect(page).to have_unconfirmed_file_info_release(acquired_media_release, "video_file.mp4", count: 1)
|
||||
end
|
||||
|
||||
scenario "confirming a material release", js: true do
|
||||
material_release = create(:material_release, project: project)
|
||||
material_release = create(:material_release, :with_file, project: project)
|
||||
|
||||
sign_in current_user
|
||||
visit video_video_analyses_path(video)
|
||||
@@ -387,7 +381,6 @@ feature "User performs video analysis" do
|
||||
confirm_first_release_using_edl_modal(video, material_release)
|
||||
|
||||
expect(page).to have_confirmed_release(material_release)
|
||||
expect(page).not_to have_unconfirmed_release(material_release)
|
||||
|
||||
unconfirm_release(VideoReleaseConfirmation.last)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user