use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class DashboardSteps method expectConnectionTitleNonPresent.
@Then("^check that connection \"([^\"]*)\" is not visible on dashboard page$")
public void expectConnectionTitleNonPresent(String connectionName) {
DashboardPage dashboardPage = new DashboardPage();
SelenideElement connection = dashboardPage.getConnection(connectionName);
connection.shouldNotBe(visible);
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class ApiClientConnectorsSteps method uploadSwaggerFile.
// ***************************************************************************
// ******************************* bulk steps ********************************
// ***************************************************************************
@Then("^upload swagger file (.+)$")
public void uploadSwaggerFile(String filePath) {
log.debug("File path: " + filePath);
ElementsCollection col;
try {
try {
OpenShiftWaitUtils.waitFor(() -> $$(By.tagName("input")).filter(attribute("type", "file")).size() == 1, 20 * 1000L);
} catch (TimeoutException | InterruptedException e) {
fail("Can not upload swagger - input button was not found");
}
col = $$(By.tagName("input")).filter(attribute("type", "file"));
assertThat(col).size().isEqualTo(1);
UploadFile.uploadFile(col.get(0), new File(filePath));
} catch (org.openqa.selenium.StaleElementReferenceException e) {
log.error("An error happened, retrying once");
col = $$(By.tagName("input")).filter(attribute("type", "file"));
assertThat(col).size().isEqualTo(1);
UploadFile.uploadFile(col.get(0), new File(filePath));
}
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class ConfigureStepSteps method checkBasicFilterStepOption.
@Then("^check that basic filter step path input options contains \"([^\"]*)\" option$")
public void checkBasicFilterStepOption(String option) {
BasicFilter basicFilterStepComponent = new BasicFilter("");
List<String> options = basicFilterStepComponent.getPathInputOptions();
assertThat(options.contains(option)).isTrue();
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class ConfigureStepSteps method verifyConfigureStepPage.
@Then("^check visibility of \"([^\"]*)\" step configuration page$")
public void verifyConfigureStepPage(String stepType) {
AbstractStep stepComponent = StepFactory.getStep(stepType, "");
log.info("there must be add step editPage root element");
stepComponent.getRootElement().shouldBe(visible);
assertThat(stepComponent.validate()).isTrue();
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class DetailsSteps method verifyWebhookUrl.
@Then("^verify the displayed webhook URL matches regex (.*)$")
public void verifyWebhookUrl(String regex) {
String apiUrl = new Details().getApiUrl();
Assertions.assertThat(apiUrl).matches(regex);
}
Aggregations