Commit 963a31144b0d69af7b08e1912965a920636ce600

Authored by Dmitriy Zaporozhets
1 parent 90d59939

Active tab tests for admin broadcast messages

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
features/admin/active_tab.feature
@@ -27,6 +27,11 @@ Feature: Admin active tab @@ -27,6 +27,11 @@ Feature: Admin active tab
27 Then the active main tab should be Logs 27 Then the active main tab should be Logs
28 And no other main tabs should be active 28 And no other main tabs should be active
29 29
  30 + Scenario: On Admin Messages
  31 + Given I visit admin messages page
  32 + Then the active main tab should be Messages
  33 + And no other main tabs should be active
  34 +
30 Scenario: On Admin Hooks 35 Scenario: On Admin Hooks
31 Given I visit admin hooks page 36 Given I visit admin hooks page
32 Then the active main tab should be Hooks 37 Then the active main tab should be Hooks
features/steps/admin/admin_active_tab.rb
@@ -30,4 +30,8 @@ class AdminActiveTab &lt; Spinach::FeatureSteps @@ -30,4 +30,8 @@ class AdminActiveTab &lt; Spinach::FeatureSteps
30 Then 'the active main tab should be Resque' do 30 Then 'the active main tab should be Resque' do
31 ensure_active_main_tab('Background Jobs') 31 ensure_active_main_tab('Background Jobs')
32 end 32 end
  33 +
  34 + Then 'the active main tab should be Messages' do
  35 + ensure_active_main_tab('Messages')
  36 + end
33 end 37 end
features/steps/shared/paths.rb
@@ -105,6 +105,10 @@ module SharedPaths @@ -105,6 +105,10 @@ module SharedPaths
105 visit admin_logs_path 105 visit admin_logs_path
106 end 106 end
107 107
  108 + step 'I visit admin messages page' do
  109 + visit admin_broadcast_messages_path
  110 + end
  111 +
108 step 'I visit admin hooks page' do 112 step 'I visit admin hooks page' do
109 visit admin_hooks_path 113 visit admin_hooks_path
110 end 114 end