· 9 years ago · Oct 28, 2016, 03:54 PM
1Feature: IN ORDER TO modify Form Body
2 AS A System Administrator
3 I WANT to be able to update form with sections, grids, cells, etc.
4
5
6 @updateFormBody1
7 # FORM - 689
8 Scenario: Happy Path: 1 Section x 1 Grid
9 Given I am authenticated
10 And form "Behat HP" exists and associated with ClientId "1" and AppId "1"
11 And I save CreatedId to DB at row name "FormId"
12 And I send a json:
13 """
14 {
15 "Sections": [
16 {
17 "Title": "Create Section Title",
18 "HelpDescription": "Create Section Description",
19 "PageBreakBefore": true,
20 "XPosition": 0,
21 "YPosition": 1,
22 "Grids": [
23 {"Rows": 1,
24 "Columns": 1,
25 "Cells": [
26 {"RowSpan": 1,
27 "AttributeId": 20,
28 "XPosition": 1,
29 "YPosition": 1,
30 "IsReadOnly": true,
31 "IsRequired": true,
32 "IsVisible": true,
33 "IsEnabled": true
34 }
35 ],
36 "XPosition": 0,
37 "YPosition": 1,
38 "IsReadOnly": true,
39 "IsRequired": true,
40 "IsVisible": true,
41 "IsEnabled": true
42 }
43 ],
44 "XPosition": 0,
45 "YPosition": 1,
46 "IsReadOnly": true,
47 "IsRequired": true,
48 "IsVisible": true,
49 "IsEnabled": true
50 }
51 ]
52}
53 """
54 # Update FormBody
55 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
56 And I should see a status response code "200"
57 And I send a "GET" to "/form/_CreatedId_/body" replacing variable with CreatedId
58 And I should see a status response code "200"
59 # Section Properties:
60 And the "Title" property inside of section equals "Create Section Title"
61 And the "HelpDescription" property inside of section equals "Create Section Description"
62 And the "XPosition" property inside of section equals "0"
63 And the "YPosition" property inside of section equals "1"
64 And the "IsReadOnly" property inside of section equals "true"
65 And the "IsRequired" property inside of section equals "true"
66 And the "IsVisible" property inside of section equals "true"
67 And the "IsEnabled" property inside of section equals "true"
68 #Grid Properties:
69 Then the "Rows" form property inside of "Grids" equals "1"
70 Then the "Columns" form property inside of "Grids" equals "1"
71 Then the "XPosition" form property inside of "Grids" equals "0"
72 Then the "YPosition" form property inside of "Grids" equals "1"
73 Then the "IsReadOnly" form property inside of "Grids" equals "true"
74 Then the "IsRequired" form property inside of "Grids" equals "true"
75 Then the "IsVisible" form property inside of "Grids" equals "true"
76 Then the "IsEnabled" form property inside of "Grids" equals "true"
77 #Cell Properties:
78 Then the "AttributeId" form property inside of "Grids" and "Cells" equals "20"
79 Then the "AttributeTitle" form property inside of "Grids" and "Cells" equals "Address"
80 Then the "AttributeHintText" form property inside of "Grids" and "Cells" equals "Please enter full address of the client"
81 Then the "AttributeFieldTypeId" form property inside of "Grids" and "Cells" equals "14"
82 Then the "AttributeDefaultValue" form property inside of "Grids" and "Cells" equals "1"
83 Then the "RowSpan" form property inside of "Grids" and "Cells" equals "1"
84 Then the "XPosition" form property inside of "Grids" and "Cells" equals "1"
85 Then the "YPosition" form property inside of "Grids" and "Cells" equals "1"
86 Then the "IsReadOnly" form property inside of "Grids" and "Cells" equals "true"
87 Then the "IsRequired" form property inside of "Grids" and "Cells" equals "true"
88 Then the "IsVisible" form property inside of "Grids" and "Cells" equals "true"
89 Then the "IsEnabled" form property inside of "Grids" and "Cells" equals "true"
90
91
92
93
94
95 @updateFormBody2
96# FORM - 689
97 Scenario: Happy Path: 2 Section x 2 Grids
98 Given I am authenticated
99 And form "Behat HP" exists and associated with ClientId "1" and AppId "1"
100 And I save CreatedId to DB at row name "FormId"
101 And I send a json:
102 """
103 {
104 "Sections": [
105 {
106 "Title": "Section 1",
107 "HelpDescription": "HD N 1",
108 "PageBreakBefore": true,
109 "XPosition": 0,
110 "YPosition": 1,
111 "Grids": [
112 {"Rows": 1,
113 "Columns": 1,
114 "Cells": [
115 {"RowSpan": 1,
116 "AttributeId": 21,
117 "XPosition": 1,
118 "YPosition": 1,
119 "IsReadOnly": true,
120 "IsRequired": true,
121 "IsVisible": true,
122 "IsEnabled": true
123 }
124 ],
125 "XPosition": 0,
126 "YPosition": 1,
127 "IsReadOnly": true,
128 "IsRequired": true,
129 "IsVisible": true,
130 "IsEnabled": true
131 }
132 ],
133 "XPosition": 0,
134 "YPosition": 1,
135 "IsReadOnly": true,
136 "IsRequired": true,
137 "IsVisible": true,
138 "IsEnabled": true
139 },
140 {
141 "Title": "Section 2",
142 "HelpDescription": "HD N 2",
143 "PageBreakBefore": true,
144 "XPosition": 0,
145 "YPosition": 2,
146 "Grids": [
147 {"Rows": 1,
148 "Columns": 1,
149 "Cells": [
150 {"RowSpan": 1,
151 "AttributeId": 22,
152 "XPosition": 1,
153 "YPosition": 1,
154 "IsReadOnly": true,
155 "IsRequired": true,
156 "IsVisible": true,
157 "IsEnabled": true
158 }
159 ],
160 "XPosition": 0,
161 "YPosition": 1,
162 "IsReadOnly": true,
163 "IsRequired": true,
164 "IsVisible": true,
165 "IsEnabled": true
166 },
167 {"Rows": 1,
168 "Columns": 2,
169 "Cells": [
170 {"RowSpan": 1,
171 "AttributeId": 23,
172 "XPosition": 1,
173 "YPosition": 1,
174 "IsReadOnly": true,
175 "IsRequired": true,
176 "IsVisible": true,
177 "IsEnabled": true
178 },
179 { "RowSpan": 1,
180 "AttributeId": 25,
181 "XPosition": 2,
182 "YPosition": 1,
183 "IsReadOnly": true,
184 "IsRequired": true,
185 "IsVisible": true,
186 "IsEnabled": true
187 }
188
189 ],
190 "XPosition": 0,
191 "YPosition": 2,
192 "IsReadOnly": true,
193 "IsRequired": true,
194 "IsVisible": true,
195 "IsEnabled": true
196 }
197
198 ],
199 "XPosition": 0,
200 "YPosition": 2,
201 "IsReadOnly": true,
202 "IsRequired": true,
203 "IsVisible": true,
204 "IsEnabled": true,
205 "FormRules": [ {
206 "FormRuleTypeId": 3,
207 "FormTargetId": 1,
208 "Title": " FormRules FORM-689",
209 "Description": "Form-689 Behat Rules"
210 }
211 ]
212 }
213 ]
214}
215 """
216# Update FormBody
217 And I send a "PUT" to "/form/_CreatedId_/body/" replacing _CreatedId_ with rowName "FormId" type "integer"
218 And I should see a status response code "200"
219# And I send a "GET" to "/form/_CreatedId_/body" replacing variable with CreatedId
220 And I send a "GET" to "/form/_CreatedId_/body/" replacing _CreatedId_ with rowName "FormId" type "integer"
221 And I should see a status response code "200"
222
223
224 # Section Properties:
225 And the "Title" property inside of section equals "Section 1"
226 And the "Title" property inside of section equals "Section 2"
227 And the "HelpDescription" property inside of section equals "HD N 1"
228 And the "HelpDescription" property inside of section equals "HD N 2"
229 And the "YPosition" property inside of section equals "1"
230 And the "YPosition" property inside of section equals "2"
231 # Grid Properties:
232 And the "Rows" form property inside of "Grids" equals "1"
233 And the "Columns" form property inside of "Grids" equals "1"
234 And the "XPosition" form property inside of "Grids" equals "0"
235 And the "YPosition" form property inside of "Grids" equals "1"
236 And the "YPosition" form property inside of "Grids" equals "2"
237 And the "IsReadOnly" form property inside of "Grids" equals "true"
238 And the "IsRequired" form property inside of "Grids" equals "true"
239 And the "IsVisible" form property inside of "Grids" equals "true"
240 And the "IsEnabled" form property inside of "Grids" equals "true"
241 # Cell Properties:
242 Then the "AttributeId" form property inside of "Grids" and "Cells" equals "21"
243 Then the "AttributeId" form property inside of "Grids" and "Cells" equals "22"
244 Then the "AttributeId" form property inside of "Grids" and "Cells" equals "23"
245 Then the "AttributeTitle" form property inside of "Grids" and "Cells" equals "First Name"
246 Then the "AttributeTitle" form property inside of "Grids" and "Cells" equals "Middle Name"
247 Then the "AttributeTitle" form property inside of "Grids" and "Cells" equals "Last Surname"
248 Then the "AttributeHintText" form property inside of "Grids" and "Cells" equals "Please enter the legal first name or given name of the person"
249 Then the "AttributeHintText" form property inside of "Grids" and "Cells" equals "Please enter the legal middle name of the person, if avaiable"
250 Then the "AttributeHintText" form property inside of "Grids" and "Cells" equals "Please enter the legal last name or surname of the person"
251 Then the "AttributeHelpDescription" form property inside of "Grids" and "Cells" equals "A name given to an individual at birth, baptism, or during another naming ceremony, or through legal change."
252 Then the "AttributeHelpDescription" form property inside of "Grids" and "Cells" equals "A secondary name given to an individual at birth, baptism, or during another naming ceremony."
253 Then the "AttributeHelpDescription" form property inside of "Grids" and "Cells" equals "The name borne in common by members of a family."
254 Then the "AttributeFieldTypeId" form property inside of "Grids" and "Cells" equals "1"
255 Then the "AttributeDefaultValue" form property inside of "Grids" and "Cells" equals "DefaultFirstName"
256 Then the "AttributeDefaultValue" form property inside of "Grids" and "Cells" equals ""
257 Then the "AttributeDefaultValue" form property inside of "Grids" and "Cells" equals "DefaultLastName"
258
259 Then the "RowSpan" form property inside of "Grids" and "Cells" equals "1"
260 Then the "XPosition" form property inside of "Grids" and "Cells" equals "1"
261 Then the "YPosition" form property inside of "Grids" and "Cells" equals "1"
262 Then the "XPosition" form property inside of "Grids" and "Cells" equals "2"
263 Then the "YPosition" form property inside of "Grids" and "Cells" equals "1"
264 Then the "IsReadOnly" form property inside of "Grids" and "Cells" equals "true"
265 Then the "IsRequired" form property inside of "Grids" and "Cells" equals "true"
266 Then the "IsVisible" form property inside of "Grids" and "Cells" equals "true"
267 Then the "IsEnabled" form property inside of "Grids" and "Cells" equals "true"
268 # Attribute Field Parameters:
269 And in the response I should see "Minimum Value"
270 And in the response I should see "Maximum Value"
271 And in the response I should see "Pattern"
272 And in the response I should see "Password"
273 And in the response I should see "Minimum Date"
274 And in the response I should see "Maximum Date"
275
276
277
278 @updateFormBody3
279 # FORM - 689
280 Scenario: Happy Path: Rules Validation
281 Given I am authenticated
282 And form "Behat HP" exists and associated with ClientId "1" and AppId "1"
283 And I save CreatedId to DB at row name "FormId"
284 And I send a json:
285 """
286 {
287 "Sections": [
288 {
289 "Title": "Section 1",
290 "HelpDescription": "Update Form Body test",
291 "PageBreakBefore": true,
292 "Grids": [
293 {
294 "Rows": 1,
295 "Columns": 1,
296 "Cells": [
297 {
298 "RowSpan": 1,
299 "AttributeId": 20,
300 "XPosition": 1,
301 "YPosition": 1,
302 "IsReadOnly": true,
303 "IsRequired": true,
304 "IsVisible": true,
305 "IsEnabled": true,
306 "FormRules": [
307 {
308 "FormRuleTypeId": 1,
309 "FormTargetId": 2,
310 "Title": "Cell N 1",
311 "Description": "cell rule N1" }
312 ]
313 }
314
315 ],
316 "XPosition": 0,
317 "YPosition": 1,
318 "IsReadOnly": true,
319 "IsRequired": true,
320 "IsVisible": true,
321 "IsEnabled": true,
322 "FormRules": [
323 {
324 "FormRuleTypeId": 1,
325 "FormTargetId": 2,
326 "Title": "Grid N 1",
327 "Description": "Grid rule N1" }
328 ]
329 }
330 ],
331 "XPosition": 0,
332 "YPosition": 1,
333 "IsReadOnly": true,
334 "IsRequired": true,
335 "IsVisible": true,
336 "IsEnabled": true,
337 "FormRules": [
338 {
339 "FormRuleTypeId": 1,
340 "FormTargetId": 2,
341 "Title": "Section N 1",
342 "Description": "Section rule N1"
343 }
344 ]
345 }
346 ]
347}
348 """
349 # Update FormBody
350 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
351 And I should see a status response code "200"
352 And I send a "GET" to "/form/_CreatedId_/body" replacing variable with CreatedId
353 And I should see a status response code "200"
354# Section Rules:
355 And the "FormRuleTypeId" form property inside of "FormRules" equals "1"
356
357
358 #remove later:
359 # Then the "FormRuleTypeId" form property inside of "FormRules", "" and "" equals "1"
360
361 And the "FormTargetId" form property inside of "FormRules" equals "2"
362 And the "Title" form property inside of "FormRules" equals "Section N 1"
363 And the "Description" form property inside of "FormRules" equals "Section rule N1"
364
365 Then the "MatchValue" form property inside of "FormRules" and "Matches" equals "DefaultFirstName"
366 Then the "AnyOfCounter" form property inside of "FormRules" and "Matches" equals "0"
367 Then the "AttributeId" form property inside of "FormRules" and "Matches" equals "21"
368 Then the "ConditionTypeId" form property inside of "FormRules" and "Matches" equals "1"
369 Then the "ComparisonId" form property inside of "FormRules" and "Matches" equals "1"
370
371 Then the "Value" form property inside of "FormRules", "Matches" and "MatchBags" equals "DefaultFirstName"
372
373 # Grid Rules:
374 Then the "FormRuleTypeId" form property inside of "Grids" and "FormRules" equals "1"
375 Then the "FormTargetId" form property inside of "Grids" and "FormRules" equals "2"
376 Then the "Title" form property inside of "Grids" and "FormRules" equals "Grid N 1"
377 Then the "Description" form property inside of "Grids" and "FormRules" equals "Grid rule N1"
378
379 Then the "MatchValue" form property inside of "Grids", "FormRules" and "Matches" equals "DefaultFirstName"
380 Then the "AnyOfCounter" form property inside of "Grids", "FormRules" and "Matches" equals "0"
381 Then the "AttributeId" form property inside of "Grids", "FormRules" and "Matches" equals "21"
382 Then the "MatchValue" form property inside of "Grids", "FormRules" and "Matches" equals "DefaultFirstName"
383 Then the "ConditionTypeId" form property inside of "Grids", "FormRules" and "Matches" equals "1"
384 Then the "ComparisonId" form property inside of "Grids", "FormRules" and "Matches" equals "1"
385
386 Then the "Value" form property inside of "Grids", "FormRules", "Matches" and "MatchBags" equals "DefaultFirstName"
387
388
389 # Cell Rules:
390 Then the "FormRuleTypeId" form property inside of "Grids", "Cells" and "FormRules" equals "1"
391 Then the "FormTargetId" form property inside of "Grids", "Cells" and "FormRules" equals "2"
392 Then the "Title" form property inside of "Grids", "Cells" and "FormRules" equals "Cell N 1"
393 Then the "Description" form property inside of "Grids", "Cells" and "FormRules" equals "cell rule N1"
394
395 Then the "MatchValue" form property inside of "Grids", "Cells", "FormRules" and "Matches" equals "DefaultFirstName"
396 Then the "AnyOfCounter" form property inside of "Grids", "Cells", "FormRules" and "Matches" equals "0"
397 Then the "AttributeId" form property inside of "Grids", "Cells", "FormRules" and "Matches" equals "21"
398 Then the "ConditionTypeId" form property inside of "Grids", "Cells", "FormRules" and "Matches" equals "1"
399 Then the "ComparisonId" form property inside of "Grids", "Cells", "FormRules" and "Matches" equals "1"
400
401
402
403
404
405#---------------------------- Negative Scenarios --------------------------------------------------
406
407
408
409 @updateFormBody4
410# FORM-723
411 Scenario: User should not be able to update Form Body if Form was Published
412 Given I am authenticated
413 And form "PublishedForm" exists and associated with ClientId "1" and AppId "1"
414 And I save CreatedId to DB at row name "FormId"
415 And I send a json:
416 """
417 {
418 "PublishedOn": "2016-06-15T20:59:38.378Z"
419 }
420 """
421# When I update form publishedOn or deactivatedOn
422 And I send a "PUT" to "/form/_CreatedId_/publish" replacing _CreatedId_ with rowName "FormId" type "integer"
423 And I should see a status response code "200"
424 And I send a form json:
425 """
426 {
427 "Sections": [
428 { "Title": "El",
429 "HelpDescription": "elena test 616",
430 "PageBreakBefore": true,
431 "XPosition": 0,
432 "YPosition": 1,
433 "Grids": [
434 { "Rows": 1,
435 "Columns": 1,
436 "Cells": [
437 { "RowSpan": 1,
438 "AttributeId": 20,
439 "XPosition": 1,
440 "YPosition": 1,
441 "IsReadOnly": true,
442 "IsRequired": true,
443 "IsVisible": true,
444 "IsEnabled": true
445 }
446 ],
447 "XPosition": 0,
448 "YPosition": 21,
449 "IsReadOnly": true,
450 "IsRequired": true,
451 "IsVisible": true,
452 "IsEnabled": true
453 }
454 ],
455 "XPosition": 0,
456 "YPosition": 1,
457 "IsReadOnly": true,
458 "IsRequired": true,
459 "IsVisible": true,
460 "IsEnabled": true
461 }
462 ]
463}
464 """
465 And I update FormBody
466 And I should see a status response code "403"
467 And in the response I should see "Form has a published date"
468 And in the response I should see "PublishedOn"
469
470
471 @updateFormBody5
472 # FORM - 689
473 Scenario: Negative Scenario: Section: X position must be 0
474 Given I am authenticated
475 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
476 And I save CreatedId to DB at row name "FormId"
477 And I send a json:
478 """
479 {
480 "Sections": [
481 {
482 "Title": "Create Section Title",
483 "HelpDescription": "Create Section Description",
484 "PageBreakBefore": true,
485 "XPosition": 1,
486 "YPosition": 1,
487 "Grids": [],
488 "XPosition": 2,
489 "YPosition": 1,
490 "IsReadOnly": true,
491 "IsRequired": true,
492 "IsVisible": true,
493 "IsEnabled": true
494 }
495 ]
496}
497 """
498 # Update FormBody
499 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
500 And I should see a status response code "400"
501 And in the response I should see "The XPosition of each section must be 0."
502
503 @updateFormBody6
504# FORM - 689
505 Scenario: Negative Scenario: Section: Y position must be > 0
506 Given I am authenticated
507 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
508 And I save CreatedId to DB at row name "FormId"
509 And I send a json:
510 """
511 {
512 "Sections": [
513 {
514 "Title": "Create Section Title",
515 "HelpDescription": "Create Section Description",
516 "PageBreakBefore": true,
517 "XPosition": 1,
518 "YPosition": 1,
519 "Grids": [],
520 "XPosition": 0,
521 "YPosition": 0,
522 "IsReadOnly": true,
523 "IsRequired": true,
524 "IsVisible": true,
525 "IsEnabled": true
526 }
527 ]
528}
529 """
530# Update FormBody
531 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
532 And I should see a status response code "400"
533 And in the response I should see "The YPosition of each section must be > 0."
534
535
536 @updateFormBody7
537# FORM - 689
538 Scenario: Negative Scenario: Y position must be unique for each section
539 Given I am authenticated
540 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
541 And I save CreatedId to DB at row name "FormId"
542 And I send a json:
543 """
544 {
545 "Sections": [
546 {
547 "Title": "Section 1",
548 "HelpDescription": "HD N 1",
549 "PageBreakBefore": true,
550 "XPosition": 0,
551 "YPosition": 1,
552 "Grids": [],
553
554 "XPosition": 0,
555 "YPosition": 1,
556 "IsReadOnly": true,
557 "IsRequired": true,
558 "IsVisible": true,
559 "IsEnabled": true
560 },
561 {
562 "Title": "Section 2",
563 "HelpDescription": "HD N 2",
564 "PageBreakBefore": true,
565 "XPosition": 0,
566 "YPosition": 2,
567 "Grids": [],
568
569 "XPosition": 0,
570 "YPosition": 1,
571 "IsReadOnly": true,
572 "IsRequired": true,
573 "IsVisible": true,
574 "IsEnabled": true,
575 "FormRules": []
576 }
577 ]
578}
579 """
580# Update FormBody
581 And I send a "PUT" to "/form/_CreatedId_/body/" replacing _CreatedId_ with rowName "FormId" type "integer"
582 And I should see a status response code "400"
583 And in the response I should not see "The Yposition of each sectiion must be unique"
584
585
586
587
588
589 @updateFormBody8
590 # FORM - 689
591 Scenario: Negative Scenario - Grid: X position must be 0
592 Given I am authenticated
593 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
594 And I save CreatedId to DB at row name "FormId"
595 And I send a json:
596 """
597 {
598 "Sections": [
599 {
600 "Title": "Create Section Title",
601 "HelpDescription": "Create Section Description",
602 "PageBreakBefore": true,
603 "XPosition": 1,
604 "YPosition": 1,
605 "Grids": [
606 { "Rows": 1,
607 "Columns": 1,
608 "Cells": [
609 { "RowSpan": 1,
610 "AttributeId": 20,
611 "XPosition": 1,
612 "YPosition": 1,
613 "IsReadOnly": true,
614 "IsRequired": true,
615 "IsVisible": true,
616 "IsEnabled": true
617 }
618 ],
619 "XPosition": 1,
620 "YPosition": 1,
621 "IsReadOnly": true,
622 "IsRequired": true,
623 "IsVisible": true,
624 "IsEnabled": true
625 }
626 ],
627 "XPosition": 0,
628 "YPosition": 1,
629 "IsReadOnly": true,
630 "IsRequired": true,
631 "IsVisible": true,
632 "IsEnabled": true
633 }
634 ]
635}
636 """
637 # Update FormBody
638 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
639 And I should see a status response code "400"
640 And in the response I should see "The XPosition of each grid must be 0."
641
642
643 @updateFormBody9
644# FORM - 689
645 Scenario: Negative Scenario - Grid: Y position must be > 0
646 Given I am authenticated
647 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
648 And I save CreatedId to DB at row name "FormId"
649 And I send a json:
650 """
651 {
652 "Sections": [
653 {
654 "Title": "Create Section Title",
655 "HelpDescription": "Create Section Description",
656 "PageBreakBefore": true,
657 "XPosition": 1,
658 "YPosition": 1,
659 "Grids": [
660 { "Rows": 1,
661 "Columns": 1,
662 "Cells": [
663 { "RowSpan": 1,
664 "AttributeId": 20,
665 "XPosition": 1,
666 "YPosition": 1,
667 "IsReadOnly": true,
668 "IsRequired": true,
669 "IsVisible": true,
670 "IsEnabled": true
671 }
672 ],
673 "XPosition": 0,
674 "YPosition": 0,
675 "IsReadOnly": true,
676 "IsRequired": true,
677 "IsVisible": true,
678 "IsEnabled": true
679 }
680 ],
681 "XPosition": 0,
682 "YPosition": 1,
683 "IsReadOnly": true,
684 "IsRequired": true,
685 "IsVisible": true,
686 "IsEnabled": true
687 }
688 ]
689}
690 """
691 # Update FormBody
692 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
693 And I should see a status response code "400"
694 And in the response I should see "The YPosition of each grid must be > 0."
695
696
697 @updateFormBody10
698# FORM - 689
699 Scenario: Negative Scenario - Grid: Y position must be unique for each grid in a section
700 Given I am authenticated
701 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
702 And I save CreatedId to DB at row name "FormId"
703 And I send a json:
704 """
705 {
706 "Sections": [
707 {
708 "Title": "Create Section Title",
709 "HelpDescription": "Create Section Description",
710 "PageBreakBefore": true,
711 "XPosition": 1,
712 "YPosition": 1,
713 "Grids": [
714 { "Rows": 1,
715 "Columns": 1,
716 "Cells": [
717 { "RowSpan": 1,
718 "AttributeId": 20,
719 "XPosition": 1,
720 "YPosition": 1,
721 "IsReadOnly": true,
722 "IsRequired": true,
723 "IsVisible": true,
724 "IsEnabled": true
725 }
726 ],
727 "XPosition": 0,
728 "YPosition": 1,
729 "IsReadOnly": true,
730 "IsRequired": true,
731 "IsVisible": true,
732 "IsEnabled": true
733 },
734 { "Rows": 1,
735 "Columns": 1,
736 "Cells": [
737 { "RowSpan": 1,
738 "AttributeId": 21,
739 "XPosition": 1,
740 "YPosition": 1,
741 "IsReadOnly": true,
742 "IsRequired": true,
743 "IsVisible": true,
744 "IsEnabled": true
745 }
746 ],
747 "XPosition": 0,
748 "YPosition": 1,
749 "IsReadOnly": true,
750 "IsRequired": true,
751 "IsVisible": true,
752 "IsEnabled": true
753 }
754
755 ],
756 "XPosition": 0,
757 "YPosition": 1,
758 "IsReadOnly": true,
759 "IsRequired": true,
760 "IsVisible": true,
761 "IsEnabled": true
762 }
763 ]
764}
765 """
766# Update FormBody
767 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
768 And I should see a status response code "400"
769 And in the response I should see "The YPosition of each item in a section must be unique."
770
771
772
773 @updateFormBody11
774# FORM - 689
775 Scenario: Negative Scenario - Grid: Each X,Y position on a grid must be covered by a cell (no gaps)
776 Given I am authenticated
777 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
778 And I save CreatedId to DB at row name "FormId"
779 And I send a json:
780 """
781
782 {
783 "Sections": [
784 {
785 "Title": "Create Section Title",
786 "HelpDescription": "Create Section Description",
787 "PageBreakBefore": true,
788 "XPosition": 1,
789 "YPosition": 1,
790 "Grids": [
791 { "Rows": 3,
792 "Columns": 1,
793 "Cells": [
794 { "RowSpan": 1,
795 "AttributeId": 20,
796 "XPosition": 1,
797 "YPosition": 1,
798 "IsReadOnly": true,
799 "IsRequired": true,
800 "IsVisible": true,
801 "IsEnabled": true
802 }, {
803 "RowSpan": 1,
804 "AttributeId": 21,
805 "XPosition": 1,
806 "YPosition": 2,
807 "IsReadOnly": true,
808 "IsRequired": true,
809 "IsVisible": true,
810 "IsEnabled": true
811 }
812 ],
813 "XPosition": 0,
814 "YPosition": 1,
815 "IsReadOnly": true,
816 "IsRequired": true,
817 "IsVisible": true,
818 "IsEnabled": true
819 }
820 ],
821 "XPosition": 0,
822 "YPosition": 1,
823 "IsReadOnly": true,
824 "IsRequired": true,
825 "IsVisible": true,
826 "IsEnabled": true
827 }
828 ]
829}
830 """
831# Update FormBody
832 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
833 And I should see a status response code "400"
834 And in the response I should see "No cell objects are covering position 1,3 in a grid."
835
836
837
838
839 @updateFormBody12
840 # FORM - 689
841 Scenario: Negative Scenario - Grid: No X,Y position on a grid can be covered by more than 1 cell (no overlap)
842 Given I am authenticated
843 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
844 And I save CreatedId to DB at row name "FormId"
845 And I send a json:
846 """
847
848 {
849 "Sections": [
850 {
851 "Title": "Create Section Title",
852 "HelpDescription": "Create Section Description",
853 "PageBreakBefore": true,
854 "XPosition": 1,
855 "YPosition": 1,
856 "Grids": [
857 { "Rows": 1,
858 "Columns": 1,
859 "Cells": [
860 { "RowSpan": 1,
861 "AttributeId": 20,
862 "XPosition": 1,
863 "YPosition": 1,
864 "IsReadOnly": true,
865 "IsRequired": true,
866 "IsVisible": true,
867 "IsEnabled": true
868 }, {
869 "RowSpan": 1,
870 "AttributeId": 21,
871 "XPosition": 1,
872 "YPosition": 1,
873 "IsReadOnly": true,
874 "IsRequired": true,
875 "IsVisible": true,
876 "IsEnabled": true
877 }
878 ],
879 "XPosition": 0,
880 "YPosition": 1,
881 "IsReadOnly": true,
882 "IsRequired": true,
883 "IsVisible": true,
884 "IsEnabled": true
885 }
886 ],
887 "XPosition": 0,
888 "YPosition": 1,
889 "IsReadOnly": true,
890 "IsRequired": true,
891 "IsVisible": true,
892 "IsEnabled": true
893 }
894 ]
895}
896 """
897
898 # Update FormBody
899 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
900 And I should see a status response code "400"
901 And in the response I should see "2 cells are covering position 1,1 in a grid"
902
903
904 @updateFormBody13
905# FORM - 689
906 Scenario: Negative Scenario - Cell: X position must be > 0
907 Given I am authenticated
908 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
909 And I save CreatedId to DB at row name "FormId"
910 And I send a json:
911 """
912 {
913 "Sections": [
914 {
915 "Title": "Create Section Title",
916 "HelpDescription": "Create Section Description",
917 "PageBreakBefore": true,
918 "XPosition": 1,
919 "YPosition": 1,
920 "Grids": [
921 { "Rows": 1,
922 "Columns": 1,
923 "Cells": [
924 { "RowSpan": 1,
925 "AttributeId": 20,
926 "XPosition": 0,
927 "YPosition": 1,
928 "IsReadOnly": true,
929 "IsRequired": true,
930 "IsVisible": true,
931 "IsEnabled": true
932 },
933 { "RowSpan": 1,
934 "AttributeId": 20,
935 "XPosition": 1,
936 "YPosition": 1,
937 "IsReadOnly": true,
938 "IsRequired": true,
939 "IsVisible": true,
940 "IsEnabled": true
941 }
942 ],
943 "XPosition": 0,
944 "YPosition": 1,
945 "IsReadOnly": true,
946 "IsRequired": true,
947 "IsVisible": true,
948 "IsEnabled": true
949 }
950 ],
951 "XPosition": 0,
952 "YPosition": 1,
953 "IsReadOnly": true,
954 "IsRequired": true,
955 "IsVisible": true,
956 "IsEnabled": true
957 }
958 ]
959}
960 """
961# Update FormBody
962 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
963 And I should see a status response code "400"
964 And in the response I should see "The XPosition of each cell must be > 0"
965
966
967 @updateFormBody14
968# FORM - 689
969 Scenario: Negative Scenario - Cell: Y position must be > 0
970 Given I am authenticated
971 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
972 And I save CreatedId to DB at row name "FormId"
973 And I send a json:
974 """
975 {
976 "Sections": [
977 {
978 "Title": "Create Section Title",
979 "HelpDescription": "Create Section Description",
980 "PageBreakBefore": true,
981 "XPosition": 1,
982 "YPosition": 1,
983 "Grids": [
984 { "Rows": 1,
985 "Columns": 1,
986 "Cells": [
987 { "RowSpan": 1,
988 "AttributeId": 20,
989 "XPosition": 1,
990 "YPosition": 0,
991 "IsReadOnly": true,
992 "IsRequired": true,
993 "IsVisible": true,
994 "IsEnabled": true
995 },
996 { "RowSpan": 1,
997 "AttributeId": 20,
998 "XPosition": 1,
999 "YPosition": 1,
1000 "IsReadOnly": true,
1001 "IsRequired": true,
1002 "IsVisible": true,
1003 "IsEnabled": true
1004 }
1005 ],
1006 "XPosition": 0,
1007 "YPosition": 1,
1008 "IsReadOnly": true,
1009 "IsRequired": true,
1010 "IsVisible": true,
1011 "IsEnabled": true
1012 }
1013 ],
1014 "XPosition": 0,
1015 "YPosition": 1,
1016 "IsReadOnly": true,
1017 "IsRequired": true,
1018 "IsVisible": true,
1019 "IsEnabled": true
1020 }
1021 ]
1022}
1023 """
1024# Update FormBody
1025 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
1026 And I should see a status response code "400"
1027 And in the response I should see "The YPosition of each cell must be > 0"
1028
1029
1030 @updateFormBody15
1031# FORM - 689
1032 Scenario: Negative Scenario - Cell: Rowspan must be >= 1
1033 Given I am authenticated
1034 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
1035 And I save CreatedId to DB at row name "FormId"
1036 And I send a json:
1037 """
1038 {
1039 "Sections": [
1040 {
1041 "Title": "Create Section Title",
1042 "HelpDescription": "Create Section Description",
1043 "PageBreakBefore": true,
1044 "XPosition": 1,
1045 "YPosition": 1,
1046 "Grids": [
1047 { "Rows": 1,
1048 "Columns": 1,
1049 "Cells": [
1050 { "RowSpan": 1,
1051 "AttributeId": 20,
1052 "XPosition": 1,
1053 "YPosition": 1,
1054 "IsReadOnly": true,
1055 "IsRequired": true,
1056 "IsVisible": true,
1057 "IsEnabled": true
1058 },
1059 {
1060 "RowSpan": 0,
1061 "AttributeId": 20,
1062 "XPosition": 1,
1063 "YPosition": 1,
1064 "IsReadOnly": true,
1065 "IsRequired": true,
1066 "IsVisible": true,
1067 "IsEnabled": true
1068 }
1069 ],
1070 "XPosition": 0,
1071 "YPosition": 1,
1072 "IsReadOnly": true,
1073 "IsRequired": true,
1074 "IsVisible": true,
1075 "IsEnabled": true
1076 }
1077 ],
1078 "XPosition": 0,
1079 "YPosition": 1,
1080 "IsReadOnly": true,
1081 "IsRequired": true,
1082 "IsVisible": true,
1083 "IsEnabled": true
1084 }
1085 ]
1086}
1087 """
1088# Update FormBody
1089 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
1090 And I should see a status response code "400"
1091 And in the response I should see "The rowspan of each cell must be > 0"
1092
1093
1094
1095
1096
1097# Cell: No cell can be outside of, or extend past the bounds of the grid
1098 @updateFormBody16
1099# FORM - 689
1100 Scenario: Negative Scenario --> Cell: No cell can be outside of, or extend past the bounds of the grid
1101 Given I am authenticated
1102 And form "Behat NS" exists and associated with ClientId "1" and AppId "1"
1103 And I save CreatedId to DB at row name "FormId"
1104 And I send a json:
1105 """
1106 {
1107 "Sections": [
1108 {
1109 "Title": "Create Section Title",
1110 "HelpDescription": "Create Section Description",
1111 "PageBreakBefore": true,
1112 "XPosition": 1,
1113 "YPosition": 1,
1114 "Grids": [
1115 { "Rows": 1,
1116 "Columns": 1,
1117 "Cells": [
1118 { "RowSpan": 1,
1119 "AttributeId": 20,
1120 "XPosition": 1,
1121 "YPosition": 1,
1122 "IsReadOnly": true,
1123 "IsRequired": true,
1124 "IsVisible": true,
1125 "IsEnabled": true
1126 "FormRules": [
1127 {
1128 "FormRuleTypeId": 1,
1129 "FormTargetId": 2,
1130 "Title": "CELL FORM Id = 5",
1131 "Description": "cell"
1132
1133 }
1134 ]
1135
1136 }
1137 ],
1138 "XPosition": 0,
1139 "YPosition": 1,
1140 "IsReadOnly": true,
1141 "IsRequired": true,
1142 "IsVisible": true,
1143 "IsEnabled": true
1144 }
1145 ],
1146 "XPosition": 0,
1147 "YPosition": 1,
1148 "IsReadOnly": true,
1149 "IsRequired": true,
1150 "IsVisible": true,
1151 "IsEnabled": true
1152 }
1153 ]
1154}
1155 """
1156# Update FormBody
1157 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
1158 And I should see a status response code "400"
1159 And in the response I should see "Cell Yposition or rowspan extends beyond the bounds of the grid."
1160
1161
1162
1163
1164
1165# Cell: Any attributeId must exist, be not deleted, and be valid for the form
1166 # 4 Scenarios:
1167# - Attr does not exist;
1168# - Deleted Attribute Id;
1169# - VLT Attr Id --> Not valid for current form:
1170# a) FormAttr
1171# B) Person Attr
1172
1173 @updateFormBody17
1174 Scenario: AttributeId is DELETED
1175 Given I am authenticated
1176 And form "Deleted Attribute Id" exists and associated with ClientId "1" and AppId "1"
1177 And I save CreatedId to DB at row name "FormId"
1178 And I send a json:
1179 """
1180 {
1181 "AttributeTypeId": 1,
1182 "Title": "",
1183 "HintText": "Testing_Behat",
1184 "HelpDescription": "Testing BE Create Attributes",
1185 "FieldTypeId": 2,
1186 "DefaultValue": 1,
1187 "Encrypt": false,
1188 "Unique": false
1189 }
1190 """
1191 And I send a random "Title" prefix "BE_Behat_CreatePersonAttributeType_"
1192 When I send a "POST" to "/attribute"
1193 And I should see a status response code "200"
1194 And I save CreatedId to DB at row name "AttributeId"
1195 And I send a "DELETE" to "/attribute/_CreatedId_" replacing _CreatedId_ with rowName "AttributeId" type "integer"
1196 And I should see a status response code "204"
1197
1198 And I send a form json:
1199 """
1200 {
1201 "Sections":
1202 [
1203 { "Title": "Behat Update Form Body NS",
1204 "HelpDescription": "",
1205 "PageBreakBefore": true,
1206 "XPosition": 0,
1207 "Grids":
1208 [
1209 {
1210 "Rows": 1,
1211 "Columns": 1,
1212 "Cells": [
1213 {
1214 "RowSpan": 1,
1215 "AttributeId": "xxxxx",
1216 "XPosition": 1,
1217 "YPosition": 1,
1218 "IsReadOnly": true,
1219 "IsRequired": true,
1220 "IsVisible": true,
1221 "IsEnabled": true
1222 }
1223 ],
1224 "XPosition": 0,
1225 "YPosition": 1,
1226 "IsReadOnly": true,
1227 "IsRequired": true,
1228 "IsVisible": true,
1229 "IsEnabled": true
1230 }
1231 ],
1232 "XPosition": 0,
1233 "YPosition": 1,
1234 "IsReadOnly": true,
1235 "IsRequired": true,
1236 "IsVisible": true,
1237 "IsEnabled": true
1238 }
1239 ]
1240 }
1241 """
1242 And I send "integer" type value from DB row "AttributeId" to field "AttributeId" inside of cell
1243 # Update FormBody
1244 And I send a "PUT" to "/form/_CreatedId_/body" replacing _CreatedId_ with rowName "FormId" type "integer"
1245 And I should see a status response code "400"
1246 And in the response I should see " does not exist or is deleted"
1247
1248 @updateFormBody18
1249 Scenario: AttributeId is Invalid
1250 Given I am authenticated
1251
1252 And form "Behat Invalid Attribute Id" exists and associated with ClientId "1" and AppId "1"
1253 And I save CreatedId to DB at row name "FormId"
1254 And Aattribute "Person Behat Test attr" exists and AttributeTypeid equal "1"
1255 And I save CreatedId to DB at row name "AttributeId"
1256 And Attribute "Invalid Attr" does not exist
1257 And I save CreatedId to DB at row name "InvAttributeId"
1258 And I send a json:
1259 """
1260 {
1261 "Sections":
1262 [
1263 { "Title": "Behat Update Form Body NS",
1264 "HelpDescription": "",
1265 "PageBreakBefore": true,
1266 "XPosition": 0,
1267 "Grids":
1268 [
1269 {
1270 "Rows": 1,
1271 "Columns": 1,
1272 "Cells": [
1273 {
1274 "RowSpan": 1,
1275 "AttributeId": "1",
1276 "XPosition": 1,
1277 "YPosition": 1,
1278 "IsReadOnly": true,
1279 "IsRequired": true,
1280 "IsVisible": true,
1281 "IsEnabled": true
1282 }
1283 ],
1284 "XPosition": 0,
1285 "YPosition": 1,
1286 "IsReadOnly": true,
1287 "IsRequired": true,
1288 "IsVisible": true,
1289 "IsEnabled": true
1290 }
1291 ],
1292 "XPosition": 0,
1293 "YPosition": 1,
1294 "IsReadOnly": true,
1295 "IsRequired": true,
1296 "IsVisible": true,
1297 "IsEnabled": true
1298 }
1299 ]
1300 }
1301 """
1302
1303 # Update FormBody
1304 And I send "integer" type value from DB row "InvAttributeId" to field "AttributeId" inside of cell
1305
1306 And I send a "PUT" to "/form/_CreatedId_/body" replacing _CreatedId_ with rowName "FormId" type "integer"
1307 And I should see a status response code "400"
1308 And in the response I should see " does not exist or is deleted"
1309
1310
1311
1312# Rules: FormRuleTypeId must exist and not be deleted
1313 @updateFormBody19
1314 Scenario: RuleTypeId is Invalid
1315 Given I am authenticated
1316 And form "Behat Invalid Attribute Id" exists and associated with ClientId "1" and AppId "1"
1317 And I save CreatedId to DB at row name "FormId"
1318 And I send a json:
1319 """
1320 {
1321 "Sections":
1322 [
1323 { "Title": "Behat Update Form Body NS",
1324 "HelpDescription": "",
1325 "PageBreakBefore": true,
1326 "XPosition": 0,
1327 "Grids":
1328 [
1329 {
1330 "Rows": 1,
1331 "Columns": 1,
1332 "Cells": [
1333 {
1334 "RowSpan": 1,
1335 "AttributeId": "10000000",
1336 "XPosition": 1,
1337 "YPosition": 1,
1338 "IsReadOnly": true,
1339 "IsRequired": true,
1340 "IsVisible": true,
1341 "IsEnabled": true
1342 }
1343 ],
1344 "XPosition": 0,
1345 "YPosition": 1,
1346 "IsReadOnly": true,
1347 "IsRequired": true,
1348 "IsVisible": true,
1349 "IsEnabled": true
1350 }
1351 ],
1352 "XPosition": 0,
1353 "YPosition": 1,
1354 "IsReadOnly": true,
1355 "IsRequired": true,
1356 "IsVisible": true,
1357 "IsEnabled": true,
1358 "FormRules": [ {
1359 "FormRuleTypeId": 1000,
1360 "FormTargetId": 1,
1361 "Title": "Invalid RuleTypeId",
1362 "Description": "Form-689 Behat Rules"
1363 }
1364 ]
1365 }
1366 ]
1367 }
1368 """
1369
1370 # Update FormBody
1371 And I send a "PUT" to "/form/_CreatedId_/body" replacing _CreatedId_ with rowName "FormId" type "integer"
1372 And I should see a status response code "400"
1373 And in the response I should see "FormRuleTypeId does not exist"
1374
1375
1376
1377# Rules: FormTargetId must exist and not be deleted
1378 @updateFormBody20
1379 Scenario: FormTargetId is Invalid
1380 Given I am authenticated
1381 And form "Behat Invalid TargetId" exists and associated with ClientId "1" and AppId "1"
1382 And I save CreatedId to DB at row name "FormId"
1383 # create a Target:
1384 And I am calling "Form"
1385 And I send a json:
1386 """
1387 {
1388 "Title": "",
1389 "Description": "FORM-708 Invalid TargetId",
1390 "Matches": [
1391 {
1392 "AnyOfCounter":0 ,
1393 "ComparisonId": 1,
1394 "AttributeId": "21",
1395 "ConditionTypeId": "1",
1396 "MatchBags": [
1397 {
1398 "Value": "MatchBags: Test Value"
1399 }
1400 ]
1401 }
1402 ]
1403 }
1404 """
1405 And I send a random "Title" prefix "FORM-741 Behat BE"
1406 When I send a "POST" to "/target"
1407 And I should see a status response code "200"
1408 # save the created FormTargetId to studentTracBehat table in database.sqlite
1409 And I save CreatedId to DB at row name "FormTargetId"
1410 And I send a "DELETE" to "/target/_CreatedId_" replacing _CreatedId_ with rowName "FormTargetId" type "integer"
1411 And I send a json:
1412 """
1413 {
1414 "Sections":
1415 [
1416 {"Title": "Behat Update Form Body NS",
1417 "HelpDescription": "",
1418 "PageBreakBefore": true,
1419 "XPosition": 0,
1420 "Grids":
1421 [
1422 {
1423 "Rows": 1,
1424 "Columns": 1,
1425 "Cells":
1426 [
1427 {
1428 "RowSpan": 1,
1429 "AttributeId": "21",
1430 "XPosition": 1,
1431 "YPosition": 1,
1432 "IsReadOnly": true,
1433 "IsRequired": true,
1434 "IsVisible": true,
1435 "IsEnabled": true,
1436 "FormRules":
1437 [ {
1438 "FormRuleTypeId": 1,
1439 "FormTargetId": 1,
1440 "Title": "Invalid Target Id",
1441 "Description": "Form-689 Behat Rules"
1442 }
1443 ]
1444 }
1445 ],
1446 "XPosition": 0,
1447 "YPosition": 1,
1448 "IsReadOnly": true,
1449 "IsRequired": true,
1450 "IsVisible": true,
1451 "IsEnabled": true
1452 }
1453 ],
1454 "XPosition": 0,
1455 "YPosition": 1,
1456 "IsReadOnly": true,
1457 "IsRequired": true,
1458 "IsVisible": true,
1459 "IsEnabled": true
1460 }
1461 ]
1462 }
1463 """
1464
1465 # Update FormBody
1466 And I send "integer" type value from DB row "FormTargetId" to field "FormTargetId" at "FormRules" array inside of cell
1467 And I send a "PUT" to "/form/_CreatedId_/body" replacing _CreatedId_ with rowName "FormId" type "integer"
1468 And I should see a status response code "400"
1469 And in the response I should see "FormTargetId does not exist or is deleted"
1470
1471
1472
1473
1474 @updateFormBody21
1475 # FORM - 791
1476 Scenario: Happy Path: 1 Section x 1 Grid
1477 Given I am authenticated
1478 And form "Behat HP" exists and associated with ClientId "1" and AppId "1"
1479 And I save CreatedId to DB at row name "FormId"
1480 And I send a json:
1481 """
1482 {
1483 "Sections":
1484 [
1485 {
1486 "Title": "El",
1487 "HelpDescription": "elena test",
1488 "PageBreakBefore": true,
1489 "Grids":
1490 [
1491 {
1492 "Rows": 1,
1493 "Columns": 1,
1494 "Cells": [
1495 {
1496 "RowSpan": 1,
1497 "AttributeId": 21,
1498 "XPosition": 1,
1499 "YPosition": 1,
1500 "IsReadOnly": true,
1501 "IsRequired": true,
1502 "IsVisible": true,
1503 "IsEnabled": true,
1504 "FormRules": []
1505 }
1506 ],
1507 "XPosition": 0,
1508 "YPosition": 2,
1509 "IsReadOnly": true,
1510 "IsRequired": true,
1511 "IsVisible": true,
1512 "IsEnabled": true,
1513 "FormRules":[
1514 {
1515 "FormRuleTypeId": 1,
1516 "FormTargetId": 2,
1517 "Title": "Grid FORM Id = 5",
1518 "Description": "grid"
1519 }
1520 ]
1521
1522 }
1523 ],
1524 "SignatureWidgets":
1525 [
1526 {
1527 "XPosition": 0,
1528 "YPosition": 3,
1529 "IsReadOnly": true,
1530 "IsRequired": true,
1531 "IsVisible": true,
1532 "IsEnabled": true,
1533 "FormRules":
1534 [
1535 {
1536 "FormRuleTypeId": 1,
1537 "FormTargetId": 1,
1538 "Title": "Widget Rule Title",
1539 "Description": "Widget Rule description"
1540 }
1541 ]
1542 }
1543 ],
1544 "XPosition": 0,
1545 "YPosition": 1,
1546 "IsReadOnly": true,
1547 "IsRequired": true,
1548 "IsVisible": true,
1549 "IsEnabled": true,
1550 "FormRules": [
1551 {
1552 "FormRuleTypeId": 1,
1553 "FormTargetId": 2,
1554 "Title": "Signature Widget Rule",
1555 "Description": "Signature Rule Description"
1556 }
1557 ]
1558 }
1559 ]
1560 }
1561 """
1562 # Update FormBody
1563 And I send a "PUT" to "/form/_CreatedId_/body" replacing variable with CreatedId
1564 And I should see a status response code "200"
1565 And I send a "GET" to "/form/_CreatedId_/body" replacing variable with CreatedId
1566 And I should see a status response code "200"
1567
1568 Then the "XPosition" form property inside of "Signatures" equals "0"
1569 And the "YPosition" form property inside of "Signatures" equals "3"
1570 Then the "IsReadOnly" form property inside of "Signatures" equals "true"
1571 And the "IsRequired" form property inside of "Signatures" equals "true"
1572 Then the "IsVisible" form property inside of "Signatures" equals "true"
1573 And the "IsEnabled" form property inside of "Signatures" equals "true"
1574
1575
1576 Then the "FormRuleTypeId" form property inside of "Signatures" and "FormRules" equals "1"
1577 Then the "FormTargetId" form property inside of "Signatures" and "FormRules" equals "1"
1578 Then the "Title" form property inside of "Signatures" and "FormRules" equals "Widget Rule Title"
1579 Then the "Description" form property inside of "Signatures" and "FormRules" equals "Widget Rule description"