debian-mirror-gitlab/spec/support/helpers/board_helpers.rb

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

44 lines
1.1 KiB
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module BoardHelpers
def click_card(card)
within card do
2018-11-08 19:23:39 +05:30
first('.board-card-number').click
2021-06-08 01:23:25 +05:30
wait_for_requests
end
end
def load_board(board_path)
visit board_path
wait_for_requests
end
def click_card_and_edit_label
click_card(card)
page.within(labels_select) do
click_button 'Edit'
wait_for_requests
2018-03-17 18:26:18 +05:30
end
end
2021-10-27 15:23:28 +05:30
def drag(selector: '.board-list', list_from_index: 0, from_index: 0, to_index: 0, list_to_index: 0, perform_drop: true)
inspect_requests(inject_headers: { 'X-GITLAB-DISABLE-SQL-QUERY-LIMIT' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/323426' }) do
# ensure there is enough horizontal space for four board lists
resize_window(2000, 800)
drag_to(selector: selector,
scrollable: '#board-app',
list_from_index: list_from_index,
from_index: from_index,
to_index: to_index,
list_to_index: list_to_index,
perform_drop: perform_drop)
end
wait_for_requests
end
2018-03-17 18:26:18 +05:30
end