219: Deleting a requisition/R&R

219: Deleting a requisition/R&R

Test Case #: 219

Test Case Name: Deleting a requisition/R&R

System: OpenLMIS

Subsystem:Requisition

Test case designed by: Anna Czyrko

Design Date:02.08.2016

Short description

  • there is a mechanism to delete an unsubmitted (status equals initiated) requisition

  • the user can view a saved/unsubmitted requisition

  • the system provides an 'action confirmation message' (eg. Are you sure that you want to delete this requisition?) prior to deletion

  • if the user cancels the delete action the user is brought back to the draft requisition

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

Create Facility type

Method: Post

Body:

{

"code": "12"

}

Status: 201 Created

 

Remember id.

2

Create Geographic Level

Method: Post

Body:

{

"code": "1",

"levelNumber": "14"

}

 

Status: 201 Created

Remember id.

3

Create Geographic Zone.

Method: Post

Body:

{

"code": "1",

}

Status: 201 Created

Remember id.

4

Create Facility entity.

Method: Post

Body:

{

"code": "test",

"active": true,

"enabled": false

}

Status: 201 Created

Remember id.

5

Create Program entity.

Method: Post

Body:

{

"code": "15"

}

Status: 201 Created

Remember id.

6

Create Schedule entity.

Method: Post

Body:

{

"code":"123",

"name": "test"

}

 

Status: 201 Created

Remember id.

7

Create Period entity.

Method: Post

Body:

{

"processingSchedule":

{

"id": "5c459ef5-c3b1-4bbc-953a-aaeff67fbde9",

"code": "123",

"description": null,

"modifiedDate": "2016-07-26T09:39:54.533",

"name": "test"

},

"name":"test",

"description":"periodDescription",

"startDate":"2016-07-25",

"endDate":"2016-07-27"

}

Status: 201 Created

Remember id.

8

Create Requisition entity.

Method: Post

Body:

{

"status": "INITIATED"

}

Status: 201 Created

Remember id

9

Delete Requisition entity with any other status than INITIATED

Method: Delete

Status: 400 Bad Request

 

 

10

Delete Requisition entity with Initiated status.

Method: Delete

 

Status: 204 No content

 

11

 

 

 

12

 

 

 

13

 

 

 

14

 

 

 

15

 

 

 

16

 

 

 

 

 

Post – conditions:

                                                                                                                   

OpenLMIS: the global initiative for powerful LMIS software