2017-06-08 12:43:05 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-06-29 00:13:10 -04:00
|
|
|
describe 'Dashboard milestone tabs', :js do
|
2017-06-08 12:43:05 -04:00
|
|
|
let(:user) { create(:user) }
|
2017-08-02 15:55:11 -04:00
|
|
|
let(:project) { create(:project) }
|
2017-06-08 12:43:05 -04:00
|
|
|
let!(:label) { create(:label, project: project) }
|
|
|
|
let(:project_milestone) { create(:milestone, project: project) }
|
|
|
|
let(:milestone) do
|
|
|
|
DashboardMilestone.build(
|
|
|
|
[project],
|
|
|
|
project_milestone.title
|
|
|
|
)
|
|
|
|
end
|
|
|
|
let!(:merge_request) { create(:labeled_merge_request, source_project: project, target_project: project, milestone: project_milestone, labels: [label]) }
|
|
|
|
|
|
|
|
before do
|
2018-07-11 10:36:08 -04:00
|
|
|
project.add_maintainer(user)
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in(user)
|
2017-06-08 12:43:05 -04:00
|
|
|
|
|
|
|
visit dashboard_milestone_path(milestone.safe_title, title: milestone.title)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'loads merge requests async' do
|
|
|
|
click_link 'Merge Requests'
|
|
|
|
|
2017-06-09 11:54:20 -04:00
|
|
|
expect(page).to have_selector('.milestone-merge_requests-list')
|
2017-06-08 12:43:05 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'loads participants async' do
|
|
|
|
click_link 'Participants'
|
|
|
|
|
|
|
|
expect(page).to have_selector('#tab-participants .bordered-list')
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'loads labels async' do
|
|
|
|
click_link 'Labels'
|
|
|
|
|
|
|
|
expect(page).to have_selector('#tab-labels .bordered-list')
|
|
|
|
end
|
|
|
|
end
|