I am attempting to ship nested JSON by means of Cucumber knowledge desk. I’ve the next state of affairs, I’ve tried Situation Define too however it did not resolve the difficulty.
Situation: supplier edits new productWorkingDate
Given productWorkingDates is edited with following fields
| id | productId | fromDate | toDate | identify | strictHours | maxUsedTicketsQuantity | errorCode |
| bpvjPBpJ | WaNX2QOd | 2022-07-01 | 2022-12-01 | Test55 | false | 0 | 0 |
And TimeSlots is edited with following fields
| dayOfWeek | startTime | endTime | length | amount | usedQuantity | lively |
| Sunday | 14:00:00 | 15:00:00 | 02:00:00 | 0 | 0 | true |
| Monday | 14:00:00 | 15:00:00 | 02:00:00 | 0 | 0 | true |
Then confirm standing code is 200
and I’ve the next step definition
@And("^TimeSlots is edited with following fields$")
public void timeslotsIsCreatedWithFollowingFields(Checklist
Precise output is :
{
"productWorkingDate": {
"id": "bpvjPBpJ",
"productId": "WaNX2QOd",
"fromDate": "2022-07-01",
"toDate": "2022-12-01",
"identify": "Test55",
"strictHours": false,
"timeSlots": [
{
"id": "Wlqb8XOb",
"productWorkingDateId": "bpvjPBpJ",
"dayOfWeek": "Monday",
"startTime": "14:00:00",
"endTime": "15:00:00",
"duration": "02:00:00",
"quantity": 0,
"usedQuantity": 0,
"active": true,
"deletedAt": null
}
],
"deletedAt": null,
"maxUsedTicketsQuantity": 0,
"errorCode": 0
},
"maxUsedTicketsQuantity": 0,
"error": null,
"errorCode": 0
}
Anticipated output is :
{
"productWorkingDate": {
"id": "bpvjPBpJ",
"productId": "WaNX2QOd",
"fromDate": "2022-07-01",
"toDate": "2022-12-01",
"identify": "Test55",
"strictHours": false,
"timeSlots": [
{
"id": "4lrn8old",
"productWorkingDateId": "bpvjPBpJ",
"dayOfWeek": "Sunday",
"startTime": "14:00:00",
"endTime": "15:00:00",
"duration": "02:00:00",
"quantity": 0,
"usedQuantity": 0,
"active": true,
"deletedAt": null
},
{
"id": "dOnz85OV",
"productWorkingDateId": "bpvjPBpJ",
"dayOfWeek": "Monday",
"startTime": "14:00:00",
"endTime": "15:00:00",
"duration": "02:00:00",
"quantity": 0,
"usedQuantity": 0,
"active": true,
"deletedAt": null
}
],
"deletedAt": null,
"maxUsedTicketsQuantity": 0,
"errorCode": 0
},
"maxUsedTicketsQuantity": 0,
"error": null,
"errorCode": 0
}