Search in sources :

Example 46 with When

use of io.cucumber.java.en.When in project grakn by graknlabs.

the class ThingTypeSteps method thing_type_set_owns_attribute_type_as.

@When("{root_label}\\( ?{type_label} ?) set owns attribute type: {type_label} as {type_label}")
public void thing_type_set_owns_attribute_type_as(RootLabel rootLabel, String typeLabel, String attributeLabel, String overriddenLabel) {
    AttributeType attributeType = tx().concepts().getAttributeType(attributeLabel);
    AttributeType overriddenType = tx().concepts().getAttributeType(overriddenLabel);
    get_thing_type(rootLabel, typeLabel).setOwns(attributeType, overriddenType);
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) When(io.cucumber.java.en.When)

Example 47 with When

use of io.cucumber.java.en.When in project grakn by graknlabs.

the class ThingTypeSteps method thing_type_set_owns_attribute_type.

@When("{root_label}\\( ?{type_label} ?) set owns attribute type: {type_label}")
public void thing_type_set_owns_attribute_type(RootLabel rootLabel, String typeLabel, String attributeLabel) {
    AttributeType attributeType = tx().concepts().getAttributeType(attributeLabel);
    get_thing_type(rootLabel, typeLabel).setOwns(attributeType);
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) When(io.cucumber.java.en.When)

Example 48 with When

use of io.cucumber.java.en.When in project grakn by graknlabs.

the class ThingTypeSteps method thing_type_set_owns_key_type.

@When("{root_label}\\( ?{type_label} ?) set owns key type: {type_label}")
public void thing_type_set_owns_key_type(RootLabel rootLabel, String typeLabel, String attTypeLabel) {
    AttributeType attributeType = tx().concepts().getAttributeType(attTypeLabel);
    get_thing_type(rootLabel, typeLabel).setOwns(attributeType, true);
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) When(io.cucumber.java.en.When)

Example 49 with When

use of io.cucumber.java.en.When in project grakn by graknlabs.

the class ThingTypeSteps method thing_type_set_owns_key_type_as.

@When("{root_label}\\( ?{type_label} ?) set owns key type: {type_label} as {type_label}")
public void thing_type_set_owns_key_type_as(RootLabel rootLabel, String typeLabel, String attTypeLabel, String overriddenLabel) {
    AttributeType attributeType = tx().concepts().getAttributeType(attTypeLabel);
    AttributeType overriddenType = tx().concepts().getAttributeType(overriddenLabel);
    get_thing_type(rootLabel, typeLabel).setOwns(attributeType, overriddenType, true);
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) When(io.cucumber.java.en.When)

Example 50 with When

use of io.cucumber.java.en.When in project grakn by graknlabs.

the class RelationSteps method relation_type_create_new_instance_with_key.

@When("{var} = relation\\( ?{type_label} ?) create new instance with key\\( ?{type_label} ?): {datetime}")
public void relation_type_create_new_instance_with_key(String var, String type, String keyType, LocalDateTime keyValue) {
    Attribute.DateTime key = tx().concepts().getAttributeType(keyType).asDateTime().put(keyValue);
    Relation relation = tx().concepts().getRelationType(type).create();
    relation.setHas(key);
    put(var, relation);
}
Also used : Relation(com.vaticle.typedb.core.concept.thing.Relation) Attribute(com.vaticle.typedb.core.concept.thing.Attribute) When(io.cucumber.java.en.When)

Aggregations

When (io.cucumber.java.en.When)111 SelenideElement (com.codeborne.selenide.SelenideElement)23 Map (java.util.Map)10 File (java.io.File)8 AttributeType (com.vaticle.typedb.core.concept.type.AttributeType)7 ModalDialogPage (io.syndesis.qe.pages.ModalDialogPage)7 Attribute (com.vaticle.typedb.core.concept.thing.Attribute)6 Account (io.syndesis.qe.account.Account)6 Form (io.syndesis.qe.fragments.common.form.Form)6 Syndesis (io.syndesis.qe.resource.impl.Syndesis)6 TimeoutException (java.util.concurrent.TimeoutException)6 RoleType (com.vaticle.typedb.core.concept.type.RoleType)5 IOException (java.io.IOException)5 HashMap (java.util.HashMap)5 Slf4j (lombok.extern.slf4j.Slf4j)5 ElementsCollection (com.codeborne.selenide.ElementsCollection)4 DataTable (io.cucumber.datatable.DataTable)4 IntegrationsEndpoint (io.syndesis.qe.endpoint.IntegrationsEndpoint)4 SyndesisRootPage (io.syndesis.qe.pages.SyndesisRootPage)4 List (java.util.List)4