-
-
Notifications
You must be signed in to change notification settings - Fork 537
/
shared_add_new_todo.feature
270 lines (238 loc) · 11.5 KB
/
shared_add_new_todo.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
Feature: Add new next action from every page
In order to quickly add a new next action
As a Tracks user
I want to to be able to add one or more new next actions from every page
Background:
Given the following user record
| login | password | is_admin |
| testuser | secret | false |
And I have logged in as "testuser" with password "secret"
And I have a context called "test context"
And I have a project "test project"
@javascript
Scenario Outline: I can hide the input form for single next action on a page
When I go to the <page>
Then the single action form should be visible
When I follow "Hide form"
Then the single action form should not be visible
Scenarios:
| page |
| home page |
| tickler page |
| "test project" project |
| context page for "test context" |
| tag page for "starred" |
@javascript
Scenario Outline: I can hide the input form for multiple next actions
When I go to the <page>
Then the single action form should be visible
When I follow "Add multiple next actions"
Then the multiple action form should be visible
When I follow "Hide form"
Then the single action form should not be visible
And the multiple action form should not be visible
Scenarios:
| page |
| home page |
| tickler page |
| "test project" project |
| context page for "test context" |
| tag page for "starred" |
@javascript
Scenario Outline: I can hide the input form and then choose both input forms
When I go to the <page>
Then the single action form should be visible
When I follow "Hide form"
Then the single action form should not be visible
When I follow "Add multiple next actions"
Then the multiple action form should be visible
When I follow "Hide form"
Then the single action form should not be visible
And the multiple action form should not be visible
Scenarios:
| page |
| home page |
| tickler page |
| "test project" project |
| context page for "test context" |
| tag page for "starred" |
@javascript
Scenario Outline: I can switch forms for single next action to multiple next actions
When I go to the <page>
Then the single action form should be visible
When I follow "Add multiple next actions"
Then the single action form should not be visible
And the multiple action form should be visible
When I follow "Add a next action"
Then the single action form should be visible
And the multiple action form should not be visible
Scenarios:
| page |
| home page |
| tickler page |
| "test project" project |
| context page for "test context" |
| tag page for "starred" |
@javascript
Scenario Outline: I can add a todo from several pages
When I go to the <page>
And I submit a new action with description "a new next action"
Then I should <see> the todo "a new next action"
Scenarios:
| page | see |
| home page | see |
| tickler page | not see |
| "test project" project | see |
| context page for "test context" | see |
| tag page for "starred" | see |
@javascript
Scenario Outline: I can add multiple todos from several pages
Given I have a project "testing" with 1 todos
When I go to the <page>
And I follow "Add multiple next actions"
And I submit multiple actions with using
"""
one new next action
another new next action
"""
Then I should <see> the todo "one new next action"
And I should <see> the todo "another new next action"
And the badge should show <badge>
And the number of actions should be <count>
Scenarios:
| page | see | badge | count |
| home page | see | 3 | 3 |
| tickler page | not see | 0 | 3 |
| "testing" project | see | 3 | 3 |
| context page for "test context" | see | 2 | 3 |
| tag page for "starred" | not see | 0 | 3 |
@javascript
Scenario: Adding a todo to another project does not show the todo
Given I have a project called "another project"
When I go to the "test project" project
And I submit a new action with description "can you see me?" to project "another project" in the context "test context"
Then I should not see "can you see me?"
When I go to the "another project" project
Then I should see "can you see me?"
@javascript
Scenario: Adding a deferred todo to another project does not show the todo
# scenario for #1146
Given I have a project called "another project"
When I go to the "test project" project
And I submit a deferred new action with description "a new next action" to project "another project" in the context "test context"
Then I should not see the todo "a new next action"
And I submit a deferred new action with description "another new next action" to project "test project" in the context "test context"
Then I should see the todo "another new next action"
@javascript
Scenario Outline: Adding a todo with a new context shows the new context
When I go to the <page>
And I submit a new <todo> with description "do at new context" and the tags "starred" in the context "New"
Then a confirmation for adding a new context "New" should be asked
And the container for the context "New" should <visible>
And the badge should show <badge>
Scenarios:
| page | todo | badge | visible |
| home page | action | 1 | be visible |
| tickler page | deferred action | 1 | be visible |
| "test project" project | action | 1 | not be visible |
| context page for "test context" | action | 1 | not be visible |
| tag page for "starred" | action | 1 | be visible |
@javascript
Scenario Outline: Adding a todo to a hidden project does not show the todo
Given I have a hidden project called "hidden project"
And I have a project called "visible project"
And I have a context called "visible context"
And I have a context called "other context"
When I go to the <page>
And I submit a new action with description "hidden todo" to project "hidden project" with tags "test" in the context "visible context"
Then I should <see_hidden> "hidden todo"
When I submit a new action with description "visible todo" to project "visible project" with tags "test" in the context "visible context"
Then I should <see_visible> "visible todo"
Scenarios:
| page | see_hidden | see_visible |
| home page | not see | see |
| tickler page | not see | not see |
| "visible project" project | not see | see |
| "hidden project" project | see | not see |
| context page for "visible context" | not see | see |
| context page for "other context" | not see | not see |
| tag page for "starred" | not see | not see |
| tag page for "test" | see | see |
@javascript
Scenario: Adding a todo to a hidden context from home page does not show the todo
Given I have a context called "visible context"
And I have a hidden context called "hidden context"
When I go to the home page
And I submit a new action with description "a new todo" in the context "visible context"
Then I should see "a new todo"
When I submit a new action with description "another new todo" in the context "hidden context"
Then I should not see "another new todo"
@javascript
Scenario: Adding a todo to a context shows the todo in that context page
Given I have a context called "visible context"
And I have a hidden context called "hidden context"
When I go to the context page for "visible context"
And I submit a new action with description "a new todo" in the context "visible context"
Then I should see "a new todo"
When I go to the context page for "hidden context"
And I submit a new action with description "another new todo" in the context "hidden context"
Then I should see "another new todo"
@javascript
Scenario: Adding a todo to an empty container hides the empty message # TODO: make outline
Given I have a context called "visible context"
When I go to the tag page for "test"
Then I should see empty message for todos of tag
When I submit a new action with description "a new todo" and the tags "test" in the context "visible context"
Then I should see "a new todo"
And I should not see empty message for todos of tag
@javascript
Scenario Outline: Adding a dependency to a todo updates the successor
Given I have a <list_type> "test" with 1 todos
When I go to the "test" <list_type>
Then I should see "todo 1"
When I submit a new action with description "a new todo" with a dependency on "todo 1"
Then I should not see "a new todo" in the <list_type> container of "test"
When I expand the dependencies of "todo 1"
Then I should see "a new todo" within the dependencies of "todo 1"
And I should not see empty message for deferred todos of <list_type>
Examples:
| list_type |
| project |
| context |
@javascript
Scenario: Adding a dependency to a todo in another project
Given I have a project "testing" with 1 todos
And I have a project "another project"
When I go to the "another project" project
And I submit a new action with description "a new todo" with a dependency on "todo 1"
Then I should not see "a new todo" in the project container of "another project"
And I should not see empty message for deferred todos of project
@javascript
Scenario: I can add multiple todos in a new project and a new context
When I go to the home page
And I follow "Add multiple next actions"
And I fill the multiple actions form with "", "a next project", "@anywhere", "new tag"
And I submit the new multiple actions form with
"""
a
b
c
"""
Then a confirmation for adding a new context "@anywhere" should be asked
Then I should see "@anywhere"
And I should see "a"
And I should see "b"
And I should see "c"
@javascript
Scenario: I need to fill in at least one description and a context
When I go to the home page
And I follow "Add multiple next actions"
And I submit the new multiple actions form with "", "", "", ""
Then I should see "You need to submit at least one next action"
When I submit the new multiple actions form with "one", "", "", ""
Then I should see "Context can't be blank"
When I fill the multiple actions form with "", "a project", "test context", "tag"
And I submit the new multiple actions form with
"""
"""
Then I should see "You need to submit at least one next action"