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
986de9cd
Commit
986de9cd
authored
Jan 29, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split epic label dropdown test cases in gfm_autocomplete_spec.rb
parent
beba8dea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
16 deletions
+63
-16
ee/spec/features/epics/gfm_autocomplete_spec.rb
ee/spec/features/epics/gfm_autocomplete_spec.rb
+63
-16
No files found.
ee/spec/features/epics/gfm_autocomplete_spec.rb
View file @
986de9cd
...
...
@@ -67,30 +67,45 @@ describe 'GFM autocomplete', :js do
end
end
# This context has just one example in each contexts in order to improve spec performance.
context
'labels'
do
let!
(
:backend
)
{
create
(
:group_label
,
group:
group
,
title:
'backend'
)
}
let!
(
:bug
)
{
create
(
:group_label
,
group:
group
,
title:
'bug'
)
}
let!
(
:feature_proposal
)
{
create
(
:group_label
,
group:
group
,
title:
'feature proposal'
)
}
context
'when no labels are assigned'
do
it
'shows
labels
'
do
it
'shows
all labels for ~
'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "~".
type
(
note
,
'~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows all labels for /label ~'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "/label ~".
type
(
note
,
'/label ~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows all labels for /relabel ~'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "/relabel ~".
type
(
note
,
'/relabel ~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows no labels for /unlabel ~'
do
note
=
find
(
'#note-body'
)
# It should show no labels on "/unlabel ~".
type
(
note
,
'/unlabel ~'
)
wait_for_requests
expect_resources
(
not_shown:
[
backend
,
bug
,
feature_proposal
])
end
end
...
...
@@ -100,23 +115,39 @@ describe 'GFM autocomplete', :js do
epic
.
labels
<<
[
backend
]
end
skip
'shows labels
'
do
it
'shows all labels for ~
'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "~".
type
(
note
,
'~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows only unset labels for /label ~'
do
note
=
find
(
'#note-body'
)
# It should show only unset labels on "/label ~".
type
(
note
,
'/label ~'
)
wait_for_requests
expect_resources
(
shown:
[
bug
,
feature_proposal
],
not_shown:
[
backend
])
end
it
'shows all labels for /relabel ~'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "/relabel ~".
type
(
note
,
'/relabel ~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows only set labels for /unlabel ~'
do
note
=
find
(
'#note-body'
)
# It should show only set labels on "/unlabel ~".
type
(
note
,
'/unlabel ~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
],
not_shown:
[
bug
,
feature_proposal
])
end
end
...
...
@@ -126,23 +157,39 @@ describe 'GFM autocomplete', :js do
epic
.
labels
<<
[
backend
,
bug
,
feature_proposal
]
end
skip
'shows labels
'
do
it
'shows all labels for ~
'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "~".
type
(
note
,
'~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows no labels for /label ~'
do
note
=
find
(
'#note-body'
)
# It should show no labels on "/label ~".
type
(
note
,
'/label ~'
)
wait_for_requests
expect_resources
(
not_shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows all labels for /relabel ~'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "/relabel ~".
type
(
note
,
'/relabel ~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
end
it
'shows all labels for /unlabel ~'
do
note
=
find
(
'#note-body'
)
# It should show all the labels on "/unlabel ~".
type
(
note
,
'/unlabel ~'
)
wait_for_requests
expect_resources
(
shown:
[
backend
,
bug
,
feature_proposal
])
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