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
|
2016-06-16 23:09:34 +05:30
|
|
|
page.within('.layout-nav') do
|
|
|
|
click_link('Snippets')
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
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
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
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-06-16 23:09:34 +05:30
|
|
|
page.within '.content' 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
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
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
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
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
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
step 'the active sub tab should be Milestones' do
|
|
|
|
ensure_active_sub_tab('Milestones')
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
step 'the active sub tab should be Labels' do
|
|
|
|
ensure_active_sub_tab('Labels')
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|