use of io.syndesis.qe.steps.connections.wizard.phases.NameConnectionSteps in project syndesis-qe by syndesisio.
the class CommonSteps method createConnections.
@Given("^created connections$")
public void createConnections(DataTable connectionsData) {
Connections connectionsPage = new Connections();
ConfigureConnectionSteps configureConnectionSteps = new ConfigureConnectionSteps();
NameConnectionSteps nameConnectionSteps = new NameConnectionSteps();
List<List<String>> dataTable = connectionsData.raw();
for (List<String> dataRow : dataTable) {
String connectionType = dataRow.get(0);
String connectionCredentialsName = dataRow.get(1);
String connectionName = dataRow.get(2);
String connectionDescription = dataRow.get(3);
navigateTo("", "Connections");
validatePage("", "Connections");
ElementsCollection connections = connectionsPage.getAllConnections();
connections = connections.filter(exactText(connectionName));
if (connections.size() != 0) {
log.warn("Connection {} already exists!", connectionName);
} else {
clickOnButton("Create Connection");
selectConnectionTypeSteps.selectConnectionType(connectionType);
configureConnectionSteps.fillConnectionDetails(connectionCredentialsName);
clickOnButton("Validate");
successNotificationIsPresentWithError(connectionType + " has been successfully validated");
scrollTo("top", "right");
clickOnButton("Next");
nameConnectionSteps.setConnectionName(connectionName);
nameConnectionSteps.setConnectionDescription(connectionDescription);
clickOnButton("Create");
}
}
}
Aggregations