forked from activeadmin/activeadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbreadcrumb.feature
76 lines (69 loc) · 1.95 KB
/
breadcrumb.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@breadcrumb
Feature: Breadcrumb
Background:
Given I am logged in
Scenario: Default breadcrumb links
Given a configuration of:
"""
ActiveAdmin.register Post do
end
"""
When I am on the new post page
Then I should see a link to "Post" in the breadcrumb
Scenario: Rewritten breadcrumb links
Given a configuration of:
"""
ActiveAdmin.register Post do
breadcrumb do
[
link_to('test', '/admin/test/url')
]
end
end
"""
When I am on the new post page
Then I should see a link to "test" in the breadcrumb
Scenario: No Breadcrumbs configuration
Given a configuration of:
"""
ActiveAdmin.application.breadcrumb = false
ActiveAdmin.register Post do
end
"""
When I am on the new post page
Then I should see "Post"
And I should not see the element ".breadcrumb"
Scenario: Application config of false and a resource config of true
Given a configuration of:
"""
ActiveAdmin.application.breadcrumb = false
ActiveAdmin.register Post do
config.breadcrumb = true
end
"""
When I am on the new post page
Then I should see a link to "Post" in the breadcrumb
Scenario: Application config of false and rewritten breadcrumb links
Given a configuration of:
"""
ActiveAdmin.application.breadcrumb = false
ActiveAdmin.register Post do
breadcrumb do
[
link_to('test', '/admin/test/url')
]
end
end
"""
When I am on the new post page
Then I should see a link to "test" in the breadcrumb
Scenario: Application config of true and a resource config of false
Given a configuration of:
"""
ActiveAdmin.application.breadcrumb = true
ActiveAdmin.register Post do
config.breadcrumb = false
end
"""
When I am on the new post page
Then I should not see the element ".breadcrumb"