Skip to content
This repository
Newer
Older
100644 44 lines (38 sloc) 1.244 kb
7268ccaa »
2011-05-24 Moved some integration tests to feature files.
1 Feature: Dashboard
2
3 Background:
4 Given I am logged in
5
6
7 Scenario: With no configuration
8 Given a configuration of:
9 """
10 """
11 When I go to the dashboard
12 Then I should see the default welcome message
13
14 Scenario: Displaying a dashboard widget
15 Given a configuration of:
16 """
17 ActiveAdmin::Dashboards.build do
18 section 'Hello World' do
19 para "Hello world from the content"
20 end
21 end
22 """
23 When I go to the dashboard
24 Then I should not see the default welcome message
25 And I should see a dashboard widget "Hello World"
26 And I should see "Hello world from the content"
fe4e94f4 »
2011-12-01 Added a cucumber feature for the dashboard section option :if
27
28 Scenario: Displaying a dashboard widget using the ':if' option
29 Given a configuration of:
30 """
31 ActiveAdmin::Dashboards.build do
32 section 'Hello World', :if => proc{ current_admin_user } do
33 "Hello world from the content"
34 end
35
36 section 'Hidden by If', :if => proc{ false } do
37 "Hello world from the content"
38 end
39 end
40 """
41 When I go to the dashboard
42 Then I should not see the default welcome message
43 And I should see a dashboard widget "Hello World"
44 And I should not see a dashboard widget "Hidden by If"
Something went wrong with that request. Please try again.