Match imported appearance release documents #1

Closed
bilal.catic wants to merge 25 commits from match-imported-appearance-release-documents into master
Showing only changes of commit badc3786dd - Show all commits

View File

@@ -148,11 +148,13 @@ feature 'User managing appearance releases' do
expect(page).to have_content matching_started
end
scenario 'no appearance releases are added if BrayniacAI returns no matches', js: true do
scenario 'MatchAppearanceReleasesJob is started when import is finished', js: true do
visit project_appearance_releases_path(project)
attach_file import_appearance_release_field, Rails.root.join(file_fixture('person_photo.png')), visible: false
allow(MatchAppearanceReleasesJob).to receive(:perform_later).with(project, anything)
click_button submit_create_button
expect(page).to have_content matching_started
visit project_appearance_releases_path(project)
expect(page).to have_content no_appearance_releases
end
@@ -161,13 +163,11 @@ feature 'User managing appearance releases' do
skip 'Will be updated'
visit project_appearance_releases_path(project)
Sidekiq::Testing.inline! do
expect(page).to have_content no_appearance_releases
attach_file import_appearance_release_field, Rails.root.join(file_fixture('contract_1_headshot.jpg')), visible: false
click_button submit_create_button
visit project_appearance_releases_path(project)
expect(page).not_to have_content no_appearance_releases
end
expect(page).to have_content no_appearance_releases
attach_file import_appearance_release_field, Rails.root.join(file_fixture('contract_1_headshot.jpg')), visible: false
click_button submit_create_button
visit project_appearance_releases_path(project)
expect(page).not_to have_content no_appearance_releases
end
scenario 'incomplete appearance release is added if contract only is matched', js: true do