gitlab-org--gitlab-foss/spec/support/target_branch_helpers.rb

17 lines
392 B
Ruby
Raw Normal View History

module TargetBranchHelpers
def select_branch(name)
first('button.js-target-branch').click
wait_for_ajax
all('a[data-group="Branches"]').find do |el|
el.text == name
end.click
end
def create_new_branch(name)
first('button.js-target-branch').click
click_link 'Create new branch'
fill_in 'new_branch_name', with: name
click_button 'Create'
end
end