Search in sources :

Example 76 with When

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

the class DatasetStep method givenIUpdateTheDatasetNamedWithData.

// 
@When("^I update the dataset named \"(.*)\" with data \"(.*)\"$")
public void givenIUpdateTheDatasetNamedWithData(String datasetName, String fileName) throws Throwable {
    String suffixedDatasetName = suffixName(datasetName);
    LOGGER.debug("I update the dataset named {} with data {}.", suffixedDatasetName, fileName);
    String datasetId = context.getDatasetId(suffixedDatasetName);
    Response response = api.updateDataset(fileName, suffixedDatasetName, datasetId);
    response.then().statusCode(200);
}
Also used : Response(com.jayway.restassured.response.Response) When(cucumber.api.java.en.When)

Example 77 with When

use of cucumber.api.java.en.When in project activityinfo by bedatadriven.

the class AnalysisSteps method I_save_the_report_as.

@When("^I save the report as \"([^\"]*)\"$")
public void I_save_the_report_as(String reportName) throws Throwable {
    UiApplicationDriver ui = (UiApplicationDriver) driver;
    PivotTableEditor editor = (PivotTableEditor) ui.getCurrentPage();
    editor.reportBar().rename(aliasTable.createAlias(reportName));
    editor.reportBar().save();
    currentReport = reportName;
}
Also used : UiApplicationDriver(org.activityinfo.test.driver.UiApplicationDriver) PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor) When(cucumber.api.java.en.When)

Example 78 with When

use of cucumber.api.java.en.When in project activityinfo by bedatadriven.

the class AnalysisSteps method I_share_the_report_with_users_of_the_database.

@When("^I share the report with users of the \"([^\"]*)\" database$")
public void I_share_the_report_with_users_of_the_database(String databaseName) throws Throwable {
    UiApplicationDriver ui = (UiApplicationDriver) driver;
    PivotTableEditor editor = (PivotTableEditor) ui.getCurrentPage();
    editor.reportBar().share().shareWith(aliasTable.getAlias(databaseName), true).ok();
}
Also used : UiApplicationDriver(org.activityinfo.test.driver.UiApplicationDriver) PivotTableEditor(org.activityinfo.test.pageobject.web.reports.PivotTableEditor) When(cucumber.api.java.en.When)

Example 79 with When

use of cucumber.api.java.en.When in project activityinfo by bedatadriven.

the class JsonApiSteps method user_executes_the_command.

@When("([^ ]+) executes the command:$")
public void user_executes_the_command(String accountEmail, String requestBody) throws Throwable {
    UserAccount user = accounts.ensureAccountExists(accountEmail);
    execute(user, requestBody);
}
Also used : UserAccount(org.activityinfo.test.sut.UserAccount) When(cucumber.api.java.en.When)

Example 80 with When

use of cucumber.api.java.en.When in project activityinfo by bedatadriven.

the class LoginSteps method I_login_as_with_my_password.

@When("^I login as \"([^\"]*)\" with my correct password$")
public void I_login_as_with_my_password(String email) throws Throwable {
    UserAccount account = accounts.ensureAccountExists(email);
    logoutIfloggedIn();
    loginPage.navigateTo().loginAs(account);
}
Also used : UserAccount(org.activityinfo.test.sut.UserAccount) 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