debian-mirror-gitlab/spec/support/helpers/features/branches_helpers.rb

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

32 lines
686 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-10-15 14:42:47 +05:30
# These helpers allow you to manipulate with sorting features.
#
# Usage:
# describe "..." do
2023-06-20 00:43:36 +05:30
# include Features::BranchesHelpers
2018-10-15 14:42:47 +05:30
# ...
#
# create_branch("feature")
# select_branch("master")
#
2023-06-20 00:43:36 +05:30
module Features
module BranchesHelpers
include ListboxHelpers
2018-10-15 14:42:47 +05:30
2023-06-20 00:43:36 +05:30
def create_branch(branch_name, source_branch_name = "master")
fill_in("branch_name", with: branch_name)
select_branch(source_branch_name)
click_button("Create branch")
end
def select_branch(branch_name)
wait_for_requests
2018-10-15 14:42:47 +05:30
2023-06-20 00:43:36 +05:30
click_button branch_name
send_keys branch_name
select_listbox_item(branch_name)
2018-10-15 14:42:47 +05:30
end
end
end