diff --git a/.github/workflows/build-feature.yml b/.github/workflows/build-feature.yml index f08beaf4..1e022cb2 100644 --- a/.github/workflows/build-feature.yml +++ b/.github/workflows/build-feature.yml @@ -44,5 +44,5 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-feature - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + labels: ${{ steps.meta.outputs.labels }} diff --git a/tests/robot/EHR_SERVICE_TESTS/B.1_CREATE_EHR/B.1__a)_New_EHR.robot b/tests/robot/EHR_SERVICE_TESTS/B.1_CREATE_EHR/B.1__a)_New_EHR.robot index 444b25fe..ec3dc3e8 100644 --- a/tests/robot/EHR_SERVICE_TESTS/B.1_CREATE_EHR/B.1__a)_New_EHR.robot +++ b/tests/robot/EHR_SERVICE_TESTS/B.1_CREATE_EHR/B.1__a)_New_EHR.robot @@ -67,7 +67,15 @@ Force Tags refactor 15 false true provided provided provided 16 false false provided provided provided - +Create new EHR (without body content) + [Documentation] Covers happy path with empty body content + [Tags] + prepare new request session JSON Prefer=return=representation + POST /ehr + Status Should Be 201 + Should Be Equal ${response.json()['ehr_status']['is_queryable']} ${True} + Should Be Equal ${response.json()['ehr_status']['is_modifiable']} ${True} + [Teardown] (admin) delete ehr MF-019 - Create new EHR (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_TREE @@ -87,7 +95,6 @@ MF-019 - Create new EHR (valid ehr_status with other_details) Should Be Empty ${diff} msg=DIFF DETECTED! [Teardown] (admin) delete ehr - MF-020 - Create new EHR (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_LIST [Tags] @@ -105,7 +112,6 @@ MF-020 - Create new EHR (valid ehr_status with other_details) Should Be Empty ${diff} msg=DIFF DETECTED! [Teardown] (admin) delete ehr - MF-021 - Create new EHR (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_SINGLE [Tags] @@ -115,7 +121,6 @@ MF-021 - Create new EHR (valid ehr_status with other_details) Status Should Be 201 [Teardown] (admin) delete ehr - MF-022 - Create new EHR (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_TABLE prepare new request session JSON Prefer=return=representation @@ -126,15 +131,13 @@ MF-022 - Create new EHR (valid ehr_status with other_details) #TRACE GITHUB ISSUE 162 bug [Teardown] (admin) delete ehr - - MF-051 - Create new EHR providing an ehr_id (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_TREE - [Tags] + [Tags] not-ready CDR-1517 prepare new request session JSON Prefer=return=representation ${body}= randomize subject_id in test-data-set valid/002_ehr_status_with_other_details_item_tree.json PUT /ehr/ehr_id body=${body} - Status Should Be 201 + Status Should Be 200 ${actual_ehr_status}= Set Variable ${response.json()['ehr_status']} Set Test Variable ${expected_ehr_status} ${body} @@ -145,14 +148,13 @@ MF-051 - Create new EHR providing an ehr_id (valid ehr_status with other_details Should Be Empty ${diff} msg=DIFF DETECTED! [Teardown] (admin) delete ehr - MF-052 - Create new EHR providing an ehr_id (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_LIST - [Tags] + [Tags] not-ready CDR-1517 prepare new request session JSON ${body}= randomize subject_id in test-data-set valid/003_ehr_status_with_other_details_item_list.json PUT /ehr/ehr_id body=${body} - Status Should Be 201 + Status Should Be 200 ${actual_ehr_status}= Set Variable ${response.json()['ehr_status']} Set Test Variable ${expected_ehr_status} ${body} @@ -163,30 +165,28 @@ MF-052 - Create new EHR providing an ehr_id (valid ehr_status with other_details Should Be Empty ${diff} msg=DIFF DETECTED! [Teardown] (admin) delete ehr - MF-053 - Create new EHR providing an ehr_id (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_SINGLE - [Tags] + [Tags] not-ready CDR-1517 prepare new request session JSON Prefer=return=representation ${body}= randomize subject_id in test-data-set valid/004_ehr_status_with_other_details_item_single.json PUT /ehr/ehr_id body=${body} - Status Should Be 201 + Status Should Be 200 [Teardown] (admin) delete ehr - MF-054 - Create new EHR providing an ehr_id (valid ehr_status with other_details) [Documentation] Covers happy path with "other_details" _type ITEM_TABLE + [Tags] not-ready CDR-1517 prepare new request session JSON Prefer=return=representation ${body}= randomize subject_id in test-data-set valid/005_ehr_status_with_other_details_item_table.json PUT /ehr/ehr_id body=${body} - Status Should Be 201 + Status Should Be 200 #https://github.com/ehrbase/project_management/issues/162 #TRACE GITHUB ISSUE 162 bug [Teardown] (admin) delete ehr - #/////////////////////////////////////////////// # // # CASES WITH DIFFERENT REQUEST HEADERS // @@ -196,132 +196,117 @@ MF-054 - Create new EHR providing an ehr_id (valid ehr_status with other_details 002 - POST /ehr (no accept header, content-type=xml) prepare new request session no accept header xml Prefer=${None} create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - 003 - POST /ehr (no content header) prepare new request session no content header Prefer=${None} create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - 004 - POST /ehr (no accept/content-type headers) prepare new request session no accept/content headers Prefer=${None} create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - 005 - POST /ehr (no headers) prepare new request session no headers Prefer=WLADISLAW create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - MF-001 - Create new EHR (without Prefer header) [Tags] prepare new request session JSON Prefer=${None} create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - MF-001a - Create new EHR (without Prefer and Accept header) [Tags] prepare new request session no accept header Prefer=${None} create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - MF-002 - Create new EHR (Prefer header: minimal) [Tags] [Documentation] This test should behave equqly to MF-001 prepare new request session JSON Prefer=return=minimal create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - MF-003 - Create new EHR (XML, Prefer header: minimal) [Tags] prepare new request session XML Prefer=return=minimal # create new EHR (XML) create supernew ehr - ehr_keywords.validate POST response - 204 no content + ehr_keywords.validate POST response - 201 no content Get EHR ID From Location Headers [Teardown] (admin) delete ehr - MF-005 - Create new EHR (XML, Prefer header: representation) [tags] EHR_STATUS_create_xml prepare new request session XML Prefer=return=representation create new EHR (XML) - # comment: check steps Should Contain ${response.text} #Should Contain ${response.text} EHR Status #String response body pattern=