add splash screen for releaseME

This commit is contained in:
Bilal
2020-06-30 18:29:22 +02:00
parent e49498bbbf
commit f201580a01
9 changed files with 130 additions and 8 deletions

View File

@@ -13,8 +13,7 @@ feature "User imports release templates", type: :feature do
end
scenario "importing two existing templates into a project" do
visit project_contract_templates_path(project)
click_on "Import Release Template"
visit new_project_release_template_imports_path(project)
select_templates([project_one_template.id, project_two_template.id])
click_on "Import Selected Templates"
expect(page).to have_content("Selected templates were imported with success")
@@ -31,8 +30,7 @@ feature "User imports release templates", type: :feature do
end
scenario "searching for a template", js: true do
visit project_contract_templates_path(project)
click_on "Import Release Template"
visit new_project_release_template_imports_path(project)
fill_in "query", with: "Second"
click_on "search-button"
expect(page).not_to have_content("First Contract Template")

View File

@@ -11,6 +11,12 @@ RSpec.feature 'User manages contract templates', type: :feature do
sign_in(current_user)
end
scenario 'splash page is shown if tehre are no contract templates' do
visit project_contract_templates_path(project)
expect(page).to have_content schedule_demo
end
scenario 'creating a new release template' do
visit new_project_contract_template_path(project)
@@ -223,6 +229,7 @@ RSpec.feature 'User manages contract templates', type: :feature do
let(:current_user) { create(:user, :associate) }
it 'does not show management buttons for release templates' do
create(:contract_template, project: project)
visit project_contract_templates_path(project)
expect(page).not_to have_content('Create New Release Template')
@@ -273,4 +280,8 @@ RSpec.feature 'User manages contract templates', type: :feature do
def fill_hidden(id, with:)
find(:xpath, "//input[@id='#{id}']", visible: false).set with
end
def schedule_demo
t 'contract_templates.splash.actions.book_demo'
end
end