debian-mirror-gitlab/features/steps/project/active_tab.rb

104 lines
2.1 KiB
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
2014-09-02 18:07:02 +05:30
include SharedAuthentication
include SharedPaths
include SharedProject
include SharedActiveTab
2015-04-26 12:48:37 +05:30
include SharedProjectTab
2014-09-02 18:07:02 +05:30
# Sub Tabs: Home
2015-04-26 12:48:37 +05:30
step 'I click the "Team" tab' do
2014-09-02 18:07:02 +05:30
click_link('Members')
end
2015-04-26 12:48:37 +05:30
step 'I click the "Attachments" tab' do
2014-09-02 18:07:02 +05:30
click_link('Attachments')
end
2015-04-26 12:48:37 +05:30
step 'I click the "Snippets" tab' do
page.within('.layout-nav') do
click_link('Snippets')
end
2014-09-02 18:07:02 +05:30
end
step 'I click the "Edit Project"' do
page.within '.layout-nav .controls' do
click_link('Edit Project')
2014-09-02 18:07:02 +05:30
end
end
2015-04-26 12:48:37 +05:30
step 'I click the "Hooks" tab' do
2016-06-02 11:05:42 +05:30
click_link('Webhooks')
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I click the "Deploy Keys" tab' do
2014-09-02 18:07:02 +05:30
click_link('Deploy Keys')
end
step 'the active sub nav should be Members' do
2014-09-02 18:07:02 +05:30
ensure_active_sub_nav('Members')
end
2015-04-26 12:48:37 +05:30
step 'the active sub nav should be Hooks' do
2016-06-02 11:05:42 +05:30
ensure_active_sub_nav('Webhooks')
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'the active sub nav should be Deploy Keys' do
2014-09-02 18:07:02 +05:30
ensure_active_sub_nav('Deploy Keys')
end
# Sub Tabs: Commits
2015-04-26 12:48:37 +05:30
step 'I click the "Compare" tab' do
2014-09-02 18:07:02 +05:30
click_link('Compare')
end
2015-04-26 12:48:37 +05:30
step 'I click the "Branches" tab' do
2016-11-03 12:29:30 +05:30
page.within '.sub-nav' do
click_link('Branches')
end
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I click the "Tags" tab' do
2014-09-02 18:07:02 +05:30
click_link('Tags')
end
2015-04-26 12:48:37 +05:30
step 'the active sub tab should be Compare' do
2014-09-02 18:07:02 +05:30
ensure_active_sub_tab('Compare')
end
2015-04-26 12:48:37 +05:30
step 'the active sub tab should be Branches' do
2014-09-02 18:07:02 +05:30
ensure_active_sub_tab('Branches')
end
2015-04-26 12:48:37 +05:30
step 'the active sub tab should be Tags' do
2014-09-02 18:07:02 +05:30
ensure_active_sub_tab('Tags')
end
# Sub Tabs: Issues
step 'I click the "Milestones" sub tab' do
page.within('.sub-nav') do
click_link('Milestones')
end
2014-09-02 18:07:02 +05:30
end
step 'I click the "Labels" sub tab' do
page.within('.sub-nav') do
click_link('Labels')
end
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'the active sub tab should be Issues' do
ensure_active_sub_tab('Issues')
2014-09-02 18:07:02 +05:30
end
step 'the active sub tab should be Milestones' do
ensure_active_sub_tab('Milestones')
2014-09-02 18:07:02 +05:30
end
step 'the active sub tab should be Labels' do
ensure_active_sub_tab('Labels')
2014-09-02 18:07:02 +05:30
end
end