2017-08-17 22:00:37 +05:30
|
|
|
require 'rails_helper'
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
describe 'Sub-group project issue boards', :js do
|
2017-08-17 22:00:37 +05:30
|
|
|
let(:group) { create(:group) }
|
|
|
|
let(:nested_group_1) { create(:group, parent: group) }
|
2017-09-10 17:25:29 +05:30
|
|
|
let(:project) { create(:project, group: nested_group_1) }
|
2017-08-17 22:00:37 +05:30
|
|
|
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-09-10 17:25:29 +05:30
|
|
|
sign_in(user)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
visit project_board_path(project, board)
|
|
|
|
wait_for_requests
|
2017-08-17 22:00:37 +05:30
|
|
|
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-09-10 17:25:29 +05:30
|
|
|
wait_for_requests
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
page.within '.labels' do
|
|
|
|
expect(page).to have_link 'test label'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|