Search in sources :

Example 66 with Then

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

the class AttributeTypeSteps method attribute_type_get_owners_as_key_do_not_contains.

@Then("attribute\\( ?{type_label} ?) get key owners do not contain:")
public void attribute_type_get_owners_as_key_do_not_contains(String typeLabel, List<String> ownerLabels) {
    AttributeType attributeType = tx().concepts().getAttributeType(typeLabel);
    Set<String> actuals = attributeType.getOwners(true).map(ThingType::getLabel).map(Label::toString).toSet();
    for (String ownerLabel : ownerLabels) {
        assertFalse(actuals.contains(ownerLabel));
    }
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) ThingType(com.vaticle.typedb.core.concept.type.ThingType) Then(io.cucumber.java.en.Then)

Example 67 with Then

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

the class AttributeTypeSteps method attribute_type_get_owners_as_key_contains.

@Then("attribute\\( ?{type_label} ?) get key owners contain:")
public void attribute_type_get_owners_as_key_contains(String typeLabel, List<String> ownerLabels) {
    AttributeType attributeType = tx().concepts().getAttributeType(typeLabel);
    Set<String> actuals = attributeType.getOwners(true).map(ThingType::getLabel).map(Label::toString).toSet();
    assertTrue(actuals.containsAll(ownerLabels));
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) ThingType(com.vaticle.typedb.core.concept.type.ThingType) Then(io.cucumber.java.en.Then)

Example 68 with Then

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

the class AttributeTypeSteps method attribute_type_as_value_type_set_regex.

@Then("attribute\\( ?{type_label} ?) as\\( ?{value_type} ?) set regex: {}")
public void attribute_type_as_value_type_set_regex(String typeLabel, AttributeType.ValueType valueType, String regex) {
    if (!valueType.equals(AttributeType.ValueType.STRING))
        fail();
    AttributeType attributeType = attribute_type_as_value_type(typeLabel, valueType);
    attributeType.asString().setRegex(Pattern.compile(regex));
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) Then(io.cucumber.java.en.Then)

Example 69 with Then

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

the class AttributeTypeSteps method attribute_type_as_value_type_unset_regex.

@Then("attribute\\( ?{type_label} ?) as\\( ?{value_type} ?) unset regex")
public void attribute_type_as_value_type_unset_regex(String typeLabel, AttributeType.ValueType valueType) {
    if (!valueType.equals(AttributeType.ValueType.STRING))
        fail();
    AttributeType attributeType = attribute_type_as_value_type(typeLabel, valueType);
    attributeType.asString().unsetRegex();
}
Also used : AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) Then(io.cucumber.java.en.Then)

Example 70 with Then

use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.

the class CommonSteps method successNotificationIsPresent.

@Then("^check visibility of success notification$")
public void successNotificationIsPresent() {
    SelenideElement allertSucces = new SyndesisRootPage().getElementByLocator(Alert.SUCCESS.getBy());
    allertSucces.shouldBe(visible);
}
Also used : SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) SelenideElement(com.codeborne.selenide.SelenideElement) Then(io.cucumber.java.en.Then)

Aggregations

Then (io.cucumber.java.en.Then)124 SelenideElement (com.codeborne.selenide.SelenideElement)20 AttributeType (com.vaticle.typedb.core.concept.type.AttributeType)16 List (java.util.List)13 HashMap (java.util.HashMap)10 SyndesisRootPage (io.syndesis.qe.pages.SyndesisRootPage)9 Map (java.util.Map)9 ThingType (com.vaticle.typedb.core.concept.type.ThingType)8 DataTable (io.cucumber.datatable.DataTable)8 When (io.cucumber.java.en.When)8 Pod (io.fabric8.kubernetes.api.model.Pod)8 Quantity (io.fabric8.kubernetes.api.model.Quantity)8 ArrayList (java.util.ArrayList)8 Date (java.util.Date)8 TimeoutException (java.util.concurrent.TimeoutException)8 TestUtils (io.syndesis.qe.utils.TestUtils)7 HTTPResponse (io.syndesis.qe.utils.http.HTTPResponse)7 OpenShiftWaitUtils (io.syndesis.qe.wait.OpenShiftWaitUtils)7 Slf4j (lombok.extern.slf4j.Slf4j)7 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)7