debian-mirror-gitlab/spec/features/groups/board_sidebar_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.7 KiB
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2019-12-04 20:38:33 +05:30
require 'spec_helper'
2018-12-13 13:39:08 +05:30
2023-03-04 22:38:38 +05:30
RSpec.describe 'Group Issue Boards', :js, feature_category: :subgroups do
2018-12-13 13:39:08 +05:30
include BoardHelpers
let(:group) { create(:group) }
2023-01-13 00:05:48 +05:30
let(:user) { create(:group_member, user: create(:user), group: group).user }
2018-12-13 13:39:08 +05:30
let!(:project_1) { create(:project, :public, group: group) }
let!(:project_2) { create(:project, :public, group: group) }
let!(:project_1_label) { create(:label, project: project_1, name: 'Development 1') }
let!(:project_2_label) { create(:label, project: project_2, name: 'Development 2') }
let!(:group_label) { create(:group_label, title: 'Bug', description: 'Fusce consequat', group: group) }
let!(:issue_1) { create(:labeled_issue, project: project_1, relative_position: 1) }
let!(:issue_2) { create(:labeled_issue, project: project_2, relative_position: 2) }
let(:board) { create(:board, group: group) }
let!(:list) { create(:list, board: board, label: project_1_label, position: 0) }
let(:card) { find('.board:nth-child(1)').first('.board-card') }
before do
2023-01-13 00:05:48 +05:30
stub_feature_flags(apollo_boards: false)
2018-12-13 13:39:08 +05:30
sign_in(user)
visit group_board_path(group, board)
wait_for_requests
end
context 'labels' do
2021-10-27 15:23:28 +05:30
it 'only shows valid labels for the issue project and group' do
click_card(card)
page.within('.labels') do
click_button 'Edit'
wait_for_requests
page.within('[data-testid="dropdown-content"]') do
expect(page).to have_content(project_1_label.title)
expect(page).to have_content(group_label.title)
expect(page).not_to have_content(project_2_label.title)
end
end
end
end
2018-12-13 13:39:08 +05:30
end