From 4e5bf7d6ddc4cbeda2a09c2cc77b1ddabff6756e Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 14 Mar 2017 09:34:55 +0000 Subject: Updated specs to check that the token is correctly added --- app/assets/javascripts/boards/components/modal/filters.js | 3 +-- 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 -- cgit v1.2.1