Commit feb4f5bf authored by thomas Bousselin's avatar thomas Bousselin Committed by Benedetta Arena
Browse files

feat: Tags keywords interaction

parent 11067c87
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ ${response} ${EMPTY}

*** Keywords ***
Query Entities
    [Tags]    actor_context-consumer
    [Arguments]
    ...    ${entity_ids}=${EMPTY}
    ...    ${entity_types}=${EMPTY}
@@ -107,6 +108,7 @@ Query Entities
    RETURN    ${response}

Query Entities Via POST
    [Tags]    actor_context-consumer
    [Arguments]
    ...    ${entities}=${EMPTY}
    ...    ${content_type}=${CONTENT_TYPE_JSON}
@@ -143,6 +145,7 @@ Query Entities Via POST
    RETURN    ${response}

Retrieve Entity
    [Tags]    actor_context-consumer
    [Arguments]
    ...    ${id}
    ...    ${accept}=${EMPTY}
@@ -206,6 +209,7 @@ Retrieve Entity
    RETURN    ${response}

Retrieve Attribute
    [Tags]    actor_context-consumer
    [Arguments]    ${attribute_name}    ${context}=${EMPTY}    ${accept}=${EMPTY}

    &{headers}=    Create Dictionary
@@ -226,6 +230,7 @@ Retrieve Attribute
    RETURN    ${response}

Retrieve Attributes
    [Tags]    actor_context-consumer
    [Arguments]    ${context}=${EMPTY}    ${details}=false    ${accept}=${EMPTY}

    &{headers}=    Create Dictionary
@@ -249,6 +254,7 @@ Retrieve Attributes
    RETURN    ${response}

Retrieve Entity Type
    [Tags]    actor_context-consumer
    [Arguments]    ${type}    ${context}=${EMPTY}    ${accept}=${EMPTY}

    &{headers}=    Create Dictionary
@@ -269,6 +275,7 @@ Retrieve Entity Type
    RETURN    ${response}

Retrieve Entity Types
    [Tags]    actor_context-consumer
    [Arguments]    ${context}=${EMPTY}    ${details}=false    ${accept}=${EMPTY}

    &{headers}=    Create Dictionary
+21 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ ${response} ${EMPTY}

*** Keywords ***
Append Entity Attributes
    [Tags]    actor_context-producer
    [Arguments]    ${id}    ${fragment_filename}    ${content_type}
    &{headers}=    Create Dictionary    Content-Type=${content_type}
    ${file_content}=    Get File    ${EXECDIR}/data/entities/fragmentEntities/${fragment_filename}
@@ -52,6 +53,7 @@ Append Entity Attributes
    RETURN    ${response}

Append Entity Attributes With Parameters
    [Tags]    actor_context-producer
    [Arguments]    ${id}    ${fragment_filename}    ${content_type}    ${options}
    &{headers}=    Create Dictionary    Content-Type=${content_type}
    ${fragment_payload}=    Load JSON From File    ${EXECDIR}/data/entities/fragmentEntities/${fragment_filename}
@@ -64,6 +66,7 @@ Append Entity Attributes With Parameters
    RETURN    ${response}

Batch Create Entities
    [Tags]    actor_context-producer
    [Arguments]
    ...    @{entities_to_be_created}
    ...    ${content_type}=${CONTENT_TYPE_LD_JSON}
@@ -89,6 +92,7 @@ Batch Create Entities
    RETURN    ${response}

Batch Delete Entities
    [Tags]    actor_context-producer
    [Arguments]    ${entities_ids_to_be_deleted}    ${teardown}=False
    &{headers}=    Create Dictionary    Content-Type=application/ld+json
    ${response}=    POST
@@ -100,6 +104,7 @@ Batch Delete Entities
    RETURN    ${response}

Batch Request Entities From File
    [Tags]    actor_context-producer
    [Arguments]    ${batchOperation}    ${filename}
    ${file_content}=    Get File    ${EXECDIR}/data/entities/${filename}
    ${endpoint_url}=    Get From Dictionary    ${BATCH_OPERATION_ENDPOINT_MAPPING}    ${batchOperation}
@@ -113,6 +118,7 @@ Batch Request Entities From File
    RETURN    ${response}

Batch Update Entities
    [Tags]    actor_context-producer
    [Arguments]    @{entities_to_be_updated}    ${overwrite_option}=${EMPTY}
    @{params}=    Create List
    IF    '${overwrite_option}'!=''
@@ -129,6 +135,7 @@ Batch Update Entities
    RETURN    ${response}

Batch Merge Entities
    [Tags]    actor_context-producer
    [Arguments]    @{entities_to_be_merged}
    &{headers}=    Create Dictionary    Content-Type=application/ld+json
    ${response}=    POST
@@ -140,6 +147,7 @@ Batch Merge Entities
    RETURN    ${response}

Batch Upsert Entities
    [Tags]    actor_context-producer
    [Arguments]    @{entities_to_be_upserted}    ${update_option}=replace
    &{headers}=    Create Dictionary    Content-Type=application/ld+json
    ${response}=    POST
@@ -151,6 +159,7 @@ Batch Upsert Entities
    RETURN    ${response}

Create Entity
    [Tags]    actor_context-producer
    [Arguments]    ${filename}    ${entity_id}    ${local}=${EMPTY}    ${broker_url}=${EMPTY}
    &{params}=    Create Dictionary
    IF    '${local}'!=''    Set To Dictionary    ${params}    local=${local}
@@ -168,6 +177,7 @@ Create Entity
    RETURN    ${response}

Create Entity selecting @context
    [Tags]    actor_context-producer
    [Arguments]    ${filename}    ${context}    ${entity_id}=${EMPTY}
    ${entity_payload}=    Load JSON From File    ${EXECDIR}/data/jsonldContext/${filename}
    ${entity}=    Update Value To JSON    ${entity_payload}    $..@context    ${context}
@@ -186,6 +196,7 @@ Create Entity selecting @context
    RETURN    ${response}

Create Entity Selecting Content Type
    [Tags]    actor_context-producer
    [Arguments]    ${filename}    ${entity_id}    ${content_type}    ${context}=${EMPTY}    ${accept}=${EMPTY}
    ${entity_payload}=    Load JSON From File    ${EXECDIR}/data/entities/${filename}
    ${entity}=    Update Value To JSON    ${entity_payload}    $.id    ${entity_id}
@@ -208,6 +219,7 @@ Create Entity Selecting Content Type
    RETURN    ${response}

Create Entity From File
    [Tags]    actor_context-producer
    [Arguments]    ${filename}    ${broker_url}=${EMPTY}
    ${file_content}=    Get File    ${EXECDIR}/data/entities/${filename}
    ${final_url}=    Set Variable If    '${broker_url}' != ''    ${broker_url}    ${url}
@@ -221,6 +233,7 @@ Create Entity From File
    RETURN    ${response}

Create Entity From JSON-LD Content
    [Tags]    actor_context-producer
    [Arguments]    ${content}
    &{headers}=    Create Dictionary    Content-Type=application/ld+json
    ${response}=    POST
@@ -232,6 +245,7 @@ Create Entity From JSON-LD Content
    RETURN    ${response}

Delete Entity Attributes
    [Tags]    actor_context-producer
    [Arguments]    ${entityId}    ${attributeId}    ${datasetId}    ${deleteAll}    ${context}=${EMPTY}
    &{headers}=    Create Dictionary    Content-Type=${CONTENT_TYPE_JSON}
    IF    '${context}'!='${EMPTY}'
@@ -256,6 +270,7 @@ Delete Entity Attributes
    RETURN    ${response}

Delete Entity
    [Tags]    actor_context-producer
    [Arguments]    ${id}    ${local}=${EMPTY}    ${broker_url}=${EMPTY}
    &{params}=    Create Dictionary
    IF    '${local}'!=''    Set To Dictionary    ${params}    local=${local}
@@ -271,6 +286,7 @@ Delete Entity
    RETURN    ${response}

Partial Update Entity Attributes
    [Tags]    actor_context-producer
    [Arguments]
    ...    ${entityId}
    ...    ${attributeId}
@@ -298,6 +314,7 @@ Partial Update Entity Attributes
    RETURN    ${response}

Update Entity Attributes
    [Tags]    actor_context-producer
    [Arguments]    ${id}    ${fragment_filename}    ${content_type}
    &{headers}=    Create Dictionary    Content-Type=${content_type}
    ${file_content}=    Get File    ${EXECDIR}/data/entities/fragmentEntities/${fragment_filename}
@@ -310,6 +327,7 @@ Update Entity Attributes
    RETURN    ${response}

Replace Entity
    [Tags]    actor_context-producer
    [Arguments]
    ...    ${entity_id}
    ...    ${filename}
@@ -334,6 +352,7 @@ Replace Entity
    RETURN    ${response}

Replace Entity Selecting Content Type
    [Tags]    actor_context-producer
    [Arguments]
    ...    ${entity_id}
    ...    ${entity_fragment}
@@ -355,6 +374,7 @@ Replace Entity Selecting Content Type
    RETURN    ${response}

Merge Entity
    [Tags]    actor_context-producer
    [Arguments]
    ...    ${entity_id}
    ...    ${entity_filename}
@@ -378,6 +398,7 @@ Merge Entity
    RETURN    ${response}

Replace Attribute Selecting Content Type
    [Tags]    actor_context-producer
    [Arguments]
    ...    ${entity_id}
    ...    ${attr_id}
+8 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ ${response} ${EMPTY}

*** Keywords ***
Create Subscription
    [Tags]    actor_context-subscriber
    [Arguments]
    ...    ${subscription_id}
    ...    ${filename_path}
@@ -54,6 +55,7 @@ Create Subscription
    RETURN    ${response}

Create Subscription From File
    [Tags]    actor_context-subscriber
    [Arguments]    ${filename}
    ${file_content}=    Get File    ${EXECDIR}/data/subscriptions/${filename}
    &{headers}=    Create Dictionary    Content-Type=application/ld+json
@@ -66,6 +68,7 @@ Create Subscription From File
    RETURN    ${response}

Create Subscription From Subscription Payload
    [Tags]    actor_context-subscriber
    [Arguments]
    ...    ${subscription_payload}
    ...    ${content_type}=${CONTENT_TYPE_LD_JSON}
@@ -90,6 +93,7 @@ Create Subscription From Subscription Payload
    RETURN    ${response}

Delete Subscription
    [Tags]    actor_context-subscriber
    [Arguments]    ${subscription_id}
    ${response}=    DELETE
    ...    url=${url}/${SUBSCRIPTION_ENDPOINT_PATH}${subscription_id}
@@ -98,6 +102,7 @@ Delete Subscription
    RETURN    ${response}

Query Subscriptions
    [Tags]    actor_context-subscriber
    [Arguments]    ${context}=${EMPTY}    ${limit}=${EMPTY}    ${offset}=${EMPTY}    ${accept}=${EMPTY}

    &{headers}=    Create Dictionary
@@ -123,6 +128,7 @@ Query Subscriptions
    RETURN    ${response}

Retrieve Subscription
    [Tags]    actor_context-subscriber
    [Arguments]    ${id}    ${accept}=${EMPTY}    ${context}=${EMPTY}    ${content_type}=${CONTENT_TYPE_JSON}

    &{headers}=    Create Dictionary    Content-Type=${content_type}
@@ -144,6 +150,7 @@ Retrieve Subscription
    RETURN    ${response}

Update Subscription
    [Tags]    actor_context-subscriber
    [Arguments]
    ...    ${subscription_id}
    ...    ${fragment_filename}
@@ -170,6 +177,7 @@ Update Subscription
    RETURN    ${response}

Update Subscription With Payload
    [Tags]    actor_context-subscriber
    [Arguments]    ${subscription_id}    ${payload}    ${content_type}    ${accept}=${EMPTY}    ${context}=${EMPTY}
    &{headers}=    Create Dictionary    Content-Type=${content_type}
    IF    '${accept}'!=''
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ ${response} ${EMPTY}

*** Keywords ***
Query Context Source Registrations
    [Tags]    actor_context-consumer
    [Arguments]
    ...    ${context}=${EMPTY}
    ...    ${id}=${EMPTY}
@@ -82,6 +83,7 @@ Query Context Source Registrations
    RETURN    ${response}

Query Context Source Registrations With Return
    [Tags]    actor_context-consumer
    [Arguments]
    ...    ${context}=${EMPTY}
    ...    ${id}=${EMPTY}
@@ -143,6 +145,7 @@ Query Context Source Registrations With Return
    RETURN    ${response}

Retrieve Context Source Registration
    [Tags]    actor_context-consumer
    [Arguments]    ${context_source_registration_id}    ${context}=${EMPTY}    ${accept}=${EMPTY}

    &{headers}=    Create Dictionary
+8 −1
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ Prepare Context Source Registration From File
    RETURN    ${registration_payload}

Create Context Source Registration
    [Tags]    actor_context-producer
    [Arguments]    ${context_source_registration_payload}

    &{headers}=    Create Dictionary    Content-Type=application/ld+json
@@ -86,6 +87,7 @@ Create Context Source Registration
    RETURN    ${response}

Create Context Source Registration With Return
    [Tags]    actor_context-producer
    [Arguments]    ${payload}    ${content_type}=${CONTENT_TYPE_LD_JSON}    ${context}=${EMPTY}    ${accept}=${EMPTY}    ${broker_url}=${EMPTY}
    &{headers}=    Create Dictionary    Content-Type=${content_type}
    ${final_url}=    Set Variable If    '${broker_url}' != ''    ${broker_url}    ${url}
@@ -107,6 +109,7 @@ Create Context Source Registration With Return
    RETURN    ${response}

Delete Context Source Registration
    [Tags]    actor_context-producer
    [Arguments]    ${context_source_registration_id}    ${broker_url}=${EMPTY}
    
    ${final_url}=    Set Variable If    '${broker_url}' != ''    ${broker_url}    ${url}
@@ -115,6 +118,7 @@ Delete Context Source Registration
    RETURN    ${response}

Delete Context Source Registration With Return
    [Tags]    actor_context-producer
    [Arguments]    ${registration_id}    ${broker_url}=${EMPTY}
    ${final_url}=    Set Variable If    '${broker_url}' != ''    ${broker_url}    ${url}
    ${response}=    DELETE
@@ -124,6 +128,7 @@ Delete Context Source Registration With Return
    RETURN    ${response}

Update Context Source Registration
    [Tags]    actor_context-producer
    [Arguments]    ${context_source_registration_id}    ${update_fragment}

    ${response}=    PATCH
@@ -134,6 +139,7 @@ Update Context Source Registration
    RETURN    ${response}

Update Context Source Registration From File
    [Tags]    actor_context-producer
    [Arguments]    ${context_source_registration_id}    ${filename}    ${content_type}    ${accept}=${EMPTY}

    &{headers}=    Create Dictionary    Content-Type=${content_type}
@@ -150,6 +156,7 @@ Update Context Source Registration From File
    RETURN    ${response}

Update Context Source Registration With Return
    [Tags]    actor_context-producer
    [Arguments]    ${registration_id}    ${fragment}    ${content_type}    ${accept}=${EMPTY}
    &{headers}=    Create Dictionary    Content-Type=${content_type}
    IF    '${accept}'!=''    Set To Dictionary    ${headers}    Accept=${accept}
Loading