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
e8981b9d
Commit
e8981b9d
authored
Aug 31, 2020
by
Eulyeon Ko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing operator token for support bot
parent
0757395c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+4
-1
spec/features/issues/service_desk_spec.rb
spec/features/issues/service_desk_spec.rb
+8
-0
No files found.
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
e8981b9d
...
...
@@ -649,7 +649,10 @@ export default class FilteredSearchManager {
hasFilteredSearch
=
true
;
const
canEdit
=
this
.
canEdit
&&
this
.
canEdit
(
key
,
sanitizedValue
);
const
{
uppercaseTokenName
,
capitalizeTokenValue
}
=
match
;
const
operator
=
FilteredSearchVisualTokens
.
getOperatorToken
(
sanitizedValue
);
const
isSupportBot
=
keyParam
===
'
author_username
'
&&
value
===
'
support-bot
'
;
const
operator
=
isSupportBot
?
'
=
'
:
FilteredSearchVisualTokens
.
getOperatorToken
(
sanitizedValue
);
const
sanitizedToken
=
FilteredSearchVisualTokens
.
getValueToken
(
sanitizedValue
);
FilteredSearchVisualTokens
.
addFilterVisualToken
(
key
,
...
...
spec/features/issues/service_desk_spec.rb
View file @
e8981b9d
...
...
@@ -152,6 +152,14 @@ RSpec.describe 'Service Desk Issue Tracker', :js do
find
(
'.input-token .filtered-search'
).
native
.
send_key
(
:backspace
)
expect
(
page
).
to
have_selector
(
'.js-visual-token'
,
count:
1
)
end
it
'support bot author token has been properly added'
do
within
(
'.filtered-search-token'
)
do
expect
(
page
).
to
have_selector
(
'.name'
,
count:
1
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.operator'
,
count:
1
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'.value-container'
,
count:
1
,
visible:
false
)
end
end
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