2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
require 'spec_helper'
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
RSpec.describe 'Project issue boards sidebar', :js, feature_category: :team_planning do
|
2018-03-17 18:26:18 +05:30
|
|
|
include BoardHelpers
|
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
let_it_be(:user) { create(:user) }
|
2022-03-02 08:16:31 +05:30
|
|
|
let_it_be(:group) { create(:group, :public) }
|
|
|
|
let_it_be(:project) { create(:project, :public, namespace: group) }
|
2021-04-29 21:17:54 +05:30
|
|
|
let_it_be(:board) { create(:board, project: project) }
|
2022-03-02 08:16:31 +05:30
|
|
|
let_it_be(:label) { create(:label, project: project, name: 'Label') }
|
|
|
|
let_it_be(:list) { create(:list, board: board, label: label, position: 0) }
|
2019-09-30 21:07:59 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
let_it_be(:issue, reload: true) { create(:issue, project: project, relative_position: 1) }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
before do
|
2023-01-13 00:05:48 +05:30
|
|
|
stub_feature_flags(apollo_boards: false)
|
2018-11-18 11:00:15 +05:30
|
|
|
project.add_maintainer(user)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
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)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
wait_for_requests
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
it_behaves_like 'issue boards sidebar'
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
def first_card
|
|
|
|
find('.board:nth-child(1)').first("[data-testid='board_card']")
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
def click_first_issue_card
|
|
|
|
click_card(first_card)
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
2021-09-30 23:02:18 +05:30
|
|
|
|
|
|
|
def refresh_and_click_first_card
|
|
|
|
page.refresh
|
|
|
|
|
|
|
|
wait_for_requests
|
|
|
|
|
|
|
|
first_card.click
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|