2017-05-08 16:54:32 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2017-06-29 04:13:10 +00:00
|
|
|
describe 'Sub-group project issue boards', :js do
|
2017-05-08 16:54:32 +00:00
|
|
|
let(:group) { create(:group) }
|
|
|
|
let(:nested_group_1) { create(:group, parent: group) }
|
2017-08-02 19:55:11 +00:00
|
|
|
let(:project) { create(:project, group: nested_group_1) }
|
2017-05-08 16:54:32 +00:00
|
|
|
let(:board) { create(:board, project: project) }
|
|
|
|
let(:label) { create(:label, project: project) }
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
let!(:list1) { create(:list, board: board, label: label, position: 0) }
|
|
|
|
let!(:issue) { create(:labeled_issue, project: project, labels: [label]) }
|
|
|
|
|
|
|
|
before do
|
2018-07-11 14:36:08 +00:00
|
|
|
project.add_maintainer(user)
|
2017-05-08 16:54:32 +00:00
|
|
|
|
2017-06-21 23:44:10 +00:00
|
|
|
sign_in(user)
|
2017-05-08 16:54:32 +00:00
|
|
|
|
2017-07-06 16:20:50 +00:00
|
|
|
visit project_board_path(project, board)
|
2017-05-17 18:25:13 +00:00
|
|
|
wait_for_requests
|
2017-05-08 16:54:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'creates new label from sidebar' do
|
2018-04-13 20:27:10 +00:00
|
|
|
find('.board-card').click
|
2017-05-08 16:54:32 +00:00
|
|
|
|
|
|
|
page.within '.labels' do
|
|
|
|
click_link 'Edit'
|
2018-03-12 06:12:30 +00:00
|
|
|
click_link 'Create project label'
|
2017-05-08 16:54:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
page.within '.dropdown-new-label' do
|
|
|
|
fill_in 'new_label_name', with: 'test label'
|
|
|
|
first('.suggest-colors-dropdown a').click
|
|
|
|
|
|
|
|
click_button 'Create'
|
|
|
|
|
2017-05-17 18:25:13 +00:00
|
|
|
wait_for_requests
|
2017-05-08 16:54:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
page.within '.labels' do
|
|
|
|
expect(page).to have_link 'test label'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|