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 27 Then the active main tab should be Logs
28 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 35 Scenario: On Admin Hooks
31 36 Given I visit admin hooks page
32 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 30 Then 'the active main tab should be Resque' do
31 31 ensure_active_main_tab('Background Jobs')
32 32 end
  33 +
  34 + Then 'the active main tab should be Messages' do
  35 + ensure_active_main_tab('Messages')
  36 + end
33 37 end
... ...
features/steps/shared/paths.rb
... ... @@ -105,6 +105,10 @@ module SharedPaths
105 105 visit admin_logs_path
106 106 end
107 107  
  108 + step 'I visit admin messages page' do
  109 + visit admin_broadcast_messages_path
  110 + end
  111 +
108 112 step 'I visit admin hooks page' do
109 113 visit admin_hooks_path
110 114 end
... ...