Merge branch 'add-issues-modal-filtered-search-takes-search-param' into 'master'
Fixed search param being used in the add issues modal See merge request !10114
This commit is contained in:
commit
e83e4dbde8
|
@ -14,6 +14,8 @@ export default {
|
|||
|
||||
this.filteredSearch = new FilteredSearchBoards(this.store);
|
||||
this.filteredSearch.removeTokens();
|
||||
this.filteredSearch.handleInputPlaceholder();
|
||||
this.filteredSearch.toggleClearSearchButton();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.filteredSearch.cleanup();
|
||||
|
|
|
@ -28,6 +28,8 @@ export default class FilteredSearchBoards extends gl.FilteredSearchManager {
|
|||
[].forEach.call(tokens, (el) => {
|
||||
el.parentNode.removeChild(el);
|
||||
});
|
||||
|
||||
this.filteredSearchInput.value = '';
|
||||
}
|
||||
|
||||
updateTokens() {
|
||||
|
|
|
@ -23,6 +23,20 @@ describe 'Issue Boards add issue modal', :feature, :js do
|
|||
wait_for_vue_resource
|
||||
end
|
||||
|
||||
it 'resets filtered search state' do
|
||||
visit namespace_project_board_path(project.namespace, project, board, search: 'testing')
|
||||
|
||||
wait_for_vue_resource
|
||||
|
||||
click_button('Add issues')
|
||||
|
||||
page.within('.add-issues-modal') do
|
||||
expect(find('.form-control').value).to eq('')
|
||||
expect(page).to have_selector('.clear-search', visible: false)
|
||||
expect(find('.form-control')[:placeholder]).to eq('Search or filter results...')
|
||||
end
|
||||
end
|
||||
|
||||
context 'modal interaction' do
|
||||
it 'opens modal' do
|
||||
click_button('Add issues')
|
||||
|
|
Loading…
Reference in New Issue