Commit 3099a6da authored by Kushal Pandya's avatar Kushal Pandya

Add rspecs for project create from template

Adds missing rspecs for creating project from
template page.
parent c3c7afb0
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'New project from template', :js do
let(:user) { create(:user) }
before do
stub_licensed_features(custom_project_templates: true)
sign_in(user)
visit new_project_path
end
context 'create from template' do
before do
page.find('a[href="#create_from_template"]').click
wait_for_requests
end
it 'shows template tabs' do
page.within('#create-from-template-pane') do
expect(page).to have_link('Built-in', href: '#built-in')
expect(page).to have_link('Instance', href: '#custom-instance-project-templates')
expect(page).to have_link('Group', href: '#custom-group-project-templates')
end
end
end
end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'New project from template', :js do
let(:user) { create(:user) }
before do
sign_in(user)
visit new_project_path
end
context 'create from template' do
before do
page.find('a[href="#create_from_template"]').click
wait_for_requests
end
it 'shows template tabs' do
page.within('#create-from-template-pane') do
expect(page).to have_link('Built-in', href: '#built-in')
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment