debian-mirror-gitlab/features/steps/project/commits/branches.rb

33 lines
762 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
include SharedPaths
step 'I click link "All"' do
click_link "All"
end
step 'I click link "Protected"' do
click_link "Protected"
end
step 'I click new branch link' do
click_link "New branch"
end
step 'I submit new branch form with invalid name' do
fill_in 'branch_name', with: '1.0 stable'
2018-03-17 18:26:18 +05:30
page.find("body").click # defocus the branch_name input
2017-08-17 22:00:37 +05:30
select_branch('master')
2015-04-26 12:48:37 +05:30
click_button 'Create branch'
end
2017-08-17 22:00:37 +05:30
def select_branch(branch_name)
2018-03-17 18:26:18 +05:30
find('.git-revision-dropdown-toggle').click
2017-08-17 22:00:37 +05:30
page.within '#new-branch-form .dropdown-menu' do
click_link branch_name
end
end
2015-04-26 12:48:37 +05:30
end