improve spec
This commit is contained in:
@@ -13,7 +13,9 @@ feature "User imports release templates", type: :feature do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "importing two existing templates into a project" do
|
scenario "importing two existing templates into a project" do
|
||||||
visit new_project_release_template_imports_path(project)
|
create(:contract_template, project: project)
|
||||||
|
visit project_contract_templates_path(project)
|
||||||
|
click_on "Import Release Template"
|
||||||
select_templates([project_one_template.id, project_two_template.id])
|
select_templates([project_one_template.id, project_two_template.id])
|
||||||
click_on "Import Selected Templates"
|
click_on "Import Selected Templates"
|
||||||
expect(page).to have_content("Selected templates were imported with success")
|
expect(page).to have_content("Selected templates were imported with success")
|
||||||
@@ -30,7 +32,9 @@ feature "User imports release templates", type: :feature do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "searching for a template", js: true do
|
scenario "searching for a template", js: true do
|
||||||
visit new_project_release_template_imports_path(project)
|
create(:contract_template, project: project)
|
||||||
|
visit project_contract_templates_path(project)
|
||||||
|
click_on "Import Release Template"
|
||||||
fill_in "query", with: "Second"
|
fill_in "query", with: "Second"
|
||||||
click_on "search-button"
|
click_on "search-button"
|
||||||
expect(page).not_to have_content("First Contract Template")
|
expect(page).not_to have_content("First Contract Template")
|
||||||
|
|||||||
Reference in New Issue
Block a user