update matching features specs

This commit is contained in:
bilal
2020-06-11 15:09:46 +02:00
parent 47b68e86e6
commit badc3786dd

View File

@@ -148,11 +148,13 @@ feature 'User managing appearance releases' do
expect(page).to have_content matching_started expect(page).to have_content matching_started
end 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) visit project_appearance_releases_path(project)
attach_file import_appearance_release_field, Rails.root.join(file_fixture('person_photo.png')), visible: false 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 click_button submit_create_button
expect(page).to have_content matching_started
visit project_appearance_releases_path(project) visit project_appearance_releases_path(project)
expect(page).to have_content no_appearance_releases expect(page).to have_content no_appearance_releases
end end
@@ -161,13 +163,11 @@ feature 'User managing appearance releases' do
skip 'Will be updated' skip 'Will be updated'
visit project_appearance_releases_path(project) visit project_appearance_releases_path(project)
Sidekiq::Testing.inline! do expect(page).to have_content no_appearance_releases
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
attach_file import_appearance_release_field, Rails.root.join(file_fixture('contract_1_headshot.jpg')), visible: false click_button submit_create_button
click_button submit_create_button visit project_appearance_releases_path(project)
visit project_appearance_releases_path(project) expect(page).not_to have_content no_appearance_releases
expect(page).not_to have_content no_appearance_releases
end
end end
scenario 'incomplete appearance release is added if contract only is matched', js: true do scenario 'incomplete appearance release is added if contract only is matched', js: true do