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
95d72814
Commit
95d72814
authored
Feb 05, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import FilteredSearchTokenKeys, update class initialization syntax
parent
327d73ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
spec/javascripts/filtered_search/filtered_search_manager_spec.js
...vascripts/filtered_search/filtered_search_manager_spec.js
+6
-5
No files found.
spec/javascripts/filtered_search/filtered_search_manager_spec.js
View file @
95d72814
...
...
@@ -3,8 +3,8 @@ import * as recentSearchesStoreSrc from '~/filtered_search/stores/recent_searche
import
RecentSearchesService
from
'
~/filtered_search/services/recent_searches_service
'
;
import
RecentSearchesServiceError
from
'
~/filtered_search/services/recent_searches_service_error
'
;
import
RecentSearchesRoot
from
'
~/filtered_search/recent_searches_root
'
;
import
FilteredSearchTokenKeys
from
'
~/filtered_search/filtered_search_token_keys
'
;
import
'
~/lib/utils/common_utils
'
;
import
'
~/filtered_search/filtered_search_token_keys
'
;
import
'
~/filtered_search/filtered_search_tokenizer
'
;
import
'
~/filtered_search/filtered_search_dropdown_manager
'
;
import
'
~/filtered_search/filtered_search_manager
'
;
...
...
@@ -14,6 +14,7 @@ describe('Filtered Search Manager', () => {
let
input
;
let
manager
;
let
tokensContainer
;
const
page
=
'
issues
'
;
const
placeholder
=
'
Search or filter results...
'
;
function
dispatchBackspaceEvent
(
element
,
eventType
)
{
...
...
@@ -62,7 +63,7 @@ describe('Filtered Search Manager', () => {
input
=
document
.
querySelector
(
'
.filtered-search
'
);
tokensContainer
=
document
.
querySelector
(
'
.tokens-container
'
);
manager
=
new
gl
.
FilteredSearchManager
();
manager
=
new
gl
.
FilteredSearchManager
(
{
page
}
);
manager
.
setup
();
};
...
...
@@ -80,19 +81,19 @@ describe('Filtered Search Manager', () => {
});
it
(
'
should instantiate RecentSearchesStore with isLocalStorageAvailable
'
,
()
=>
{
manager
=
new
gl
.
FilteredSearchManager
();
manager
=
new
gl
.
FilteredSearchManager
(
{
page
}
);
expect
(
RecentSearchesService
.
isAvailable
).
toHaveBeenCalled
();
expect
(
recentSearchesStoreSrc
.
default
).
toHaveBeenCalledWith
({
isLocalStorageAvailable
,
allowedKeys
:
gl
.
FilteredSearchTokenKeys
.
getKeys
(),
allowedKeys
:
FilteredSearchTokenKeys
.
getKeys
(),
});
});
});
describe
(
'
setup
'
,
()
=>
{
beforeEach
(()
=>
{
manager
=
new
gl
.
FilteredSearchManager
();
manager
=
new
gl
.
FilteredSearchManager
(
{
page
}
);
});
it
(
'
should not instantiate Flash if an RecentSearchesServiceError is caught
'
,
()
=>
{
...
...
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