summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-13 13:05:32 +0000
committerPhil Hughes <me@iamphill.com>2017-03-16 08:42:41 +0000
commitb1d07760e66ff2db3efad9f26c7f5fdf6e8ca4d0 (patch)
tree05cac81163a3921b831df17c70a3d02a035b6855
parent3e95bd97653754b154938e9ba1ff87bc6436ba4c (diff)
downloadgitlab-ce-b1d07760e66ff2db3efad9f26c7f5fdf6e8ca4d0.tar.gz
Fixed search specs
Clean up the events when the modal window is closed
-rw-r--r--app/assets/javascripts/boards/components/modal/filters.js3
-rw-r--r--app/assets/stylesheets/pages/boards.scss3
-rw-r--r--spec/features/boards/add_issues_modal_spec.rb2
3 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/components/modal/filters.js b/app/assets/javascripts/boards/components/modal/filters.js
index bf137b27d29..030134bd4b8 100644
--- a/app/assets/javascripts/boards/components/modal/filters.js
+++ b/app/assets/javascripts/boards/components/modal/filters.js
@@ -15,7 +15,8 @@ export default {
this.filteredSearch = new FilteredSearchBoards(this.store, false);
},
- destroyed() {
+ beforeDestroy() {
+ this.filteredSearch.cleanup();
FilteredSearchContainer.container = document;
this.store.path = '';
},
diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss
index 541c46cbb8c..f9ee33019cd 100644
--- a/app/assets/stylesheets/pages/boards.scss
+++ b/app/assets/stylesheets/pages/boards.scss
@@ -421,7 +421,8 @@
display: flex;
.issues-filters {
- width: 100%;
+ -webkit-flex: 1;
+ flex: 1;
}
}
diff --git a/spec/features/boards/add_issues_modal_spec.rb b/spec/features/boards/add_issues_modal_spec.rb
index f7f2d883d2f..c87c0632cb5 100644
--- a/spec/features/boards/add_issues_modal_spec.rb
+++ b/spec/features/boards/add_issues_modal_spec.rb
@@ -107,6 +107,7 @@ describe 'Issue Boards add issue modal', :feature, :js do
it 'returns issues' do
page.within('.add-issues-modal') do
find('.form-control').native.send_keys(issue.title)
+ find('.form-control').native.send_keys(:enter)
expect(page).to have_selector('.card', count: 1)
end
@@ -115,6 +116,7 @@ describe 'Issue Boards add issue modal', :feature, :js do
it 'returns no issues' do
page.within('.add-issues-modal') do
find('.form-control').native.send_keys('testing search')
+ find('.form-control').native.send_keys(:enter)
expect(page).not_to have_selector('.card')
expect(page).not_to have_content("You haven't added any issues to your project yet")