Search in sources :

Example 86 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class IntegrationSteps method setFtpUploadData.

@And("^she fills ftp upload form with values$")
public void setFtpUploadData(DataTable sourceMappingData) {
    for (Map<String, String> source : sourceMappingData.asMaps(String.class, String.class)) {
        for (String field : source.keySet()) {
            SelenideElement element = editPage.getFtpUploadComponent().checkAndGetFieldTypeByName(field);
            assertThat(element, notNullValue());
            editPage.getFtpUploadComponent().setElementValue(source.get(field), element);
        }
    }
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) And(cucumber.api.java.en.And)

Example 87 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class IntegrationSteps method setJmsSubscribeData.

@And("^sets jms subscribe inputs source data$")
public void setJmsSubscribeData(DataTable sourceMappingData) {
    for (Map<String, String> source : sourceMappingData.asMaps(String.class, String.class)) {
        for (String field : source.keySet()) {
            SelenideElement element = editPage.getJmsSubscribeComponent().checkAndGetFieldTypeById(field);
            assertThat(element, notNullValue());
            editPage.getJmsSubscribeComponent().setElementValue(source.get(field), element);
        }
    }
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) And(cucumber.api.java.en.And)

Example 88 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class IntegrationSteps method setFtpDownloadData.

@And("^she fills ftp download form with values$")
public void setFtpDownloadData(DataTable sourceMappingData) {
    for (Map<String, String> source : sourceMappingData.asMaps(String.class, String.class)) {
        for (String field : source.keySet()) {
            SelenideElement element = editPage.getFtpDownloadComponent().checkAndGetFieldTypeByName(field);
            assertThat(element, notNullValue());
            editPage.getFtpDownloadComponent().setElementValue(source.get(field), element);
        }
    }
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) And(cucumber.api.java.en.And)

Example 89 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class IntegrationSteps method waitForIntegrationState.

@Then("^she waits until integration \"([^\"]*)\" gets into \"([^\"]*)\" state$")
public void waitForIntegrationState(String integrationName, String integrationStatus) {
    SelenideElement integration = listPage.getListComponent().getIntegration(integrationName);
    assertTrue(TestUtils.waitForEvent(status -> status.equals(integrationStatus), () -> listPage.getListComponent().getIntegrationItemStatus(integration), TimeUnit.MINUTES, 5, TimeUnit.SECONDS, 1));
}
Also used : ImportIntegrationPage(io.syndesis.qe.pages.integrations.ImportIntegrationPage) BasicFilterStepComponent(io.syndesis.qe.pages.integrations.edit.steps.BasicFilterStepComponent) DataMapperComponent(io.syndesis.qe.pages.integrations.edit.steps.DataMapperComponent) ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) ArrayList(java.util.ArrayList) Assert.assertThat(org.junit.Assert.assertThat) Utils(io.fabric8.kubernetes.client.utils.Utils) IntegrationDetailPage(io.syndesis.qe.pages.integrations.detail.IntegrationDetailPage) Map(java.util.Map) Assertions(org.assertj.core.api.Assertions) ElementsCollection(com.codeborne.selenide.ElementsCollection) Then(cucumber.api.java.en.Then) DataTable(cucumber.api.DataTable) And(cucumber.api.java.en.And) ListAction(io.syndesis.qe.fragments.common.list.actions.ListAction) ConnectionsList(io.syndesis.qe.pages.connections.fragments.list.ConnectionsList) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) ExportedIntegrationJSONUtil(io.syndesis.qe.utils.ExportedIntegrationJSONUtil) IntegrationFlowViewComponent(io.syndesis.qe.pages.integrations.edit.IntegrationFlowViewComponent) By(org.openqa.selenium.By) Condition.visible(com.codeborne.selenide.Condition.visible) CollectionCondition.sizeGreaterThanOrEqual(com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual) Assert.assertTrue(org.junit.Assert.assertTrue) File(java.io.File) SelenideElement(com.codeborne.selenide.SelenideElement) StepComponent(io.syndesis.qe.pages.integrations.edit.steps.StepComponent) TimeUnit(java.util.concurrent.TimeUnit) Slf4j(lombok.extern.slf4j.Slf4j) List(java.util.List) TestUtils(io.syndesis.qe.utils.TestUtils) IntegrationsListComponent(io.syndesis.qe.pages.integrations.list.IntegrationsListComponent) IntegrationEditPage(io.syndesis.qe.pages.integrations.edit.IntegrationEditPage) Condition(org.assertj.core.api.Condition) Matchers.is(org.hamcrest.Matchers.is) IntegrationsListPage(io.syndesis.qe.pages.integrations.list.IntegrationsListPage) When(cucumber.api.java.en.When) OpenShiftWaitUtils(io.syndesis.qe.wait.OpenShiftWaitUtils) SelenideElement(com.codeborne.selenide.SelenideElement) Then(cucumber.api.java.en.Then)

Example 90 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class IntegrationSteps method setOutputDataTypeData.

@And("^she fills specify output data type form with values$")
public void setOutputDataTypeData(DataTable sourceMappingData) {
    for (Map<String, String> source : sourceMappingData.asMaps(String.class, String.class)) {
        for (String field : source.keySet()) {
            SelenideElement element = editPage.getFtpDatatypeComponent().checkAndGetFieldTypeByName(field);
            assertThat(element, notNullValue());
            editPage.getFtpDatatypeComponent().setElementValue(source.get(field), element);
        }
    }
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) And(cucumber.api.java.en.And)

Aggregations

SelenideElement (com.codeborne.selenide.SelenideElement)91 ElementsCollection (com.codeborne.selenide.ElementsCollection)16 Then (cucumber.api.java.en.Then)13 And (cucumber.api.java.en.And)8 SyndesisRootPage (io.syndesis.qe.pages.SyndesisRootPage)6 ArrayList (java.util.ArrayList)5 When (cucumber.api.java.en.When)4 Test (org.junit.Test)4 QualityGate (org.sonar.wsclient.qualitygate.QualityGate)4 ProjectQualityGatePage (pageobjects.ProjectQualityGatePage)4 Given (cucumber.api.java.en.Given)2 ModalDialogPage (io.syndesis.qe.pages.ModalDialogPage)2 DashboardPage (io.syndesis.qe.pages.dashboard.DashboardPage)2 StepComponent (io.syndesis.qe.pages.integrations.edit.steps.StepComponent)2 List (java.util.List)2 By (org.openqa.selenium.By)2 CollectionCondition.sizeGreaterThanOrEqual (com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual)1 Condition.visible (com.codeborne.selenide.Condition.visible)1 AbstractSelenideTest (com.evolveum.midpoint.testing.selenide.tests.AbstractSelenideTest)1 DataTable (cucumber.api.DataTable)1