@@ -26,6 +26,23 @@ Feature: Index Scoping
2626 And I should see the scope "All" with the count 10
2727 And I should see 10 posts in the table
2828
29+ Scenario : Viewing resources with one scope and no results
30+ Given 10 posts exist
31+ And an index configuration of:
32+ """
33+ ActiveAdmin.register Post do
34+ scope :all, :default => true
35+ filter :title
36+ end
37+ """
38+
39+ When I fill in "Search Title" with "Hello World 17"
40+ And I press "Filter"
41+ And I should not see the scope "All"
42+
43+ When I am on the index page for posts
44+ Then I should see the scope "All" selected
45+
2946 Scenario : Viewing resources when scoping
3047 Given 6 posts exist
3148 And 4 published posts exist
@@ -46,8 +63,8 @@ Feature: Index Scoping
4663 And I should see 4 posts in the table
4764
4865 Scenario : Viewing resources with optional scopes
49- Given 10 posts exist
50- And an index configuration of:
66+ Given 10 posts exist
67+ And an index configuration of:
5168 """
5269 ActiveAdmin.register Post do
5370 scope :all, :if => proc { false }
@@ -62,11 +79,11 @@ Feature: Index Scoping
6279 end
6380 end
6481 """
65- Then I should see the scope "Default" selected
66- And I should not see the scope "All"
67- And I should not see the scope "Today"
68- And I should see the scope "Shown"
69- And I should see the scope "Default" with the count 10
82+ Then I should see the scope "Default" selected
83+ And I should not see the scope "All"
84+ And I should not see the scope "Today"
85+ And I should see the scope "Shown"
86+ And I should see the scope "Default" with the count 10
7087
7188 Scenario : Viewing resources with mulitple scopes as blocks
7289 Given 10 posts exist
0 commit comments