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
38f43812
Commit
38f43812
authored
May 22, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify spec/features/projects/actve_tabs_spec.rb
parent
57c6bf60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
ee/spec/features/projects/active_tabs_spec.rb
ee/spec/features/projects/active_tabs_spec.rb
+48
-0
spec/features/projects/actve_tabs_spec.rb
spec/features/projects/actve_tabs_spec.rb
+2
-2
No files found.
ee/spec/features/projects/active_tabs_spec.rb
0 → 100644
View file @
38f43812
require
'spec_helper'
describe
'Project active tab'
do
let
(
:user
)
{
create
:user
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
project
.
add_master
(
user
)
sign_in
(
user
)
end
def
click_tab
(
title
)
page
.
within
'.sidebar-top-level-items > .active'
do
click_link
(
title
)
end
end
shared_examples
'page has active tab'
do
|
title
|
it
"activates
#{
title
}
tab"
do
expect
(
page
).
to
have_selector
(
'.sidebar-top-level-items > li.active'
,
count:
1
)
expect
(
find
(
'.sidebar-top-level-items > li.active'
)).
to
have_content
(
title
)
end
end
shared_examples
'page has active sub tab'
do
|
title
|
it
"activates
#{
title
}
sub tab"
do
expect
(
page
).
to
have_selector
(
'.sidebar-sub-level-items > li.active:not(.fly-out-top-item)'
,
count:
1
)
expect
(
find
(
'.sidebar-sub-level-items > li.active:not(.fly-out-top-item)'
))
.
to
have_content
(
title
)
end
end
context
'on project Home'
do
before
do
visit
project_path
(
project
)
end
it_behaves_like
'page has active tab'
,
'Overview'
context
'on project Home/Activity'
do
before
do
click_tab
(
'Activity'
)
end
it_behaves_like
'page has active tab'
,
'Overview'
end
end
end
spec/features/projects/actve_tabs_spec.rb
View file @
38f43812
...
...
@@ -35,7 +35,7 @@ describe 'Project active tab' do
visit
project_path
(
project
)
end
it_behaves_like
'page has active tab'
,
'
Overview
'
it_behaves_like
'page has active tab'
,
'
Project
'
it_behaves_like
'page has active sub tab'
,
'Details'
context
'on project Home/Activity'
do
...
...
@@ -43,7 +43,7 @@ describe 'Project active tab' do
click_tab
(
'Activity'
)
end
it_behaves_like
'page has active tab'
,
'
Overview
'
it_behaves_like
'page has active tab'
,
'
Project
'
it_behaves_like
'page has active sub tab'
,
'Activity'
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