features/dashboard.feature in activeadmin-0.4.4 vs features/dashboard.feature in activeadmin-0.5.0.pre

- old
+ new

@@ -1,33 +1,54 @@ Feature: Dashboard - Background: + @dashboard + Scenario: With default configuration + Given a configuration of: + """ + ActiveAdmin.register_page "Dashboard" do + content do + para "Hello world from the dashboard page" + end + end + """ Given I am logged in + When I go to the dashboard + Then I should see the Active Admin layout + And I should not see the default welcome message + And I should see "Hello world from the dashboard page" - - Scenario: With no configuration + @dashboard + Scenario: DEPRECATED - With default configuration Given a configuration of: """ + ActiveAdmin::Dashboards.build do + end """ + Given I am logged in When I go to the dashboard - Then I should see the default welcome message + Then I should see the Active Admin layout + And I should see the default welcome message - Scenario: Displaying a dashboard widget + @dashboard + Scenario: DEPRECATED - Displaying a dashboard widget Given a configuration of: """ ActiveAdmin::Dashboards.build do section 'Hello World' do para "Hello world from the content" end end """ + Given I am logged in When I go to the dashboard - Then I should not see the default welcome message + Then I should see the Active Admin layout + And I should not see the default welcome message And I should see a dashboard widget "Hello World" And I should see "Hello world from the content" - Scenario: Displaying a dashboard widget using the ':if' option + @dashboard + Scenario: DEPRECATED - Displaying a dashboard widget using the ':if' option Given a configuration of: """ ActiveAdmin::Dashboards.build do section 'Hello World', :if => proc{ current_admin_user } do "Hello world from the content" @@ -36,9 +57,11 @@ section 'Hidden by If', :if => proc{ false } do "Hello world from the content" end end """ + Given I am logged in When I go to the dashboard - Then I should not see the default welcome message + Then I should see the Active Admin layout + And I should not see the default welcome message And I should see a dashboard widget "Hello World" And I should not see a dashboard widget "Hidden by If"