Search in sources :

Example 71 with Then

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

the class CommonSteps method fillFormViaID.

@Then("^fill in values by element ID")
public void fillFormViaID(DataTable data) {
    Form.waitForInputs(20);
    TestUtils.sleepIgnoreInterrupt(2000);
    new Form(new SyndesisRootPage().getRootElement()).fillById(data.asMap(String.class, String.class));
}
Also used : SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) Form(io.syndesis.qe.fragments.common.form.Form) Then(io.cucumber.java.en.Then)

Example 72 with Then

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

the class CommonSteps method fillFormByTestIdFromCreds.

@Then("^fill in data-testid field \"([^\"]*)\" from property \"([^\"]*)\" of credentials \"([^\"]*)\"")
public void fillFormByTestIdFromCreds(String testId, String property, String credentials) {
    Account account = AccountsDirectory.getInstance().get(credentials);
    Map<String, String> map = new HashMap<>();
    map.put(testId, account.getProperty(property));
    new Form(new SyndesisRootPage().getRootElement()).fillByTestId(map);
}
Also used : GoogleAccount(io.syndesis.qe.utils.google.GoogleAccount) Account(io.syndesis.qe.account.Account) SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) HashMap(java.util.HashMap) Form(io.syndesis.qe.fragments.common.form.Form) Then(io.cucumber.java.en.Then)

Example 73 with Then

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

the class CommonSteps method validateLink.

@Then("^check \"([^\"]*)\" link is (not |)visible$")
public void validateLink(String linkTitle, String visibility) {
    Condition condition = "not".equalsIgnoreCase(visibility.trim()) ? hidden : visible;
    new SyndesisRootPage().getLink(linkTitle).shouldBe(condition);
}
Also used : Condition(com.codeborne.selenide.Condition) CollectionCondition(com.codeborne.selenide.CollectionCondition) SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) Then(io.cucumber.java.en.Then)

Example 74 with Then

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

the class CommonSteps method expectElementsPresent.

@Then("^check visibility of the \"([^\"]*)\" elements$")
public void expectElementsPresent(String elementClassNames) {
    String[] elementClassNamesArray = elementClassNames.split(",");
    for (String elementClassName : elementClassNamesArray) {
        SelenideElement element = new SyndesisRootPage().getElementByClassName(elementClassName);
        element.shouldBe(visible);
    }
}
Also used : SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) SelenideElement(com.codeborne.selenide.SelenideElement) Then(io.cucumber.java.en.Then)

Example 75 with Then

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

the class CommonSteps method isPresentedWithDialogPage.

@Then("^check visibility of dialog page \"(.*)\"$")
public void isPresentedWithDialogPage(String title) {
    String titleText = new ModalDialogPage().getTitleText();
    assertThat(titleText).isEqualToIgnoringCase(title);
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) 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