forked from OrchardCMS/Orchard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContentTypes.feature
80 lines (76 loc) · 2.7 KB
/
ContentTypes.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
77
78
79
80
Feature: Content Types
In order to add new types to my site
As an adminitrator
I want to create create content types
Scenario: I can create a new content type
Given I have installed Orchard
When I go to "Admin/ContentTypes"
Then I should see "<a[^>]*>.*?Create new type</a>"
When I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| DisplayName | Event |
| Name | Event |
And I hit "Create"
And I go to "Admin/ContentTypes/"
Then I should see "Event"
Scenario: I can't create a content type with an already existing name
Given I have installed Orchard
When I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| DisplayName | Event |
| Name | Event |
And I hit "Create"
And I go to "Admin/ContentTypes/"
Then I should see "Event"
When I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| DisplayName | Event |
| Name | Event-2 |
And I hit "Create"
Then I should see "<h1[^>]*>.*?New Content Type.*?</h1>"
And I should see "validation-summary-errors"
Scenario: I can't create a content type with an already existing technical name
Given I have installed Orchard
When I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| DisplayName | Dinner |
| Name | Dinner |
And I hit "Create"
And I go to "Admin/ContentTypes/"
Then I should see "Dinner"
When I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| DisplayName | Dinner2 |
| Name | Dinner |
And I hit "Create"
Then I should see "<h1[^>]*>.*?New Content Type.*?</h1>"
And I should see "validation-summary-errors"
Scenario: I can't rename a content type with an already existing name
Given I have installed Orchard
When I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| DisplayName | Dinner |
| Name | Dinner |
And I hit "Create"
And I go to "Admin/ContentTypes/"
Then I should see "Dinner"
When I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| DisplayName | Event |
| Name | Event |
And I hit "Create"
And I go to "Admin/ContentTypes/"
Then I should see "Event"
When I go to "Admin/ContentTypes/Edit/Dinner"
And I fill in
| name | value |
| DisplayName | Event |
And I hit "Save"
Then I should see "validation-summary-errors"