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
752926e6
Commit
752926e6
authored
Feb 25, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove tests for labels dropdown from gfm_autocomplete_spec.rb
parent
f524dff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
83 deletions
+1
-83
spec/features/issues/gfm_autocomplete_spec.rb
spec/features/issues/gfm_autocomplete_spec.rb
+1
-83
No files found.
spec/features/issues/gfm_autocomplete_spec.rb
View file @
752926e6
...
...
@@ -278,12 +278,7 @@ describe 'GFM autocomplete', :js do
end
end
# This context has just one example in each contexts in order to improve spec performance.
context
'labels'
,
:quarantine
do
let!
(
:backend
)
{
create
(
:label
,
project:
project
,
title:
'backend'
)
}
let!
(
:bug
)
{
create
(
:label
,
project:
project
,
title:
'bug'
)
}
let!
(
:feature_proposal
)
{
create
(
:label
,
project:
project
,
title:
'feature proposal'
)
}
context
'labels'
do
it
'opens autocomplete menu for Labels when field starts with text with item escaping HTML characters'
do
create
(
:label
,
project:
project
,
title:
label_xss_title
)
...
...
@@ -298,83 +293,6 @@ describe 'GFM autocomplete', :js do
expect
(
find
(
'.atwho-view-ul'
).
text
).
to
have_content
(
'alert label'
)
end
end
context
'when no labels are assigned'
do
it
'shows labels'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "~".
type
(
note
,
'~'
)
wait_for_requests
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
# It should show all the labels on "/label ~".
type
(
note
,
'/label ~'
)
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
# It should show all the labels on "/relabel ~".
type
(
note
,
'/relabel ~'
)
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
# It should show no labels on "/unlabel ~".
type
(
note
,
'/unlabel ~'
)
expect_labels
(
not_shown:
[
backend
,
bug
,
feature_proposal
])
end
end
context
'when some labels are assigned'
do
before
do
issue
.
labels
<<
[
backend
]
end
it
'shows labels'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "~".
type
(
note
,
'~'
)
wait_for_requests
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
# It should show only unset labels on "/label ~".
type
(
note
,
'/label ~'
)
expect_labels
(
shown:
[
bug
,
feature_proposal
],
not_shown:
[
backend
])
# It should show all the labels on "/relabel ~".
type
(
note
,
'/relabel ~'
)
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
# It should show only set labels on "/unlabel ~".
type
(
note
,
'/unlabel ~'
)
expect_labels
(
shown:
[
backend
],
not_shown:
[
bug
,
feature_proposal
])
end
end
context
'when all labels are assigned'
do
before
do
issue
.
labels
<<
[
backend
,
bug
,
feature_proposal
]
end
it
'shows labels'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "~".
type
(
note
,
'~'
)
wait_for_requests
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
# It should show no labels on "/label ~".
type
(
note
,
'/label ~'
)
expect_labels
(
not_shown:
[
backend
,
bug
,
feature_proposal
])
# It should show all the labels on "/relabel ~".
type
(
note
,
'/relabel ~'
)
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
# It should show all the labels on "/unlabel ~".
type
(
note
,
'/unlabel ~'
)
expect_labels
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
end
end
shared_examples
'autocomplete suggestions'
do
...
...
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