2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'Dashboard milestone tabs', :js do
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:project) { create(:project) }
|
|
|
|
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-11-18 11:00:15 +05:30
|
|
|
project.add_maintainer(user)
|
2017-09-10 17:25:29 +05:30
|
|
|
sign_in(user)
|
|
|
|
|
|
|
|
visit dashboard_milestone_path(milestone.safe_title, title: milestone.title)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'loads merge requests async' do
|
|
|
|
click_link 'Merge Requests'
|
|
|
|
|
|
|
|
expect(page).to have_selector('.milestone-merge_requests-list')
|
|
|
|
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
|