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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
719e30c5
Commit
719e30c5
authored
May 23, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix review comment
parent
c0632f14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
spec/features/projects/guest_navigation_menu_spec.rb
spec/features/projects/guest_navigation_menu_spec.rb
+24
-15
No files found.
spec/features/projects/guest_navigation_menu_spec.rb
View file @
719e30c5
require
'spec_helper'
describe
"Guest navigation menu"
do
describe
'Guest navigation menu'
do
let
(
:project
)
{
create
(
:empty_project
,
:private
,
public_builds:
false
)
}
let
(
:guest
)
{
create
(
:user
)
}
...
...
@@ -10,10 +10,10 @@ describe "Guest navigation menu" do
login_as
(
guest
)
end
it
"shows allowed tabs only"
do
it
'shows allowed tabs only'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
within
(
".layout-nav"
)
do
within
(
'.layout-nav'
)
do
expect
(
page
).
to
have_content
'Project'
expect
(
page
).
to
have_content
'Issues'
expect
(
page
).
to
have_content
'Wiki'
...
...
@@ -24,49 +24,58 @@ describe "Guest navigation menu" do
end
end
it
"does not show fork button"
do
it
'does not show fork button'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
within
(
".count-buttons"
)
do
within
(
'.count-buttons'
)
do
expect
(
page
).
not_to
have_link
'Fork'
end
end
it
"does not show clone path"
do
it
'does not show clone path'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
within
(
".project-repo-buttons"
)
do
within
(
'.project-repo-buttons'
)
do
expect
(
page
).
not_to
have_selector
'.project-clone-holder'
end
end
describe
'project landing page'
do
before
do
project
.
project_feature
.
update_attribute
(
"issues_access_level"
,
ProjectFeature
::
DISABLED
)
project
.
project_feature
.
update_attribute
(
"wiki_access_level"
,
ProjectFeature
::
DISABLED
)
project
.
project_feature
.
update!
(
issues_access_level:
ProjectFeature
::
DISABLED
,
wiki_access_level:
ProjectFeature
::
DISABLED
)
end
it
"does not show the project file list landing page"
do
it
'does not show the project file list landing page'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
expect
(
page
).
not_to
have_selector
'.project-stats'
expect
(
page
).
not_to
have_selector
'.project-last-commit'
expect
(
page
).
not_to
have_selector
'.project-show-files'
expect
(
page
).
to
have_selector
'.project-show-customize_workflow'
end
it
"shows the customize workflow when issues and wiki are disabled"
do
it
'shows the customize workflow when issues and wiki are disabled'
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_selector
'.project-show-customize_workflow'
end
it
"shows the wiki when enabled"
do
project
.
project_feature
.
update_attribute
(
"wiki_access_level"
,
ProjectFeature
::
PRIVATE
)
it
'shows the wiki when enabled'
do
project
.
project_feature
.
update!
(
wiki_access_level:
ProjectFeature
::
PRIVATE
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_selector
'.project-show-wiki'
end
it
"shows the issues when enabled"
do
project
.
project_feature
.
update_attribute
(
"issues_access_level"
,
ProjectFeature
::
PRIVATE
)
it
'shows the issues when enabled'
do
project
.
project_feature
.
update!
(
issues_access_level:
ProjectFeature
::
PRIVATE
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_selector
'.issues-list'
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