1026: Ability to Extend Entities - "Extra Data"

Test Case #:1026

Test Case Name: Ability to Extend Entities - "Extra Data"

System: openLMIS

Subsystem: blue

Test case designed by: Anna Czyrko

Design Date:30.11.2016

Short description

Acceptance Criteria

  • A user can be saved with extraData (the PUT /api/users endpoint can be saved with a JSON request body with an "extraData" property;)
  • A user can be searched for using extraData (the POST /api/users/search endpoint)

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       



Step

Action

Expected system response

Comment

1

                                 

I create user with extraData.

URL:http://10.222.17.187/referencedata/api/users?access_token=ebfc4ff1-1129-4f5e-98ab-ca49f6a1807b

Method: PUT

Example Body

{

"username": "Test",

"firstName": "Andrzej",

"lastName": "Szyszka",

"email": "test@wp.pl",

"verified": false,

"active": false,

"loginRestricted": false,

"extraData": {

"color": "orange",

"belongsTo": "VR"

}

}

                                                                                                           

                                                 

2

I search existing User by existing extraData.

URL: http://10.222.17.187/referencedata/api/users/search?access_token=ebfc4ff1-1129-4f5e-98ab-ca49f6a1807b

Method: POST

Example Body:

{

"extraData": {

"color": "orange",

"belongsTo": "VR"

}

}


3

 

I search existing User by not complete existing extraData.

URL: http://10.222.17.187/referencedata/api/users/search?access_token=ebfc4ff1-1129-4f5e-98ab-ca49f6a1807b

Method: POST

Body:

{

"extraData": {

"color": "orange"

}

}



4

I search existing User by non-existing extraData.

URL: http://10.222.17.187/referencedata/api/users/search?access_token=ebfc4ff1-1129-4f5e-98ab-ca49f6a1807b

Method: POST

Body:

{

"extraData": {

"color": "blue"

}

}






Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software