active_tab.rb 2.3 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
    page.within('.layout-nav') do
      click_link('Snippets')
    end
22 23
  end

24 25 26
  step 'I click the "Edit Project"' do
    page.within '.layout-nav .controls' do
      click_link('Edit Project')
D
Dmitriy Zaporozhets 已提交
27
    end
28 29
  end

J
Jose Ivan Vargas 已提交
30 31
  step 'I click the "Integrations" tab' do
    click_link('Integrations')
32 33
  end

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

K
Kamil Trzcinski 已提交
38 39 40 41
  step 'I click the "Pages" tab' do
    click_link('Pages')
  end

42
  step 'the active sub nav should be Members' do
43
    ensure_active_sub_nav('Members')
44 45
  end

J
Jose Ivan Vargas 已提交
46 47
  step 'the active sub nav should be Integrations' do
    ensure_active_sub_nav('Integrations')
48 49
  end

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

K
Kamil Trzcinski 已提交
54 55 56 57
  step 'the active sub nav should be Pages' do
    ensure_active_sub_nav('Pages')
  end

58 59
  # Sub Tabs: Commits

60
  step 'I click the "Compare" tab' do
61 62 63
    click_link('Compare')
  end

64
  step 'I click the "Branches" tab' do
65
    page.within '.sub-nav' do
66 67
      click_link('Branches')
    end
68 69
  end

70
  step 'I click the "Tags" tab' do
71 72 73
    click_link('Tags')
  end

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

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

82
  step 'the active sub tab should be Tags' do
83 84 85 86 87
    ensure_active_sub_tab('Tags')
  end

  # Sub Tabs: Issues

88 89
  step 'I click the "Milestones" sub tab' do
    page.within('.sub-nav') do
90 91
      click_link('Milestones')
    end
92 93
  end

94 95
  step 'I click the "Labels" sub tab' do
    page.within('.sub-nav') do
96 97
      click_link('Labels')
    end
98 99
  end

100 101
  step 'the active sub tab should be Issues' do
    ensure_active_sub_tab('Issues')
102 103
  end

104 105
  step 'the active sub tab should be Milestones' do
    ensure_active_sub_tab('Milestones')
106 107
  end

108 109
  step 'the active sub tab should be Labels' do
    ensure_active_sub_tab('Labels')
110 111
  end
end