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
fd4b2a44
Commit
fd4b2a44
authored
Feb 01, 2021
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not automatically focus on projects search input
parent
bfdb161b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
41 deletions
+0
-41
app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue
...frequent_items/components/frequent_items_search_input.vue
+0
-7
spec/frontend/frequent_items/components/frequent_items_search_input_spec.js
...uent_items/components/frequent_items_search_input_spec.js
+0
-34
No files found.
app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue
View file @
fd4b2a44
...
...
@@ -3,7 +3,6 @@ import { debounce } from 'lodash';
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
Tracking
from
'
~/tracking
'
;
import
eventHub
from
'
../event_hub
'
;
import
frequentItemsMixin
from
'
./frequent_items_mixin
'
;
const
trackingMixin
=
Tracking
.
mixin
();
...
...
@@ -32,12 +31,6 @@ export default {
this
.
setSearchQuery
(
this
.
searchQuery
);
},
500
),
},
mounted
()
{
eventHub
.
$on
(
`
${
this
.
namespace
}
-dropdownOpen`
,
this
.
setFocus
);
},
beforeDestroy
()
{
eventHub
.
$off
(
`
${
this
.
namespace
}
-dropdownOpen`
,
this
.
setFocus
);
},
methods
:
{
...
mapActions
([
'
setSearchQuery
'
]),
setFocus
()
{
...
...
spec/frontend/frequent_items/components/frequent_items_search_input_spec.js
View file @
fd4b2a44
...
...
@@ -2,7 +2,6 @@ import { shallowMount } from '@vue/test-utils';
import
{
mockTracking
,
unmockTracking
}
from
'
helpers/tracking_helper
'
;
import
searchComponent
from
'
~/frequent_items/components/frequent_items_search_input.vue
'
;
import
{
createStore
}
from
'
~/frequent_items/store
'
;
import
eventHub
from
'
~/frequent_items/event_hub
'
;
describe
(
'
FrequentItemsSearchInputComponent
'
,
()
=>
{
let
wrapper
;
...
...
@@ -45,39 +44,6 @@ describe('FrequentItemsSearchInputComponent', () => {
});
});
describe
(
'
mounted
'
,
()
=>
{
it
(
'
should listen `dropdownOpen` event
'
,
(
done
)
=>
{
jest
.
spyOn
(
eventHub
,
'
$on
'
).
mockImplementation
(()
=>
{});
const
vmX
=
createComponent
().
vm
;
vmX
.
$nextTick
(()
=>
{
expect
(
eventHub
.
$on
).
toHaveBeenCalledWith
(
`
${
vmX
.
namespace
}
-dropdownOpen`
,
expect
.
any
(
Function
),
);
done
();
});
});
});
describe
(
'
beforeDestroy
'
,
()
=>
{
it
(
'
should unbind event listeners on eventHub
'
,
(
done
)
=>
{
const
vmX
=
createComponent
().
vm
;
jest
.
spyOn
(
eventHub
,
'
$off
'
).
mockImplementation
(()
=>
{});
vmX
.
$mount
();
vmX
.
$destroy
();
vmX
.
$nextTick
(()
=>
{
expect
(
eventHub
.
$off
).
toHaveBeenCalledWith
(
`
${
vmX
.
namespace
}
-dropdownOpen`
,
expect
.
any
(
Function
),
);
done
();
});
});
});
describe
(
'
template
'
,
()
=>
{
it
(
'
should render component element
'
,
()
=>
{
expect
(
wrapper
.
classes
()).
toContain
(
'
search-input-container
'
);
...
...
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