Commit 54213747 authored by thomas Bousselin's avatar thomas Bousselin Committed by Eliott Paillard
Browse files

feat: Tags keywords interaction

parent dc4f9e50
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}
@@ -203,6 +206,7 @@ Retrieve Entity
    RETURN    ${response}

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

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

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

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

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

    &{headers}=    Create Dictionary
@@ -266,6 +272,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}
    &{params}=    Create Dictionary
    IF    '${local}'!=''    Set To Dictionary    ${params}    local=${local}
@@ -167,6 +176,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}
@@ -185,6 +195,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}
@@ -207,6 +218,7 @@ Create Entity Selecting Content Type
    RETURN    ${response}

Create Entity From File
    [Tags]    actor_context-producer
    [Arguments]    ${filename}
    ${file_content}=    Get File    ${EXECDIR}/data/entities/${filename}
    &{headers}=    Create Dictionary    Content-Type=application/ld+json
@@ -219,6 +231,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
@@ -230,6 +243,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}'
@@ -254,6 +268,7 @@ Delete Entity Attributes
    RETURN    ${response}

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

Partial Update Entity Attributes
    [Tags]    actor_context-producer
    [Arguments]
    ...    ${entityId}
    ...    ${attributeId}
@@ -295,6 +311,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}
@@ -307,6 +324,7 @@ Update Entity Attributes
    RETURN    ${response}

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

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

Merge Entity
    [Tags]    actor_context-producer
    [Arguments]
    ...    ${entity_id}
    ...    ${entity_filename}
@@ -375,6 +395,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
@@ -73,6 +73,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
@@ -85,6 +86,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}
    &{headers}=    Create Dictionary    Content-Type=${content_type}
    IF    '${accept}'!=''
@@ -105,6 +107,7 @@ Create Context Source Registration With Return
    RETURN    ${response}

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

    ${response}=    DELETE    url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${context_source_registration_id}
@@ -112,6 +115,7 @@ Delete Context Source Registration
    RETURN    ${response}

Delete Context Source Registration With Return
    [Tags]    actor_context-producer
    [Arguments]    ${registration_id}
    ${response}=    DELETE
    ...    url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${registration_id}
@@ -120,6 +124,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
@@ -130,6 +135,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}
@@ -146,6 +152,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