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
1c55f731
Commit
1c55f731
authored
May 19, 2021
by
Scott Stern
Committed by
Olena Horal-Koretska
May 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logic to support search for epic boards
parent
1a6622c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
app/assets/javascripts/boards/components/board_filtered_search.vue
...s/javascripts/boards/components/board_filtered_search.vue
+4
-1
ee/spec/features/epic_boards/epic_boards_spec.rb
ee/spec/features/epic_boards/epic_boards_spec.rb
+14
-0
No files found.
app/assets/javascripts/boards/components/board_filtered_search.vue
View file @
1c55f731
...
...
@@ -3,6 +3,7 @@ import { pickBy } from 'lodash';
import
{
mapActions
}
from
'
vuex
'
;
import
{
updateHistory
,
setUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
FILTERED_SEARCH_TERM
}
from
'
~/vue_shared/components/filtered_search_bar/constants
'
;
import
FilteredSearch
from
'
~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue
'
;
export
default
{
...
...
@@ -104,7 +105,9 @@ export default {
},
getFilterParams
(
filters
=
[])
{
const
notFilters
=
filters
.
filter
((
item
)
=>
item
.
value
.
operator
===
'
!=
'
);
const
equalsFilters
=
filters
.
filter
((
item
)
=>
item
.
value
.
operator
===
'
=
'
);
const
equalsFilters
=
filters
.
filter
(
(
item
)
=>
item
?.
value
?.
operator
===
'
=
'
||
item
.
type
===
FILTERED_SEARCH_TERM
,
);
return
{
...
this
.
generateParams
(
equalsFilters
),
not
:
{
...
this
.
generateParams
(
notFilters
)
}
};
},
...
...
ee/spec/features/epic_boards/epic_boards_spec.rb
View file @
1c55f731
...
...
@@ -287,6 +287,20 @@ RSpec.describe 'epic boards', :js do
expect
(
page
).
to
have_content
(
'Epic2'
)
expect
(
page
).
to
have_content
(
'Epic3'
)
end
it
'can search for an epic in the search bar'
do
fill_in
'Search'
,
with:
'Epic 1'
page
.
within
(
'[data-testid="epic-filtered-search"]'
)
do
find
(
'input'
).
native
.
send_keys
(
:return
)
end
wait_for_requests
expect
(
page
).
to
have_content
(
'Epic1'
)
expect
(
page
).
not_to
have_content
(
'Epic2'
)
expect
(
page
).
not_to
have_content
(
'Epic3'
)
end
end
def
visit_epic_boards_page
...
...
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