-
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.
feat: add new test based on conformance tests
- Loading branch information
1 parent
e6d4a42
commit f449e34
Showing
5 changed files
with
80 additions
and
10 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
32 changes: 32 additions & 0 deletions
32
tests/robot/AQL_TESTS/FOLDER/FROM_FOLDER/find_by_specific_item_id.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,32 @@ | ||
*** Settings *** | ||
Documentation CHECK AQL RESPONSE ON FOLDER FROM | ||
... - *Precondition:* 1. Create EHR; 2. Create Directory with folder_details.json; | ||
... - Send AQL query and compare response body with expected file content. | ||
... - *Postcondition:* Delete EHR using ADMIN endpoint. | ||
Resource ../../../_resources/keywords/aql_keywords.robot | ||
|
||
Suite Setup Precondition #enable this keyword if AQL checks are passing !!! | ||
Suite Teardown Admin Delete EHR For AQL #enable this keyword if AQL checks are passing !!! | ||
|
||
|
||
*** Test Cases *** | ||
Find All: SELECT f/uid/value, f/name/value, f/items/id/value FROM FOLDER f WHERE f/items/id/value = '7c0a9df0-564f-4f34-8e65-92586c64ef56' | ||
[Documentation] | ||
... Covers: https://github.com/ehrbase/conformance-testing-documentation/blob/main/FOLDER.md#find-by-specific-item-id---versioned_composition---hier_object_id | ||
${query} Set Variable SELECT f/uid/value, f/name/value, f/items/id/value FROM FOLDER f WHERE f/items/id/value = '7c0a9df0-564f-4f34-8e65-92586c64ef56' | ||
Set AQL And Execute Ad Hoc Query ${query} | ||
Length Should Be ${resp_body['rows']} 1 | ||
${expected_result} Set Variable ${EXPECTED_JSON_DATA_SETS}/folder/expected_find_by_item_id.json | ||
${exclude_paths} Create List root['meta'] root['q'] | ||
${diff} compare json-string with json-file | ||
... ${resp_body_actual} ${expected_result} exclude_paths=${exclude_paths} | ||
... ignore_order=${TRUE} | ||
... ignore_string_case=${TRUE} | ||
Should Be Empty ${diff} msg=DIFF DETECTED! | ||
|
||
|
||
*** Keywords *** | ||
Precondition | ||
Set Library Search Order For Tests | ||
Create EHR For AQL | ||
Create Directory For AQL folder_details.json |
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
31 changes: 31 additions & 0 deletions
31
...bot/_resources/test_data_sets/aql/fields_and_results/folder/expected_find_by_item_id.json
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-09-25T12:39:47.4116434+03:00", | ||
"_executed_aql": "SELECT f/uid/value, f/name/value, f/items/id/value FROM FOLDER f WHERE f/items/id/value = '7c0a9df0-564f-4f34-8e65-92586c64ef56'", | ||
"resultsize": 1 | ||
}, | ||
"q": "SELECT f/uid/value, f/name/value, f/items/id/value FROM FOLDER f WHERE f/items/id/value = '7c0a9df0-564f-4f34-8e65-92586c64ef56'", | ||
"columns": [ | ||
{ | ||
"path": "f/uid/value", | ||
"name": "#0" | ||
}, | ||
{ | ||
"path": "f/name/value", | ||
"name": "#1" | ||
}, | ||
{ | ||
"path": "f/items/id/value", | ||
"name": "#2" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
"d936409e-901f-4994-8d33-ed104d460151", | ||
"subfolder1", | ||
"7c0a9df0-564f-4f34-8e65-92586c64ef56" | ||
] | ||
] | ||
} |