-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: adjust test case for select f from Folder f
- Loading branch information
1 parent
3d1e132
commit 714039c
Showing
6 changed files
with
72 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
tests/robot/AQL_TESTS/FOLDER/SELECT_PATHS_IN_FOLDER/f_from_folder_f.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
*** Settings *** | ||
Documentation CHECK SELECT PATHS IN FOLDER | ||
... - Covers: https://github.com/ehrbase/conformance-testing-documentation/blob/main/FOLDER.md#select-paths-in-folder | ||
... - *Precondition:* | ||
... - 1. Create EHR; | ||
... - 2. Create Directory with folder_details.json; | ||
... - Send AQL 'SELECT f FROM FOLDER f' query and compare response body with expected file content. | ||
... - *Postcondition:* Delete EHR using ADMIN endpoint. | ||
Resource ../../../_resources/keywords/aql_keywords.robot | ||
|
||
Suite Setup Precondition | ||
Suite Teardown Admin Delete EHR For AQL | ||
|
||
|
||
*** Variables *** | ||
${q} SELECT f FROM FOLDER f | ||
|
||
|
||
*** Test Cases *** | ||
1. SELECT f FROM FOLDER f | ||
Set Test Variable ${query} ${q} | ||
Set AQL And Execute Ad Hoc Query ${query} | ||
Length Should Be ${resp_body['rows']} 2 | ||
Dictionary Should Contain Key ${resp_body['rows'][0][0]} name | ||
Dictionary Should Contain Key ${resp_body['rows'][0][0]} archetype_node_id | ||
Dictionary Should Contain Key ${resp_body['rows'][0][0]} details | ||
Dictionary Should Contain Key ${resp_body['rows'][0][0]} uid | ||
Should Be Equal As Strings ${resp_body['rows'][0][0]['_type']} FOLDER | ||
Should Be Equal As Strings ${resp_body['rows'][1][0]['_type']} FOLDER | ||
|
||
|
||
*** Keywords *** | ||
Precondition | ||
Set Library Search Order For Tests | ||
Create EHR For AQL | ||
Create Directory For AQL folder_details.json has_robot_vars=${FALSE} |
9 changes: 4 additions & 5 deletions
9
...rces/test_data_sets/aql/fields_and_results/folder/combinations/select_paths_in_folder.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
${query_nr},${path},${expected_file},${nr_of_results} | ||
1.,f,expected_select_paths_in_folder_f.json,2 | ||
2.,f/items/id/value,expected_select_paths_in_folder_items_id_value.json,3 | ||
3.,f/items,expected_select_paths_in_folder_f_items.json,3 | ||
4.,f/details,expected_select_paths_in_folder_f_details.json,2 | ||
5.,f/details[at0003]/items[at0004]/value/value,expected_select_paths_in_folder_f_details_at4_val.json,2 | ||
1.,f/items/id/value,expected_select_paths_in_folder_items_id_value.json,3 | ||
2.,f/items,expected_select_paths_in_folder_f_items.json,3 | ||
3.,f/details,expected_select_paths_in_folder_f_details.json,2 | ||
4.,f/details[at0003]/items[at0004]/value/value,expected_select_paths_in_folder_f_details_at4_val.json,2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"meta": { | ||
"_type": "RESULTSET", | ||
"_schema_version": "1.0.3", | ||
"_created": "2024-10-02T17:22:48.3197573+03:00", | ||
"_executed_aql": "SELECT e/ehr_id/value, f/uid/value, c/uid/value FROM EHR e CONTAINS FOLDER f CONTAINS COMPOSITION c WHERE (e/ehr_id/value = '2fd7ff0d-78e7-487f-b31e-e9a25a83e442' AND f/uid/value = '70939d97-8add-4419-b27c-516e64b1c744' AND c/uid/value = 'c599d95d-f258-4f95-9b99-122fc049f5f0')", | ||
"resultsize": 1 | ||
}, | ||
"q": "SELECT e/ehr_id/value, f/uid/value, c/uid/value FROM EHR e CONTAINS FOLDER f CONTAINS COMPOSITION c WHERE e/ehr_id/value = '2fd7ff0d-78e7-487f-b31e-e9a25a83e442' AND f/uid/value = '70939d97-8add-4419-b27c-516e64b1c744' AND c/uid/value = 'c599d95d-f258-4f95-9b99-122fc049f5f0'", | ||
"columns": [ | ||
{ | ||
"path": "e/ehr_id/value", | ||
"name": "#0" | ||
}, | ||
{ | ||
"path": "f/uid/value", | ||
"name": "#1" | ||
}, | ||
{ | ||
"path": "c/uid/value", | ||
"name": "#2" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
"${ehr_id2}", | ||
"70939d97-8add-4419-b27c-516e64b1c744", | ||
"${c_uid4b}::local.ehrbase.org::1" | ||
] | ||
] | ||
} |
166 changes: 0 additions & 166 deletions
166
...urces/test_data_sets/aql/fields_and_results/folder/expected_select_paths_in_folder_f.json
This file was deleted.
Oops, something went wrong.