Skip to content

Commit

Permalink
fix: get rid of deprecated ecis endpoint on CREATE_COMPO_3 and create…
Browse files Browse the repository at this point in the history
… compo with ISM transitions
  • Loading branch information
vladislavploaia committed Apr 15, 2024
1 parent 9782920 commit 01a4a5f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ Create Composition With 24 Hours Average - Invalid Value
commit composition format=FLAT
... composition=${composition_file}
Log ${response.content}
Status Should Be 400
Status Should Be 422
${errType} Set Variable ${response.json()['error']}
Should Be Equal As Strings ${errType} Bad Request
Should Be Equal As Strings ${errType} Unprocessable Entity
${errMsg} Set Variable ${response.json()['message']}
Set Test Variable ${errType}
Set Test Variable ${errMsg}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Create Composition With Invalid Current State On ISM Transition
[Tags] Negative InvalidCurrentState
commit composition format=FLAT
... composition=test-ism.vitagroup.de.v1__ism_invalid_current_state.json
check status_code of commit composition 400
check status_code of commit composition 422
Should Contain ${response.json()["message"]}
... No valid transition found for ism transition[cancel/openehr/166]
Should Contain ${response.json()["message"]}
Expand All @@ -71,7 +71,7 @@ Create Composition With ISM Wrong Current State
[Tags] Negative ISMMWrongCurrentState
commit composition format=FLAT
... composition=test-ism.vitagroup.de.v1__ism_wrong_current_state.json
check status_code of commit composition 400
check status_code of commit composition 422
Should Contain ${response.json()["message"]}
... No valid transition found for ism transition[cancel/openehr/166]
Should Contain ${response.json()["message"]}
Expand Down
12 changes: 7 additions & 5 deletions tests/robot/_resources/keywords/composition_keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ commit composition
${template} Set Variable ${externalTemplate}
Set Suite Variable ${template_id} ${template}
END
&{params} Create Dictionary format=FLAT ehrId=${ehr_id} templateId=${template_id}
Create Session ${SUT} ${ECISURL} debug=2
&{params} Create Dictionary format=FLAT templateId=${template_id}
Create Session ${SUT} ${BASEURL} debug=2
... verify=False headers=${headers} #auth=${CREDENTIALS}
ELSE IF '${format}'=='TDD'
Create Session ${SUT} ${BASEURL} debug=2
Expand All @@ -359,8 +359,9 @@ commit composition
END

IF '${format}'=='FLAT'
${resp} POST On Session ${SUT} composition params=${params}
... expected_status=anything data=${file} headers=${headers}
${resp} POST On Session ${SUT} /ehr/${ehr_id}/composition
... params=${params} expected_status=anything
... data=${file} headers=${headers}
ELSE IF '${multitenancy_token}' != '${None}'
Set To Dictionary ${headers}
... openEHR-TEMPLATE_ID=${template} Authorization=Bearer ${multitenancy_token}
Expand Down Expand Up @@ -440,7 +441,8 @@ check the successful result of commit composition
${template_id}= Set Variable ${template}
#${composer} Set Variable ${response.json()}[${template_for_path}/composer|name]
#${setting} Set variable ${response.json()}[${template_for_path}/context/setting|value]
${compositionUid}= Collections.Get From Dictionary ${response.json()} compositionUid
${locationSplitted} Split String ${Location} /
${compositionUid}= Set Variable ${locationSplitted}[-1]
Set Test Variable ${compositionUid} ${composition_uid}
ELSE IF '${format}' == 'TDD'
${xresp}= Parse Xml ${response.text}
Expand Down

0 comments on commit 01a4a5f

Please sign in to comment.