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
cd0be3ba
Commit
cd0be3ba
authored
May 29, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix user_removes_labels_spec
parent
3b364513
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
app/views/shared/_label.html.haml
app/views/shared/_label.html.haml
+2
-1
spec/features/projects/labels/user_removes_labels_spec.rb
spec/features/projects/labels/user_removes_labels_spec.rb
+10
-11
No files found.
app/views/shared/_label.html.haml
View file @
cd0be3ba
...
...
@@ -43,7 +43,8 @@
toggle:
'modal'
}
}
=
_
(
'Promote to group label'
)
%li
=
link_to
_
(
'Delete'
),
destroy_label_path
(
label
),
title:
'Delete'
,
method: :delete
,
data:
{
confirm:
_
(
'Remove this label? Are you sure?'
)
},
class:
'text-danger'
%span
{
data:
{
toggle:
'modal'
,
target:
"#modal-delete-label-#{label.id}"
}
}
=
button_tag
'Delete'
,
type:
'button'
,
class:
'text-danger remove-row'
-
if
current_user
%li
.inline.label-subscription
-
if
can_subscribe_to_label_in_different_levels?
(
label
)
...
...
spec/features/projects/labels/user_removes_labels_spec.rb
View file @
cd0be3ba
...
...
@@ -17,8 +17,9 @@ describe "User removes labels" do
end
it
"removes label"
do
page
.
within
(
".labels"
)
do
page
.
within
(
".
other-
labels"
)
do
page
.
first
(
".label-list-item"
)
do
first
(
'.js-label-options-dropdown'
).
click
first
(
".remove-row"
).
click
first
(
:link
,
"Delete label"
).
click
end
...
...
@@ -36,17 +37,15 @@ describe "User removes labels" do
end
it
"removes all labels"
do
page
.
within
(
".labels"
)
do
loop
do
li
=
page
.
first
(
".label-list-item"
)
break
unless
li
li
.
click_link
(
"Delete"
)
click_link
(
"Delete label"
)
end
expect
(
page
).
to
have_content
(
"Generate a default set of labels"
).
and
have_content
(
"New label"
)
loop
do
li
=
page
.
first
(
".label-list-item"
)
break
unless
li
li
.
find
(
'.js-label-options-dropdown'
).
click
li
.
click_button
(
"Delete"
)
click_link
(
"Delete label"
)
end
expect
(
page
).
to
have_content
(
"Generate a default set of labels"
).
and
have_content
(
"New label"
)
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