1158: Requisition comments should have similar JPA/Hibernate annotations as line items

1158: Requisition comments should have similar JPA/Hibernate annotations as line items

Test Case #:284



Test Case Name: Requisition comments should have similar JPA/Hibernate annotations as line items

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:14.12.2016

Short description

  • Add additional annotation properties to comments field

  • Saving/updating a requisition with comments persists the attached comments as well as the requisition

  • If comments are removed from a requisition, they should be deleted

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       





Step

Action

Expected system response

Comment

1

 Create comment for requisition.

Method: POST

Body:

  {

    "requisition": {

      "id": "d96eeb69-f6eb-4307-91a6-ded3398feac7"

    },

    "body": "example body",

    "createdDate": [

      2016,

      12,

      14,

      7,

      33,

      9,

      313000000

    ]

  }




                                                                                                                            

                                                 

2

Create another comment to requisition.

Method: POST

Body:

  {

    "requisition": {

      "id": "d96eeb69-f6eb-4307-91a6-ded3398feac7"

    },

    "body": "the second comment",

    "createdDate": [

      2016,

      12,

      14,

      7,

      33,

      9,

      313000000

    ]

  }







3

Check if requisition has created comments.

Method: GET



4

Update one of the comments mentioned above.

Method: PUT

Body:

  {

    "id": "b30fb8be-f9d0-4f7f-810a-e2c5736ca2d5",

    "requisition": {

        "id": "d96eeb69-f6eb-4307-91a6-ded3398feac7" },

    "body": "the second comment TEST",

    "createdDate": [

      2016,

      12,

      14,

      14,

      0,

      53,

      479000000

    ]

  }

the second method:

Method: POST



get the details of requisition and check if comment has been updated properly.

Method: GET

5

Check if comment is updated in requisition.

Method: GET





6

Get all comments for specified requisition.

Method: GET



7

Delete one of the comment mentioned above.

Method: DELETE





8

Check if deleted comments is not available on requisition details.

Method: GET



9

Check if the list of comments for specified requisition is updated.     

Method: GET







Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software