diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 11:33:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 11:33:21 +0000 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/features/boards | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) | |
download | gitlab-ce-7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0.tar.gz |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/features/boards')
-rw-r--r-- | spec/features/boards/board_filters_spec.rb | 5 | ||||
-rw-r--r-- | spec/features/boards/boards_spec.rb | 35 | ||||
-rw-r--r-- | spec/features/boards/issue_ordering_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/boards/sidebar_labels_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/boards/sidebar_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/boards/user_adds_lists_to_board_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/boards/user_visits_board_spec.rb | 5 |
7 files changed, 35 insertions, 19 deletions
diff --git a/spec/features/boards/board_filters_spec.rb b/spec/features/boards/board_filters_spec.rb index 2e4dc4a29fc..eab92de7e8a 100644 --- a/spec/features/boards/board_filters_spec.rb +++ b/spec/features/boards/board_filters_spec.rb @@ -7,8 +7,8 @@ RSpec.describe 'Issue board filters', :js do let_it_be(:user) { create(:user) } let_it_be(:board) { create(:board, project: project) } let_it_be(:project_label) { create(:label, project: project, title: 'Label') } - let_it_be(:milestone_1) { create(:milestone, project: project, due_date: 3.days.from_now ) } - let_it_be(:milestone_2) { create(:milestone, project: project, due_date: Date.tomorrow ) } + let_it_be(:milestone_1) { create(:milestone, project: project, due_date: 3.days.from_now) } + let_it_be(:milestone_2) { create(:milestone, project: project, due_date: Date.tomorrow) } let_it_be(:release) { create(:release, tag: 'v1.0', project: project, milestones: [milestone_1]) } let_it_be(:release_2) { create(:release, tag: 'v2.0', project: project, milestones: [milestone_2]) } let_it_be(:issue_1) { create(:issue, project: project, milestone: milestone_1, author: user) } @@ -22,6 +22,7 @@ RSpec.describe 'Issue board filters', :js do let(:filter_submit) { find('.gl-search-box-by-click-search-button') } before do + stub_feature_flags(apollo_boards: false) project.add_maintainer(user) sign_in(user) diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index a09c9d258dc..fee9b5b378e 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -19,6 +19,7 @@ RSpec.describe 'Project issue boards', :js do context 'signed in user' do before do + stub_feature_flags(apollo_boards: false) project.add_maintainer(user) project.add_maintainer(user2) @@ -29,7 +30,7 @@ RSpec.describe 'Project issue boards', :js do context 'no lists' do before do - visit_project_board_path_without_query_limit(project, board) + visit_project_board(project, board) end it 'creates default lists' do @@ -73,7 +74,7 @@ RSpec.describe 'Project issue boards', :js do let_it_be(:issue10) { create(:labeled_issue, project: project, title: 'issue +', description: 'A+ great issue', labels: [a_plus]) } before do - visit_project_board_path_without_query_limit(project, board) + visit_project_board(project, board) end it 'shows description tooltip on list title', :quarantine do @@ -124,7 +125,7 @@ RSpec.describe 'Project issue boards', :js do it 'infinite scrolls list' do create_list(:labeled_issue, 30, project: project, labels: [planning]) - visit_project_board_path_without_query_limit(project, board) + visit_project_board(project, board) page.within(find('.board:nth-child(2)')) do expect(page.find('.board-header')).to have_content('38') @@ -203,7 +204,7 @@ RSpec.describe 'Project issue boards', :js do expect(find('.board:nth-child(3) [data-testid="board-list-header"]')).to have_content(planning.title) # Make sure list positions are preserved after a reload - visit_project_board_path_without_query_limit(project, board) + visit_project_board(project, board) expect(find('.board:nth-child(2) [data-testid="board-list-header"]')).to have_content(development.title) expect(find('.board:nth-child(3) [data-testid="board-list-header"]')).to have_content(planning.title) @@ -215,15 +216,19 @@ RSpec.describe 'Project issue boards', :js do let_it_be(:list2) { create(:list, board: board, label: development, position: 1) } it 'changes position of list' do - visit_project_board_path_without_query_limit(project, board) + inspect_requests(inject_headers: { 'X-GITLAB-DISABLE-SQL-QUERY-LIMIT' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/323426' }) do + visit_project_board(project, board) + end drag(list_from_index: 0, list_to_index: 1, selector: '.board-header') expect(find('.board:nth-child(1) [data-testid="board-list-header"]')).to have_content(development.title) expect(find('.board:nth-child(2) [data-testid="board-list-header"]')).to have_content(planning.title) - # Make sure list positions are preserved after a reload - visit_project_board_path_without_query_limit(project, board) + inspect_requests(inject_headers: { 'X-GITLAB-DISABLE-SQL-QUERY-LIMIT' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/323426' }) do + # Make sure list positions are preserved after a reload + visit_project_board(project, board) + end expect(find('.board:nth-child(1) [data-testid="board-list-header"]')).to have_content(development.title) expect(find('.board:nth-child(2) [data-testid="board-list-header"]')).to have_content(planning.title) @@ -234,7 +239,9 @@ RSpec.describe 'Project issue boards', :js do selector = '.board:not(.is-ghost) .board-header' expect(page).to have_selector(selector, text: development.title, count: 1) - drag(list_from_index: 2, list_to_index: 1, selector: '.board-header', perform_drop: false) + inspect_requests(inject_headers: { 'X-GITLAB-DISABLE-SQL-QUERY-LIMIT' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/323426' }) do + drag(list_from_index: 2, list_to_index: 1, selector: '.board-header', perform_drop: false) + end expect(page).to have_selector(selector, text: development.title, count: 1) end @@ -492,7 +499,7 @@ RSpec.describe 'Project issue boards', :js do context 'keyboard shortcuts' do before do - visit_project_board_path_without_query_limit(project, board) + visit_project_board(project, board) wait_for_requests end @@ -505,6 +512,7 @@ RSpec.describe 'Project issue boards', :js do context 'signed out user' do before do + stub_feature_flags(apollo_boards: false) visit project_board_path(project, board) wait_for_requests end @@ -526,6 +534,7 @@ RSpec.describe 'Project issue boards', :js do let_it_be(:user_guest) { create(:user) } before do + stub_feature_flags(apollo_boards: false) project.add_guest(user_guest) sign_in(user_guest) visit project_board_path(project, board) @@ -587,11 +596,9 @@ RSpec.describe 'Project issue boards', :js do end end - def visit_project_board_path_without_query_limit(project, board) - inspect_requests(inject_headers: { 'X-GITLAB-DISABLE-SQL-QUERY-LIMIT' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/323426' }) do - visit project_board_path(project, board) + def visit_project_board(project, board) + visit project_board_path(project, board) - wait_for_requests - end + wait_for_requests end end diff --git a/spec/features/boards/issue_ordering_spec.rb b/spec/features/boards/issue_ordering_spec.rb index 57f2bf26752..a3dda3b9d2f 100644 --- a/spec/features/boards/issue_ordering_spec.rb +++ b/spec/features/boards/issue_ordering_spec.rb @@ -15,6 +15,7 @@ RSpec.describe 'Issue Boards', :js do let!(:issue3) { create(:labeled_issue, project: project, title: 'testing 3', labels: [label], relative_position: 1) } before do + stub_feature_flags(apollo_boards: false) project.add_maintainer(user) sign_in(user) diff --git a/spec/features/boards/sidebar_labels_spec.rb b/spec/features/boards/sidebar_labels_spec.rb index 511233b50c0..12d91e9c5a8 100644 --- a/spec/features/boards/sidebar_labels_spec.rb +++ b/spec/features/boards/sidebar_labels_spec.rb @@ -20,6 +20,7 @@ RSpec.describe 'Project issue boards sidebar labels', :js do let(:card) { find('.board:nth-child(2)').first('.board-card') } before do + stub_feature_flags(apollo_boards: false) project.add_maintainer(user) sign_in(user) diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index 0e914ae19d1..2b2a412194a 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -15,6 +15,7 @@ RSpec.describe 'Project issue boards sidebar', :js do let_it_be(:issue, reload: true) { create(:issue, project: project, relative_position: 1) } before do + stub_feature_flags(apollo_boards: false) project.add_maintainer(user) sign_in(user) diff --git a/spec/features/boards/user_adds_lists_to_board_spec.rb b/spec/features/boards/user_adds_lists_to_board_spec.rb index 26c310a6f56..480a88a6b84 100644 --- a/spec/features/boards/user_adds_lists_to_board_spec.rb +++ b/spec/features/boards/user_adds_lists_to_board_spec.rb @@ -31,13 +31,15 @@ RSpec.describe 'User adds lists', :js do with_them do before do + stub_feature_flags(apollo_boards: false) sign_in(user) set_cookie('sidebar_collapsed', 'true') - if board_type == :project + case board_type + when :project visit project_board_path(project, project_board) - elsif board_type == :group + when :group visit group_board_path(group, group_board) end diff --git a/spec/features/boards/user_visits_board_spec.rb b/spec/features/boards/user_visits_board_spec.rb index 7fe32557d6a..c386477fa9d 100644 --- a/spec/features/boards/user_visits_board_spec.rb +++ b/spec/features/boards/user_visits_board_spec.rb @@ -21,7 +21,7 @@ RSpec.describe 'User visits issue boards', :js do let_it_be(:label1) { create(:group_label, group: group, name: label_name1) } let_it_be(:label2) { create(:group_label, group: group, name: label_name2) } - let_it_be(:assignee) { create_default(:group_member, :maintainer, user: create(:user, username: assignee_username), group: group ).user } + let_it_be(:assignee) { create_default(:group_member, :maintainer, user: create(:user, username: assignee_username), group: group).user } let_it_be(:milestone) { create_default(:milestone, project: project, start_date: Date.today - 1, due_date: 7.days.from_now) } before_all do @@ -44,6 +44,7 @@ RSpec.describe 'User visits issue boards', :js do with_them do before do + stub_feature_flags(apollo_boards: false) visit board_path wait_for_requests @@ -59,6 +60,7 @@ RSpec.describe 'User visits issue boards', :js do end context "project boards" do + stub_feature_flags(apollo_boards: false) let_it_be(:board) { create_default(:board, project: project) } let_it_be(:backlog_list) { create_default(:backlog_list, board: board) } @@ -68,6 +70,7 @@ RSpec.describe 'User visits issue boards', :js do end context "group boards" do + stub_feature_flags(apollo_boards: false) let_it_be(:board) { create_default(:board, group: group) } let_it_be(:backlog_list) { create_default(:backlog_list, board: board) } |