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
6cbf6c52
Commit
6cbf6c52
authored
Nov 02, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move clear search test to JS to reduce overkill
Part of
https://gitlab.com/gitlab-org/gitlab-ce/issues/33661
parent
2f644452
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
spec/features/merge_requests/filter_by_labels_spec.rb
spec/features/merge_requests/filter_by_labels_spec.rb
+0
-16
spec/javascripts/filtered_search/filtered_search_manager_spec.js
...vascripts/filtered_search/filtered_search_manager_spec.js
+19
-0
No files found.
spec/features/merge_requests/filter_by_labels_spec.rb
View file @
6cbf6c52
...
@@ -79,22 +79,6 @@ feature 'Merge Request filtering by Labels', :js do
...
@@ -79,22 +79,6 @@ feature 'Merge Request filtering by Labels', :js do
end
end
end
end
context
'clear button'
do
before
do
input_filtered_search
(
'label:~bug'
)
end
it
'allows user to remove filtered labels'
do
first
(
'.clear-search'
).
click
filtered_search
.
send_keys
(
:enter
)
expect
(
page
).
to
have_issuable_counts
(
open:
3
,
closed:
0
,
all:
3
)
expect
(
page
).
to
have_content
"Bugfix2"
expect
(
page
).
to
have_content
"Feature1"
expect
(
page
).
to
have_content
"Bugfix1"
end
end
context
'filter dropdown'
do
context
'filter dropdown'
do
it
'filters by label name'
do
it
'filters by label name'
do
init_label_search
init_label_search
...
...
spec/javascripts/filtered_search/filtered_search_manager_spec.js
View file @
6cbf6c52
...
@@ -396,6 +396,25 @@ describe('Filtered Search Manager', () => {
...
@@ -396,6 +396,25 @@ describe('Filtered Search Manager', () => {
});
});
});
});
describe
(
'
Clearing search
'
,
()
=>
{
beforeEach
(()
=>
{
initializeManager
();
});
it
(
'
Clicking the "x" clear button, clears the input
'
,
()
=>
{
const
inputValue
=
'
label:~bug
'
;
manager
.
filteredSearchInput
.
value
=
inputValue
;
manager
.
filteredSearchInput
.
dispatchEvent
(
new
Event
(
'
input
'
));
expect
(
gl
.
DropdownUtils
.
getSearchQuery
()).
toEqual
(
inputValue
);
manager
.
clearSearchButton
.
click
();
expect
(
manager
.
filteredSearchInput
.
value
).
toEqual
(
''
);
expect
(
gl
.
DropdownUtils
.
getSearchQuery
()).
toEqual
(
''
);
});
});
describe
(
'
toggleInputContainerFocus
'
,
()
=>
{
describe
(
'
toggleInputContainerFocus
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
initializeManager
();
initializeManager
();
...
...
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