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
Léo-Paul Géneau
gitlab-ce
Commits
65f534da
Commit
65f534da
authored
Feb 14, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rendering of user token special values
Include capitalized `none` and `any` as special values
parent
1322146b
Changes
2
Show 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_visual_tokens.js
...ascripts/filtered_search/filtered_search_visual_tokens.js
+1
-1
spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js
...pts/filtered_search/filtered_search_visual_tokens_spec.js
+11
-0
No files found.
app/assets/javascripts/filtered_search/filtered_search_visual_tokens.js
View file @
65f534da
...
@@ -163,7 +163,7 @@ export default class FilteredSearchVisualTokens {
...
@@ -163,7 +163,7 @@ export default class FilteredSearchVisualTokens {
const
tokenValueElement
=
tokenValueContainer
.
querySelector
(
'
.value
'
);
const
tokenValueElement
=
tokenValueContainer
.
querySelector
(
'
.value
'
);
tokenValueElement
.
innerText
=
tokenValue
;
tokenValueElement
.
innerText
=
tokenValue
;
if
(
tokenValue
===
'
none
'
||
tokenValue
===
'
any
'
)
{
if
(
[
'
none
'
,
'
any
'
].
includes
(
tokenValue
.
toLowerCase
())
)
{
return
;
return
;
}
}
...
...
spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js
View file @
65f534da
...
@@ -755,6 +755,17 @@ describe('Filtered Search Visual Tokens', () => {
...
@@ -755,6 +755,17 @@ describe('Filtered Search Visual Tokens', () => {
expect
(
updateUserTokenAppearanceSpy
.
calls
.
count
()).
toBe
(
0
);
expect
(
updateUserTokenAppearanceSpy
.
calls
.
count
()).
toBe
(
0
);
});
});
it
(
'
does not update user token appearance for `None` filter
'
,
()
=>
{
const
{
tokenNameElement
}
=
findElements
(
authorToken
);
const
tokenName
=
tokenNameElement
.
innerText
;
const
tokenValue
=
'
None
'
;
subject
.
renderVisualTokenValue
(
authorToken
,
tokenName
,
tokenValue
);
expect
(
updateUserTokenAppearanceSpy
.
calls
.
count
()).
toBe
(
0
);
});
it
(
'
does not update user token appearance for `none` filter
'
,
()
=>
{
it
(
'
does not update user token appearance for `none` filter
'
,
()
=>
{
const
{
tokenNameElement
}
=
findElements
(
authorToken
);
const
{
tokenNameElement
}
=
findElements
(
authorToken
);
...
...
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