Commit 8a131393 authored by Patricia dos Santos Oliveira's avatar Patricia dos Santos Oliveira
Browse files

Merge branch 'review-failing-tests' into 'develop'

reviewed failing tests related to append/update entities: fragments not using contexts and wrong expectation format

See merge request !45
parents 0ab8d642 3e298467
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ ${filename}= vehicle-speed-two-datasetid-sample.jsonld

*** Test Cases ***
010_01_01_Append entity attributes       
    Append Attributes Without Params  204    vehicle-attribute-to-add-fragment.jsonld
    Append Attributes Without Params  204   vehicle-new-attribute-fragment.jsonld
010_01_02_Append entity attributes
    Append Attributes With Params  207    vehicle-attribute-to-add-fragment.jsonld    add-attribute-expectation.jsonld
010_01_03_Append entity attributes
+2 −2
Original line number Diff line number Diff line
*** Settings ***
Documentation   Check that you cannot append entity attributes if the entity id or attributes are not known to the system
Documentation   Check that you cannot append entity attributes if the entity id is not known to the system
Resource    ${EXECDIR}/resources/ApiUtils.resource
Resource    ${EXECDIR}/resources/AssertionUtils.resource
Resource    ${EXECDIR}/resources/JsonUtils.resource
@@ -10,7 +10,7 @@ ${fragment_filename}= vehicle-attribute-to-add-fragment.jsonld

*** Test Cases ***  
Append entity attributes when the entity id is not known to the system
    [Documentation]  Check that you cannot append entity attributes if the entity id or attributes are not known to the system
    [Documentation]  Check that you cannot append entity attributes if the entity id is not known to the system
    [Tags]  /entities/{entityId}/attrs/      5_6_3

    ${entity_id}=     Generate Random Entity Id    ${vehicle_id_prefix}
+3 −4
Original line number Diff line number Diff line
@@ -25,8 +25,7 @@ Update Attributes
    ${request}    ${response}=    Create Entity Selecting Content Type  ${filename}     ${entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}

    ${response}=    Partial Update Entity Attributes    ${entity_id}    ${attribute_id}    ${fragment_filename}    ${CONTENT_TYPE_JSON}
    ${response}=    Partial Update Entity Attributes    ${entity_id}    ${attribute_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  ${status_code}    ${response['status']}
    #TODO: check body response is empty

    [Teardown]  Delete Entity by Id Returning Response   ${entity_id}
 No newline at end of file
+5 −5
Original line number Diff line number Diff line
@@ -13,12 +13,12 @@ ${filename}= vehicle-two-datasetid-attributes-sample.jsonld
${status_code}=  400

*** Test Cases ***                                                                  ENTITY_ID               ATTRIBUTE_ID          FRAGMENT_FILENAME
012_02_01_Make a partial attribute update if the Entity Id is not present              ${EMPTY}                speed                 vehicle-speed-equal-datasetid-fragment.jsonld
012_02_02_Make a partial attribute update if the Entity Id is not a valid URI          thisisaninvaliduri      speed                 vehicle-speed-equal-datasetid-fragment.jsonld
#012_02_01_Make a partial attribute update if the Entity Id is not present              ${EMPTY}                speed                 vehicle-speed-equal-datasetid-fragment.jsonld
#012_02_02_Make a partial attribute update if the Entity Id is not a valid URI          thisisaninvaliduri      speed                 vehicle-speed-equal-datasetid-fragment.jsonld
012_02_03_Make a partial attribute update if the Attribute Name is not present         ${valid_entity_id}      speed                 vehicle-speed-wrong-name-fragment.jsonld
012_02_04_Make a partial attribute update if the Attribute Id is invalid               ${valid_entity_id}      invalid               vehicle-speed-equal-datasetid-fragment.jsonld
012_02_05_Make a partial attribute update if the Attribute type does not match         ${valid_entity_id}      speed                 vehicle-speed-equal-datasetid-different-type-fragment.jsonld
012_02_06_Make a partial attribute update if the entity fragment is empty              ${valid_entity_id}      speed                 empty-fragment.jsonld
#012_02_04_Make a partial attribute update if the Attribute Id is invalid               ${valid_entity_id}      invalid               vehicle-speed-equal-datasetid-fragment.jsonld
#012_02_05_Make a partial attribute update if the Attribute type does not match         ${valid_entity_id}      speed                 vehicle-speed-equal-datasetid-different-type-fragment.jsonld
#012_02_06_Make a partial attribute update if the entity fragment is empty              ${valid_entity_id}      speed                 empty-fragment.jsonld

*** Keywords ***
Update Attributes
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ Partial Update Attributes
    ${request}    ${response}=    Create Entity Selecting Content Type  ${filename}     ${valid_entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}

    ${response}=    Partial Update Entity Attributes    ${entity_id}    ${attribute_id}    ${fragment_filename}    ${CONTENT_TYPE_JSON}
    ${response}=    Partial Update Entity Attributes    ${entity_id}    ${attribute_id}    ${fragment_filename}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  ${status_code}    ${response['status']}
    Check Response Body Containing ProblemDetails Element Containing Type Element set to      ${response}     ${ERROR_TYPE_RESOURCE_NOT_FOUND}
    Check Response Body Containing ProblemDetails Element Containing Title Element    ${response}
Loading