OSDN Git Service

Active tab tests for admin broadcast messages
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 12 Nov 2013 12:32:17 +0000 (14:32 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 12 Nov 2013 12:32:17 +0000 (14:32 +0200)
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
features/admin/active_tab.feature
features/steps/admin/admin_active_tab.rb
features/steps/shared/paths.rb

index 226d3d5..15fcda4 100644 (file)
@@ -27,6 +27,11 @@ Feature: Admin active tab
     Then the active main tab should be Logs
     And no other main tabs should be active
 
+  Scenario: On Admin Messages
+    Given I visit admin messages page
+    Then the active main tab should be Messages
+    And no other main tabs should be active
+
   Scenario: On Admin Hooks
     Given I visit admin hooks page
     Then the active main tab should be Hooks
index f14c5f3..ccafe09 100644 (file)
@@ -30,4 +30,8 @@ class AdminActiveTab < Spinach::FeatureSteps
   Then 'the active main tab should be Resque' do
     ensure_active_main_tab('Background Jobs')
   end
+
+  Then 'the active main tab should be Messages' do
+    ensure_active_main_tab('Messages')
+  end
 end
index 156fa5b..987cd31 100644 (file)
@@ -105,6 +105,10 @@ module SharedPaths
     visit admin_logs_path
   end
 
+  step 'I visit admin messages page' do
+    visit admin_broadcast_messages_path
+  end
+
   step 'I visit admin hooks page' do
     visit admin_hooks_path
   end