use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class SettingsSteps method checkFieldsExistence.
@Then("^check that OAuth fields exists for connection \"([^\"]*)\"$")
public void checkFieldsExistence(String itemTitle, DataTable fields) {
SelenideElement item = settingsPage.getSettingsItem(itemTitle);
item.shouldBe(visible);
settingsPage.openSettings(itemTitle);
List<List<String>> dataRows = fields.cells();
for (List<String> row : dataRows) {
item.find(ByUtils.dataTestId(row.get(0))).exists();
}
settingsPage.closeCurrentlyExpandedSettings();
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method checkSqlWarning.
@Then("^check visibility of alert notification$")
public void checkSqlWarning() {
SelenideElement allertSucces = new SyndesisRootPage().getElementByLocator(Alert.WARNING.getBy());
allertSucces.shouldBe(visible);
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method expectElementPresent.
@Then("^check visibility of the \"([^\"]*)\"$")
public void expectElementPresent(String elementClassName) {
SelenideElement element = new SyndesisRootPage().getElementByClassName(elementClassName);
element.shouldBe(visible);
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class GoogleSheetsValidationSteps method verifyThatChartWasCreated.
@Then("verify that chart was created")
public void verifyThatChartWasCreated() {
for (Sheet s : sheetsUtils.getSheetsFromDataSpreadsheet()) {
if (s.getProperties().getTitle().contains("Chart")) {
Assertions.assertThat(s.getCharts().size()).isGreaterThan(0);
EmbeddedChart ch = s.getCharts().get(0);
Assertions.assertThat(ch.getChartId()).isGreaterThan(0);
sheetsUtils.clearSheetInDataSpreadsheet(s.getProperties().getSheetId());
}
}
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class IrcValidationSteps method verifyThatMessageWasPosted.
@Then("verify that the message with content {string} was posted to channels {string}")
public void verifyThatMessageWasPosted(String content, String channels) {
TestUtils.sleepIgnoreInterrupt(30000L);
final int channelsCount = channels.split(",").length;
Map<String, List<String>> receivedMessages = new Gson().fromJson(HTTPUtils.doGetRequest(controllerRoute + "/messages").getBody(), Map.class);
assertThat(receivedMessages.keySet()).size().isEqualTo(channelsCount);
for (String channel : channels.split(",")) {
assertThat(receivedMessages.get(channel).get(receivedMessages.get(channel).size() - 1)).isEqualTo(content);
}
}
Aggregations