811: Require display of the product attribute

Test Case #: 811

Test Case Name:

System: OpenLMIS

Subsystem:Requisition

Test case designed by: Anna Czyrko

Design Date:25.07.2016

Short description: Require display of the product attribute

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

Create Program entity.

URL:  http://localhost:8080/api/programs

Method: Post

Example Body:

{ "code": "2" }

                    

Status: 201 Created or 200 OK

           Remember program id. In this example:

id: "http://localhost:8080/api/programs/15b2c94e-7981-4076-86f6-18c6b71389da"

2

Create Requisition Template entity.

Url: http://localhost:8080/api/requisitionTemplates

Method: Post

Example Body:

{

"program":"http://localhost:8080/api/programs/15b2c94e-7981-4076-86f6-18c6b71389da",

"columnsMap":{"columnKey":

{ "name":"test", "label":"test1", "displayOrder":"1", "isDisplayed":true, "isDisplayRequired":false, "canChangeOrder":false } }

}

Status: 201 Created or 200 OK

  Remember requisition template id. In this example:

"http://localhost:8080/api/requisitionTemplates/df3f5fab-376a-484e-9406-7c10d969a6b3


3

Change requisitionTemplateColumn isDisplayRequired values.

Url: http://localhost:8080/api/requisitionTemplates

Method: Post

Example Body:

{

"id":"df3f5fab-376a-484e-9406-7c10d969a6b3",

"program":"http://localhost:8080/api/programs/15b2c94e-7981-4076-86f6-18c6b71389da",

"columnsMap":{"columnKey":

{ "name":"test", "label":"test1", "displayOrder":"1", "isDisplayed":true, "isDisplayRequired":true, "canChangeOrder":false }}

}

 

Status: 201 Created or 200 OK

 

4

Change requisitionTemplateColumn canChangeOrder values.

Url: http://localhost:8080/api/requisitionTemplates

Method: Post

Example Body:

{

"id":"df3f5fab-376a-484e-9406-7c10d969a6b3",

"program":"http://localhost:8080/api/programs/15b2c94e-7981-4076-86f6-18c6b71389da",

"columnsMap":{"columnKey":

{ "name":"test", "label":"test1", "displayOrder":"1", "isDisplayed":true, "isDisplayRequired":true, "canChangeOrder":true } }

}


Status: 201 Created or 200 OK

 
5

Change requisitionTemplateColumn isDisplayed values.

Url: http://localhost:8080/api/requisitionTemplates

Method: Post

Example Body:

{

"id":"df3f5fab-376a-484e-9406-7c10d969a6b3",

"program":"http://localhost:8080/api/programs/15b2c94e-7981-4076-86f6-18c6b71389da",

"columnsMap":{"columnKey":

{ "name":"test", "label":"test1", "displayOrder":"1", "isDisplayed":false, "isDisplayRequired":true, "canChangeOrder":true } }

}


Status: 201 Created or 200 OK


 

 

Post – conditions:

                                                                                                                   

OpenLMIS: the global initiative for powerful LMIS software