use of io.syndesis.qe.steps.CommonSteps in project syndesis-qe by syndesisio.
the class ApiClientConnectorsSteps method createNewApiConnector.
// ***************************************************************************
// ******************************* bulk phases ********************************
// ***************************************************************************
@Then("^(\\w+) creates new API connector \"([^\"]*)\"$")
public void createNewApiConnector(String user, String connectorName, DataTable properties) throws Throwable {
String securityAuthType = null;
for (List<String> property : properties.raw()) {
switch(property.get(0)) {
case "security":
switch(property.get(1)) {
// | security | authType | OAuth 2.0 |
case "authType":
securityAuthType = property.get(2);
break;
default:
}
break;
default:
}
}
CommonSteps commonSteps = new CommonSteps();
commonSteps.navigateTo(user, "Customizations");
commonSteps.validatePage(user, "Customizations");
commonSteps.clickOnLink("API Client Connectors");
commonSteps.validatePage(user, "API Client Connectors");
openNewApiConnectorWizard(user);
WizardSteps wizardSteps = new WizardSteps();
List<String> row = asList("file", "swagger/connectors/petstore.json");
List<List<String>> dataTable = new ArrayList<>();
dataTable.add(row);
wizardSteps.uploadSwaggerFile(user, DataTable.create(dataTable));
wizardSteps.navigateToNextWizardStep(user, "Review Swagger Action");
wizardSteps.navigateToNextWizardStep(user, "Security");
wizardSteps.setUpSecurityBy(user, securityAuthType);
wizardSteps.navigateToNextWizardStep(user, "General Connector Info");
wizardSteps.finishNewConnectorWizard(user);
checkNewConnectorIsPresent(user, connectorName);
}
use of io.syndesis.qe.steps.CommonSteps in project syndesis-qe by syndesisio.
the class ExtensionSteps method importExtension.
@Given("^imported extensions$")
public void importExtension(DataTable extensionsData) throws Throwable {
CommonSteps commonSteps = new CommonSteps();
String extensionsLink = "Extensions";
String importButton = "Import Extension";
List<List<String>> dataTable = extensionsData.raw();
for (List<String> dataRow : dataTable) {
String extensionName = dataRow.get(0);
String extensionFileName = dataRow.get(1);
commonSteps.navigateTo("", "Customizations");
commonSteps.validatePage("", "Customizations");
commonSteps.clickOnLink(extensionsLink);
commonSteps.validatePage("", "Extensions");
SelenideElement techExtensionItem = techExtensionsListComponent.getExtensionItem(extensionName);
if (techExtensionItem != null) {
log.warn("Extension {} already exists!", extensionName);
} else {
commonSteps.clickOnButton(importButton);
commonSteps.validatePage("", "Import Extension");
uploadFile(extensionFileName);
importDetails();
commonSteps.clickOnButton(importButton);
commonSteps.validatePage("", "Extension Details");
}
}
}
Aggregations