810: Configure product code attribute

Test Case #:810

Test Case Name: Configure product code attribute

System: OpenLMIS

Subsystem: requisition

Test case designed by: Paulina Borowa

Design Date:20.07.2016

Short description

Test should only include adding and editing column with new parameter (source). Other functionality can be tested only with integration tests for now (and it's okay, because we don't have UI to test it)

                                                                                                                                                   

Pre – conditions:                                                                                                                                                                                                    

 


Step 

Action

Expected system response

Comment

1

Create Program entity.

In Url: http://localhost:8080/api/programs

Method: Post

Body:

{

"code":"test"

}

   Status: 201 created,

                 Program id: "http://localhost:8080/api/programs/ebcb67d8-5b37-44c7-9cf0-adea14acd0da"

                                                 

2

Create Requisition Template entity.

In Url: http://localhost:8080/api/requisitionTemplatesMethod: Post
Body:
{

"program":"http://localhost:8080/api/programs/ebcb67d8-5b37-44c7-9cf0-adea14acd0da",

"columnsMap":{"columnKey":

{ "name":"namme", "label":"label2", "displayOrder":"2", "isDisplayed":false, "isDisplayRequired":true, "canChangeOrder":true, "source":"reference data" }

}

}

Status: 201 created, 

Requisition Template id:"52987331-0dd1-4922-bb05-b8065b1e3ada"

 

3

Change requisitionTemplateColumn label values and source values

In Url: http://localhost:8080/api/requisitionTemplatesMethod: Post

Body:

{

"id":"52987331-0dd1-4922-bb05-b8065b1e3ada",

"program":"http://localhost:8080/api/programs/ebcb67d8-5b37-44c7-9cf0-adea14acd0da",

"columnsMap":{"columnKey":

{ "name":"namme", "label":"label2", "displayOrder":"2", "isDisplayed":false, "isDisplayRequired":true, "canChangeOrder":true, "source":"reference data" }

}

}

 

 

 

OpenLMIS: the global initiative for powerful LMIS software