Search in sources :

Example 71 with When

use of cucumber.api.java.en.When in project syndesis-qe by syndesisio.

the class DataMapperSteps method selectFromDropDownByElement.

@When("^she selects \"([^\"]*)\" from \"([^\"]*)\" selector-dropdown$")
public void selectFromDropDownByElement(String option, String selectAlias) {
    log.info(option);
    SelenideElement selectElement = mapper.getElementByAlias(selectAlias).shouldBe(visible);
    mapper.selectOption(selectElement, option);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) When(cucumber.api.java.en.When)

Example 72 with When

use of cucumber.api.java.en.When in project hippo by NHS-digital-website.

the class SiteSteps method iClickOn.

/**
 * Then I can click on link "foo bar"
 * When I click on "foo bar" button
 */
@When("^I (?:can )?click on(?: the| link)? \"([^\"]+)\"(?: link| button)?$")
public void iClickOn(String linkTitle) throws Throwable {
    WebElement element = sitePage.findElementWithTitle(linkTitle);
    assertThat("I can find element with title: " + linkTitle, element, is(notNullValue()));
    sitePage.clickOnElement(element);
}
Also used : WebElement(org.openqa.selenium.WebElement) When(cucumber.api.java.en.When)

Example 73 with When

use of cucumber.api.java.en.When in project data-prep by Talend.

the class ExportPreparationStep method whenIGetExportFormat.

@When("^I get the export formats for the preparation \"(.*)\"$")
public void whenIGetExportFormat(String preparationName) throws IOException {
    String preparationId = context.getPreparationId(suffixName(preparationName));
    Response apiResponse = api.getExportFormats(preparationId);
    ExportFormatMessage[] parameters = objectMapper.readValue(apiResponse.getBody().asString(), ExportFormatMessage[].class);
    context.storePreparationExportFormat(suffixName(preparationName), parameters);
}
Also used : Response(com.jayway.restassured.response.Response) ExportFormatMessage(org.talend.dataprep.format.export.ExportFormatMessage) When(cucumber.api.java.en.When)

Example 74 with When

use of cucumber.api.java.en.When in project data-prep by Talend.

the class ExportPreparationStep method whenIExportThePreparationWithCustomParametersInto.

@When("^I export the preparation with parameters :$")
public void whenIExportThePreparationWithCustomParametersInto(DataTable dataTable) throws IOException {
    Map<String, String> params = dataTable.asMap(String.class, String.class);
    ExportType exportType = epAnalyzer.detectExportType(params);
    ExportSampleStep exporter = epAnalyzer.getExporter(exportType);
    if (exporter == null) {
        Assert.fail("No exporter available for " + exportType.getName() + " export type.");
    }
    exporter.exportSample(params);
}
Also used : ExportSampleStep(org.talend.dataprep.qa.step.export.ExportSampleStep) ExportType(org.talend.dataprep.qa.util.export.ExportType) When(cucumber.api.java.en.When)

Example 75 with When

use of cucumber.api.java.en.When in project data-prep by Talend.

the class ActionStep method whenIAddAStepToAPreparation.

@When("^I add a \"(.*)\" step on the preparation \"(.*)\" with parameters :$")
public void whenIAddAStepToAPreparation(String actionName, String preparationName, DataTable dataTable) {
    Map<String, String> params = dataTable.asMap(String.class, String.class);
    String prepId = context.getPreparationId(suffixName(preparationName));
    Action action = new Action();
    action.action = actionName;
    action.parameters.putAll(util.mapParamsToActionParameters(params));
    api.addAction(prepId, action);
}
Also used : Action(org.talend.dataprep.helper.api.Action) When(cucumber.api.java.en.When)

Aggregations

When (cucumber.api.java.en.When)148 TestUtils.nullAsString (alien4cloud.it.utils.TestUtils.nullAsString)12 Application (alien4cloud.model.application.Application)10 FlowPayload (org.openkilda.messaging.payload.flow.FlowPayload)6 StandardEvaluationContext (org.springframework.expression.spel.support.StandardEvaluationContext)6 ComponentSearchRequest (alien4cloud.rest.component.ComponentSearchRequest)5 FilteredSearchRequest (alien4cloud.rest.model.FilteredSearchRequest)5 TopologyDTO (alien4cloud.topology.TopologyDTO)4 Path (java.nio.file.Path)4 List (java.util.List)4 UiApplicationDriver (org.activityinfo.test.driver.UiApplicationDriver)4 PivotTableEditor (org.activityinfo.test.pageobject.web.reports.PivotTableEditor)4 IslInfoData (org.openkilda.messaging.info.event.IslInfoData)4 WebElement (org.openqa.selenium.WebElement)4 MvcResult (org.springframework.test.web.servlet.MvcResult)4 NotFoundException (alien4cloud.exception.NotFoundException)3 Context (alien4cloud.it.Context)3 MetaPropConfiguration (alien4cloud.model.common.MetaPropConfiguration)3 DeployApplicationRequest (alien4cloud.rest.application.model.DeployApplicationRequest)3 UpdateDeploymentTopologyRequest (alien4cloud.rest.application.model.UpdateDeploymentTopologyRequest)3