diff options
author | Phil Hughes <me@iamphill.com> | 2017-03-14 09:34:55 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-03-16 08:42:41 +0000 |
commit | 4e5bf7d6ddc4cbeda2a09c2cc77b1ddabff6756e (patch) | |
tree | 1df9410135fc912a75ccd144cad5e7a9c2866fd5 | |
parent | b1d07760e66ff2db3efad9f26c7f5fdf6e8ca4d0 (diff) | |
download | gitlab-ce-4e5bf7d6ddc4cbeda2a09c2cc77b1ddabff6756e.tar.gz |
Updated specs to check that the token is correctly added
-rw-r--r-- | app/assets/javascripts/boards/components/modal/filters.js | 3 | ||||
-rw-r--r-- | spec/features/boards/modal_filter_spec.rb | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/boards/components/modal/filters.js b/app/assets/javascripts/boards/components/modal/filters.js index 030134bd4b8..d305899732f 100644 --- a/app/assets/javascripts/boards/components/modal/filters.js +++ b/app/assets/javascripts/boards/components/modal/filters.js @@ -1,4 +1,3 @@ -/* global Vue */ import FilteredSearchBoards from '../../filtered_search_boards'; import FilteredSearchContainer from '../../../filtered_search/container'; @@ -13,7 +12,7 @@ export default { mounted() { FilteredSearchContainer.container = this.$el; - this.filteredSearch = new FilteredSearchBoards(this.store, false); + this.filteredSearch = new FilteredSearchBoards(this.store); }, beforeDestroy() { this.filteredSearch.cleanup(); diff --git a/spec/features/boards/modal_filter_spec.rb b/spec/features/boards/modal_filter_spec.rb index e26145b6291..e2281a7da55 100644 --- a/spec/features/boards/modal_filter_spec.rb +++ b/spec/features/boards/modal_filter_spec.rb @@ -91,6 +91,7 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do page.within('.add-issues-modal') do wait_for_vue_resource + expect(page).to have_selector('.js-visual-token', text: user2.username) expect(page).to have_selector('.card', count: 1) end end @@ -113,6 +114,7 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do page.within('.add-issues-modal') do wait_for_vue_resource + expect(page).to have_selector('.js-visual-token', text: 'none') expect(page).to have_selector('.card', count: 1) end end @@ -125,6 +127,7 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do page.within('.add-issues-modal') do wait_for_vue_resource + expect(page).to have_selector('.js-visual-token', text: user2.username) expect(page).to have_selector('.card', count: 1) end end @@ -146,6 +149,7 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do page.within('.add-issues-modal') do wait_for_vue_resource + expect(page).to have_selector('.js-visual-token', text: 'upcoming') expect(page).to have_selector('.card', count: 0) end end @@ -158,6 +162,7 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do page.within('.add-issues-modal') do wait_for_vue_resource + expect(page).to have_selector('.js-visual-token', text: milestone.name) expect(page).to have_selector('.card', count: 1) end end @@ -179,18 +184,20 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do page.within('.add-issues-modal') do wait_for_vue_resource + expect(page).to have_selector('.js-visual-token', text: 'none') expect(page).to have_selector('.card', count: 1) end end it 'filters by label' do set_filter('label') - click_filter_link('No Label') + click_filter_link(label.title) submit_filter page.within('.add-issues-modal') do wait_for_vue_resource + expect(page).to have_selector('.js-visual-token', text: label.title) expect(page).to have_selector('.card', count: 1) end end |