Skip to content

Commit

Permalink
fix: CDR-1303 add access_token support for 'retrieve CONTRIBUTION by …
Browse files Browse the repository at this point in the history
…contribution_uid (JSON)' keyword
  • Loading branch information
vladislavploaia committed Feb 22, 2024
1 parent 33fc32d commit b2d0182
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/robot/_resources/keywords/contribution_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ commit COMTRIBUTION(S) (JSON)

retrieve CONTRIBUTION by contribution_uid (JSON)
[Documentation] DEPENDENCY ${ehr_id} & ${contribution_uid} in test scope
[Arguments] ${multitenancy_token}=${None}
Set Test Variable ${KEYWORD NAME} GET CONTRI BY CONTRI_UID
GET /ehr/ehr_id/contribution/contribution_uid JSON
GET /ehr/ehr_id/contribution/contribution_uid JSON ${multitenancy_token}


check response: is positive - contribution_uid exists
Expand Down Expand Up @@ -368,7 +369,7 @@ Create Contribution With Multitenant Token
# GET

GET /ehr/ehr_id/contribution/contribution_uid
[Arguments] ${format}
[Arguments] ${format} ${multitenancy_token}=${None}
[Documentation] DEPENDENCY ${ehr_id} & ${contribution_uid} in test scope
Run Keyword If $format=='JSON' prepare new request session
Expand All @@ -377,11 +378,15 @@ GET /ehr/ehr_id/contribution/contribution_uid
Run Keyword If $format=='XML' prepare new request session
... XML Prefer=return=representation

IF '${multitenancy_token}' != '${None}'
Set To Dictionary ${headers} Authorization=Bearer ${multitenancy_token}
END

${resp}= GET On Session ${SUT} /ehr/${ehr_id}/contribution/${contribution_uid} expected_status=anything
... headers=${headers}

Set Test Variable ${response} ${resp}
Output Debug Info: GET /ehr/ehr_id/contribution/contribution_uid
#Output Debug Info: GET /ehr/ehr_id/contribution/contribution_uid


Retrieve Contribution With Multitenant Token
Expand Down

0 comments on commit b2d0182

Please sign in to comment.