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
Boxiang Sun
gitlab-ce
Commits
4d90aa83
Commit
4d90aa83
authored
Jul 30, 2019
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix labels issuable link specs
parent
c4a8f45f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
15 deletions
+40
-15
spec/features/groups/labels/user_sees_links_to_issuables_spec.rb
...atures/groups/labels/user_sees_links_to_issuables_spec.rb
+4
-2
spec/features/projects/labels/user_sees_links_to_issuables_spec.rb
...ures/projects/labels/user_sees_links_to_issuables_spec.rb
+24
-12
spec/views/shared/_label_row.html.haml_spec.rb
spec/views/shared/_label_row.html.haml_spec.rb
+12
-1
No files found.
spec/features/groups/labels/user_sees_links_to_issuables_spec.rb
View file @
4d90aa83
...
...
@@ -11,7 +11,9 @@ describe 'Groups > Labels > User sees links to issuables' do
end
it
'shows links to MRs and issues'
do
expect
(
page
).
to
have_link
(
'view merge requests'
)
expect
(
page
).
to
have_link
(
'view open issues'
)
page
.
within
(
'.labels-container'
)
do
expect
(
page
).
to
have_link
(
'Merge requests'
)
expect
(
page
).
to
have_link
(
'Issues'
)
end
end
end
spec/features/projects/labels/user_sees_links_to_issuables_spec.rb
View file @
4d90aa83
...
...
@@ -19,8 +19,10 @@ describe 'Projects > Labels > User sees links to issuables' do
let
(
:project
)
{
create
(
:project
,
:public
)
}
it
'shows links to MRs and issues'
do
expect
(
page
).
to
have_link
(
'view merge requests'
)
expect
(
page
).
to
have_link
(
'view open issues'
)
page
.
within
(
'.labels-container'
)
do
expect
(
page
).
to
have_link
(
'Merge requests'
)
expect
(
page
).
to
have_link
(
'Issues'
)
end
end
end
...
...
@@ -28,8 +30,10 @@ describe 'Projects > Labels > User sees links to issuables' do
let
(
:project
)
{
create
(
:project
,
:public
,
issues_access_level:
ProjectFeature
::
DISABLED
)
}
it
'shows links to MRs but not to issues'
do
expect
(
page
).
to
have_link
(
'view merge requests'
)
expect
(
page
).
not_to
have_link
(
'view open issues'
)
page
.
within
(
'.labels-container'
)
do
expect
(
page
).
to
have_link
(
'Merge requests'
)
expect
(
page
).
not_to
have_link
(
'Issues'
)
end
end
end
...
...
@@ -37,8 +41,10 @@ describe 'Projects > Labels > User sees links to issuables' do
let
(
:project
)
{
create
(
:project
,
:public
,
merge_requests_access_level:
ProjectFeature
::
DISABLED
)
}
it
'shows links to issues but not to MRs'
do
expect
(
page
).
not_to
have_link
(
'view merge requests'
)
expect
(
page
).
to
have_link
(
'view open issues'
)
page
.
within
(
'.labels-container'
)
do
expect
(
page
).
not_to
have_link
(
'Merge requests'
)
expect
(
page
).
to
have_link
(
'Issues'
)
end
end
end
end
...
...
@@ -51,8 +57,10 @@ describe 'Projects > Labels > User sees links to issuables' do
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
it
'shows links to MRs and issues'
do
expect
(
page
).
to
have_link
(
'view merge requests'
)
expect
(
page
).
to
have_link
(
'view open issues'
)
page
.
within
(
'.labels-container'
)
do
expect
(
page
).
to
have_link
(
'Merge requests'
)
expect
(
page
).
to
have_link
(
'Issues'
)
end
end
end
...
...
@@ -60,8 +68,10 @@ describe 'Projects > Labels > User sees links to issuables' do
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
,
issues_access_level:
ProjectFeature
::
DISABLED
)
}
it
'shows links to MRs and issues'
do
expect
(
page
).
to
have_link
(
'view merge requests'
)
expect
(
page
).
to
have_link
(
'view open issues'
)
page
.
within
(
'.labels-container'
)
do
expect
(
page
).
to
have_link
(
'Merge requests'
)
expect
(
page
).
to
have_link
(
'Issues'
)
end
end
end
...
...
@@ -69,8 +79,10 @@ describe 'Projects > Labels > User sees links to issuables' do
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
,
merge_requests_access_level:
ProjectFeature
::
DISABLED
)
}
it
'shows links to MRs and issues'
do
expect
(
page
).
to
have_link
(
'view merge requests'
)
expect
(
page
).
to
have_link
(
'view open issues'
)
page
.
within
(
'.labels-container'
)
do
expect
(
page
).
to
have_link
(
'Merge requests'
)
expect
(
page
).
to
have_link
(
'Issues'
)
end
end
end
end
...
...
spec/views/shared/_label_row.html.haml_spec.rb
View file @
4d90aa83
...
...
@@ -7,9 +7,20 @@ describe 'shared/_label_row.html.haml' do
}
label_types
.
each
do
|
label_type
,
label_factory
|
let!
(
:label
)
{
create
(
label_factory
)
}
let!
(
:label
)
do
label_record
=
create
(
label_factory
)
label_record
.
present
(
issuable_subject:
label_record
.
subject
)
end
context
"for a
#{
label_type
}
"
do
before
do
if
label
.
project_label?
@project
=
label
.
project
else
@group
=
label
.
group
end
end
it
'has a non-linked label title'
do
render
'shared/label_row'
,
label:
label
...
...
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