401: Configure Order Number for Export

401: Configure Order Number for Export

Test Case #:401

Test Case Name:Configure Order Number for Export

System: OpenLmis

Subsystem: blue

Test case designed by: Paulina Borowa

Design Date:28.10.2016

Short description: Acceptance Criteria

  • template allows an implementor to designate an order number prefix (8 alphanumeric characters)

  • template allows an implementor to select (and deselect) the program code to be used

    • if selected, the program code is generated within the order number

  • template must include the sequence code (see 2.0 and make sure sequence code is being generated the same way) when the order number is generated

  • template allows an implementor to select (and deselect) the regular/emergency suffix

    • if selected, an R or E is generated within the order number

  • when the template is exercised (via API) an order number is generated based on the user defined criteria

  • order number is generated when the warehouse manager 'coverts' the requisition to order

  • the order file contains the generated order number

                                                                                                                                                   

Pre – conditions:

Demo-data  

Generate token for administrator

                                                                                                                                                                                                                                                    

Step



Action

Expected system response

Comment

1

                                

Create orderNumberConfigurations.

Method: Post

Example Body:

{

  "id": "70543032-b131-4219-b44d-7781d29db330",

  "orderNumberPrefix": "Pref999",

  "includeOrderNumberPrefix":true

  "includeProgramCode": true,

  "includeRequisitionTypeSuffix": true

}


                                    


                                                                                                                           

                                                 

2

Check previously created orderNumperConfigurations.

Method: Get







3

Check the correct display of orderCode

Method: Get





Should be with:

includeOrderNumberPrefix

  includeProgramCode

  includeRequisitionTypeSuffix



4

Update previously created orderNumberConfigurations

Method: Post

Example Body:

{

  "id": "70543032-b131-4219-b44d-7781d29db330",

  "orderNumberPrefix": "123PRE",

  "includeOrderNumberPrefix":false

  "includeProgramCode": false,

  "includeRequisitionTypeSuffix": false

}





5

Check previously created orderNumperConfigurations

Method: Get











6

Check the correct display of orderCode

Method: Get

Should be without:

  includeOrderNumberPrefix

  includeProgramCode

  includeRequisitionTypeSuffix

7

Check validation for prefix

Method: Post

Example Body:

{

  "id": "70543032-b131-4219-b44d-7781d29db330",

  "orderNumberPrefix": "@#!@",

  "includeOrderNumberPrefix":false

  "includeProgramCode": false,

  "includeRequisitionTypeSuffix": false

}

Status: 400 Bad Request

order number prefix (8 alphanumeric characters)

OpenLMIS: the global initiative for powerful LMIS software