2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 03:56:52 -04:00
|
|
|
require 'spec_helper'
|
2017-05-08 12:54:32 -04:00
|
|
|
|
2020-06-16 14:09:01 -04:00
|
|
|
RSpec.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
|
2018-07-11 10:36:08 -04:00
|
|
|
project.add_maintainer(user)
|
2017-05-08 12:54:32 -04:00
|
|
|
|
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
|
|
|
|
|
2021-03-26 05:09:24 -04:00
|
|
|
# TODO https://gitlab.com/gitlab-org/gitlab/-/issues/324290
|
|
|
|
xit 'creates new label from sidebar' do
|
2018-04-13 16:27:10 -04:00
|
|
|
find('.board-card').click
|
2017-05-08 12:54:32 -04:00
|
|
|
|
|
|
|
page.within '.labels' do
|
|
|
|
click_link 'Edit'
|
2018-03-12 02:12:30 -04:00
|
|
|
click_link 'Create project label'
|
2017-05-08 12:54:32 -04: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 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
|