Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dbe8199f
Commit
dbe8199f
authored
Apr 06, 2020
by
manojmj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature spec
parent
17998de5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
ee/spec/features/projects/new_project_spec.rb
ee/spec/features/projects/new_project_spec.rb
+44
-0
No files found.
ee/spec/features/projects/new_project_spec.rb
View file @
dbe8199f
...
@@ -449,4 +449,48 @@ describe 'New project' do
...
@@ -449,4 +449,48 @@ describe 'New project' do
end
end
end
end
end
end
context
'Built-in project templates'
do
let
(
:enterprise_templates
)
{
EE
::
Gitlab
::
ProjectTemplate
::
ENTERPRISE_TEMPLATES_TABLE
}
context
'when `enterprise_templates` is licensed'
do
before
do
stub_licensed_features
(
enterprise_templates:
true
)
end
it
'shows enterprise templates'
do
visit_create_from_built_in_templates_tab
enterprise_templates
.
each
do
|
template
|
expect
(
page
).
to
have_content
(
template
.
title
)
expect
(
page
).
to
have_link
(
'Preview'
,
href:
template
.
preview
)
end
end
end
context
'when `enterprise_templates` is unlicensed'
do
before
do
stub_licensed_features
(
enterprise_templates:
false
)
end
it
'does not show enterprise templates'
do
visit_create_from_built_in_templates_tab
enterprise_templates
.
each
do
|
template
|
expect
(
page
).
not_to
have_content
(
template
.
title
)
expect
(
page
).
not_to
have_link
(
'Preview'
,
href:
template
.
preview
)
end
end
end
private
def
visit_create_from_built_in_templates_tab
visit
new_project_path
expect
(
page
).
to
have_css
(
'#create-from-template-tab'
)
find
(
'#create-from-template-tab'
).
click
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment