use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class TodoSteps method fillHostUrl.
@When("^fill in TODO API host URL$")
public void fillHostUrl() {
if (OpenShiftUtils.getInstance().getRoute("todo2") == null || !OpenShiftUtils.getInstance().getRoute("todo2").getSpec().getHost().equals("/")) {
TodoUtils.createDefaultRouteForTodo("todo2", "/");
}
String host = "http://" + OpenShiftUtils.getInstance().getRoute("todo2").getSpec().getHost();
Map<String, String> todoConfigMap = new HashMap<>();
todoConfigMap.put("host", host);
new Form($(By.id("root"))).fillByTestId(todoConfigMap);
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class ApiClientConnectorsSteps method setPetstoreCredentials.
@When("^set swagger petstore credentials")
public void setPetstoreCredentials() {
Account petStoreAccount = new Account();
petStoreAccount.setService("Swagger Petstore");
Map<String, String> accountParameters = new HashMap<>();
accountParameters.put("authenticationparametervalue", "special-key");
petStoreAccount.setProperties(accountParameters);
AccountsDirectory.getInstance().addAccount("Swagger Petstore Account", petStoreAccount);
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class ApiProviderSteps method createApiProviderSpec.
@When("^create API Provider spec from ([\\w]+) (.+)$")
public void createApiProviderSpec(String source, String path) {
if ("url".equals(source) && "todo-app".equals(path)) {
TodoUtils.createDefaultRouteForTodo(path, "/");
path = "http://" + OpenShiftUtils.getInstance().getRoute(path).getSpec().getHost() + "/swagger.json";
}
new UploadApiProviderSpecification().upload(source, path);
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class SelectConnectionTypeSteps method selectConnectionType.
@When("^select \"([^\"]*)\" connection type$")
public void selectConnectionType(String connectionName) {
selectConnectionTypePage.selectConnectionType(connectionName);
ConfigureConnection connectionWizardStep = null;
switch(connectionName) {
case "AMQ":
connectionWizardStep = new ConfigureConnectionAmq();
break;
default:
connectionWizardStep = new ConfigureConnection();
}
wizard.replaceStep(connectionWizardStep, 1);
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class ApicurioSteps method configureSecuritySchema.
@When("configure the {string} security schema")
public void configureSecuritySchema(String name) {
SelenideElement securityRow = $(Elements.SECURITY_SECTION).$$(Elements.SECURITY_SCHEMA_ROW).find(Condition.text(name));
if (securityRow == null) {
fail("Couldn't locate security schema {}, double check the spelling. Make sure you are using only the schema name, not also the type", name);
}
securityRow.$(".dropdown-toggle").click();
securityRow.$(".dropdown-menu").$$("li").find(Condition.text("Edit")).click();
}
Aggregations