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
56797a84
Commit
56797a84
authored
May 25, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove shared example and improve sub_group_issuables_spec.rb
parent
e0483044
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
22 deletions
+17
-22
spec/features/projects/sub_group_issuables_spec.rb
spec/features/projects/sub_group_issuables_spec.rb
+17
-14
spec/support/features/has_subgroup_title_spec.rb
spec/support/features/has_subgroup_title_spec.rb
+0
-8
No files found.
spec/features/projects/sub_group_issuables_spec.rb
View file @
56797a84
require
'spec_helper'
require
'spec_helper'
describe
'Subgroup Issuables'
,
:feature
,
:js
do
describe
'Subgroup Issuables'
,
:feature
,
:js
do
let!
(
:
parent_group
)
{
create
(
:group
,
name:
'parent
group'
)
}
let!
(
:
group
)
{
create
(
:group
,
name:
'
group'
)
}
let!
(
:subgroup
)
{
create
(
:group
,
parent:
parent_
group
,
name:
'subgroup'
)
}
let!
(
:subgroup
)
{
create
(
:group
,
parent:
group
,
name:
'subgroup'
)
}
let!
(
:project
)
{
create
(
:empty_project
,
namespace:
subgroup
,
name:
'project'
)
}
let!
(
:project
)
{
create
(
:empty_project
,
namespace:
subgroup
,
name:
'project'
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
before
do
project
.
add_master
(
user
)
project
.
add_master
(
user
)
login_as
user
login_as
user
end
end
context
'empty issues index'
do
it
'shows the full subgroup title when issues index page is empty'
do
before
do
visit
namespace_project_issues_path
(
project
.
namespace
.
to_param
,
project
.
to_param
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
it_behaves_like
'has subgroup title'
,
'parentgroup'
,
'subgroup'
,
'project'
expect_to_have_full_subgroup_title
end
end
context
'empty merge request index'
do
it
'shows the full subgroup title when merge requests index page is empty'
do
before
do
visit
namespace_project_merge_requests_path
(
project
.
namespace
.
to_param
,
project
.
to_param
)
visit
namespace_project_merge_requests_path
(
project
.
namespace
,
project
)
end
it_behaves_like
'has subgroup title'
,
'parentgroup'
,
'subgroup'
,
'project'
expect_to_have_full_subgroup_title
end
def
expect_to_have_full_subgroup_title
title
=
find
(
'.title-container'
)
expect
(
title
).
not_to
have_selector
'.initializing'
expect
(
title
).
to
have_content
'group / subgroup / project'
end
end
end
end
spec/support/features/has_subgroup_title_spec.rb
deleted
100644 → 0
View file @
e0483044
shared_examples
'has subgroup title'
do
|
parent_group_name
,
subgroup_name
,
project_name
|
it
'shows the full title'
do
title
=
find
(
'.title-container'
)
expect
(
title
).
not_to
have_selector
'.initializing'
expect
(
title
).
to
have_content
"
#{
parent_group_name
}
/
#{
subgroup_name
}
/
#{
project_name
}
"
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