BigW Consortium Gitlab

Commit 75807f2a by Sean McGivern

Merge branch 'improve-milestone_filter_spec-wait_for_ajax-correct-flow' into 'master'

Fix milestone_filter_spec.rb See merge request !11329
parents c266b5f5 4c9264b6
require 'spec_helper'
describe 'Dashboard > milestone filter', feature: true, js: true do
describe 'Dashboard > milestone filter', :feature, :js do
include WaitForAjax
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:milestone) { create(:milestone, title: "v1.0", project: project) }
......@@ -26,30 +28,29 @@ describe 'Dashboard > milestone filter', feature: true, js: true do
before do
find(milestone_select).click
wait_for_ajax
page.within('.dropdown-content') do
click_link 'v1.0'
end
find(milestone_select).click
wait_for_ajax
end
it 'shows issues with Milestone v1.0' do
expect(find('.issues-list')).to have_selector('.issue', count: 1)
find(milestone_select).click
expect(find('.dropdown-content')).to have_selector('a.is-active', count: 1)
end
it 'should not change active Milestone unless clicked' do
find(milestone_select).trigger('click')
expect(find('.dropdown-content')).to have_selector('a.is-active', count: 1)
# open & close dropdown
find('.dropdown-menu-close').click
expect(find('.milestone-filter')).not_to have_selector('.dropdown.open')
find(milestone_select).click
expect(find('.dropdown-content')).to have_selector('a.is-active', count: 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment