active_tab.rb 2.1 KB
Newer Older
1
class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
2 3 4 5
  include SharedAuthentication
  include SharedPaths
  include SharedProject
  include SharedActiveTab
R
Robert Schilling 已提交
6
  include SharedProjectTab
7 8 9

  # Sub Tabs: Home

10
  step 'I click the "Team" tab' do
11
    click_link('Members')
12 13
  end

14
  step 'I click the "Attachments" tab' do
15 16 17
    click_link('Attachments')
  end

18
  step 'I click the "Snippets" tab' do
19 20 21
    click_link('Snippets')
  end

22
  step 'I click the "Edit" tab' do
23 24
    page.within '.sidebar-subnav' do
      click_link('Project Settings')
D
Dmitriy Zaporozhets 已提交
25
    end
26 27
  end

28
  step 'I click the "Hooks" tab' do
A
ashleys 已提交
29
    click_link('Webhooks')
30 31
  end

32
  step 'I click the "Deploy Keys" tab' do
33 34 35
    click_link('Deploy Keys')
  end

36
  step 'the active sub nav should be Team' do
37
    ensure_active_sub_nav('Members')
38 39
  end

40
  step 'the active sub nav should be Edit' do
D
Dmitriy Zaporozhets 已提交
41
    ensure_active_sub_nav('Project')
42 43
  end

44
  step 'the active sub nav should be Hooks' do
A
ashleys 已提交
45
    ensure_active_sub_nav('Webhooks')
46 47
  end

48
  step 'the active sub nav should be Deploy Keys' do
49
    ensure_active_sub_nav('Deploy Keys')
50 51 52 53
  end

  # Sub Tabs: Commits

54
  step 'I click the "Compare" tab' do
55 56 57
    click_link('Compare')
  end

58
  step 'I click the "Branches" tab' do
59 60 61
    click_link('Branches')
  end

62
  step 'I click the "Tags" tab' do
63 64 65
    click_link('Tags')
  end

66
  step 'the active sub tab should be Commits' do
67 68 69
    ensure_active_sub_tab('Commits')
  end

70
  step 'the active sub tab should be Compare' do
71 72 73
    ensure_active_sub_tab('Compare')
  end

74
  step 'the active sub tab should be Branches' do
75 76 77
    ensure_active_sub_tab('Branches')
  end

78
  step 'the active sub tab should be Tags' do
79 80 81 82 83
    ensure_active_sub_tab('Tags')
  end

  # Sub Tabs: Issues

84
  step 'I click the "Milestones" tab' do
85
    click_link('Milestones')
86 87
  end

88
  step 'I click the "Labels" tab' do
89 90 91
    click_link('Labels')
  end

92 93
  step 'the active sub tab should be Issues' do
    ensure_active_sub_tab('Issues')
94 95
  end

D
Dmitriy Zaporozhets 已提交
96 97
  step 'the active main tab should be Milestones' do
    ensure_active_main_tab('Milestones')
98 99
  end

D
Dmitriy Zaporozhets 已提交
100 101
  step 'the active main tab should be Labels' do
    ensure_active_main_tab('Labels')
102 103
  end
end