2017-05-08 12:54:32 -04:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2017-06-29 00:13:10 -04:00
|
|
|
describe 'Sub-group project issue boards', :js do
|
2017-05-08 12:54:32 -04:00
|
|
|
let(:group) { create(:group) }
|
|
|
|
let(:nested_group_1) { create(:group, parent: group) }
|
2017-08-02 15:55:11 -04:00
|
|
|
let(:project) { create(:project, group: nested_group_1) }
|
2017-05-08 12:54:32 -04: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
|
|
|
|
project.add_master(user)
|
|
|
|
|
2017-06-21 19:44:10 -04:00
|
|
|
sign_in(user)
|
2017-05-08 12:54:32 -04:00
|
|
|
|
2017-07-06 12:20:50 -04:00
|
|
|
visit project_board_path(project, board)
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-05-08 12:54:32 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'creates new label from sidebar' do
|
|
|
|
find('.card').click
|
|
|
|
|
|
|
|
page.within '.labels' do
|
|
|
|
click_link 'Edit'
|
|
|
|
click_link 'Create new label'
|
|
|
|
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 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-05-08 12:54:32 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
page.within '.labels' do
|
|
|
|
expect(page).to have_link 'test label'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|