Search in sources :

Example 31 with Then

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

the class DetailSteps method validateOauthConnectionByClickingValidateButton.

@Then("validate oauth connection {string} by clicking Validate button")
public void validateOauthConnectionByClickingValidateButton(String connectionName) {
    Connections connectionsPage = new Connections();
    connectionsPage.getConnection(connectionName).shouldBe(Condition.visible).click();
    new CommonSteps().clickOnButton("Validate");
    detailPage.getCloseableAllerts(Alert.SUCCESS).first().shouldBe(exist);
}
Also used : Connections(io.syndesis.qe.pages.connections.Connections) CommonSteps(io.syndesis.qe.steps.CommonSteps) Then(io.cucumber.java.en.Then)

Example 32 with Then

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

the class ApicurioSteps method verifyOperations.

@ExcludeFromSelectorReports
@Then("^check that apicurio shows (\\d+) imported operations$")
public void verifyOperations(int expectedCount) {
    SelenideElement operations = $(Elements.PAGE_ROOT).shouldBe(visible).find(Elements.NUMBER_OPERATIONS);
    assertThat(operations).isNotNull();
    assertThat(operations.getText()).containsIgnoringCase(Integer.toString(expectedCount)).containsIgnoringCase("operations");
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) ExcludeFromSelectorReports(io.syndesis.qe.report.selector.ExcludeFromSelectorReports) Then(io.cucumber.java.en.Then)

Example 33 with Then

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

the class ApicurioSteps method verifyWarnings.

@ExcludeFromSelectorReports
@Then("^check that apicurio shows (\\d+) warnings$")
public void verifyWarnings(int expectedCount) {
    SelenideElement operations = $(Elements.WARNINGS).shouldBe(visible);
    assertThat(operations).isNotNull();
    assertThat(operations.getText()).containsIgnoringCase(Integer.toString(expectedCount));
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) ExcludeFromSelectorReports(io.syndesis.qe.report.selector.ExcludeFromSelectorReports) Then(io.cucumber.java.en.Then)

Example 34 with Then

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

the class DashboardSteps method expectIntegrationPresentinTopFive.

@Then("^check that integration \"([^\"]*)\" is present in top 5 integrations$")
public void expectIntegrationPresentinTopFive(String name) {
    log.info("Verifying integration {} is present in top 5 integrations", name);
    DashboardPage dashboardPage = new DashboardPage();
    Assertions.assertThat(dashboardPage.isIntegrationPresent(name));
}
Also used : DashboardPage(io.syndesis.qe.pages.dashboard.DashboardPage) Then(io.cucumber.java.en.Then)

Example 35 with Then

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

the class DashboardSteps method expectIntegrationNotPresentOnDashboard.

@Then("^check that integration \"([^\"]*)\" is not in top 5 integrations anymore$")
public void expectIntegrationNotPresentOnDashboard(String name) {
    log.info("Verifying if integration {} is present", name);
    DashboardPage dashboardPage = new DashboardPage();
    Assertions.assertThat(dashboardPage.isIntegrationPresent(name)).isFalse();
}
Also used : DashboardPage(io.syndesis.qe.pages.dashboard.DashboardPage) 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