use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method fillFormViaID.
@Then("^fill in values by element ID")
public void fillFormViaID(DataTable data) {
Form.waitForInputs(20);
TestUtils.sleepIgnoreInterrupt(2000);
new Form(new SyndesisRootPage().getRootElement()).fillById(data.asMap(String.class, String.class));
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method fillFormByTestIdFromCreds.
@Then("^fill in data-testid field \"([^\"]*)\" from property \"([^\"]*)\" of credentials \"([^\"]*)\"")
public void fillFormByTestIdFromCreds(String testId, String property, String credentials) {
Account account = AccountsDirectory.getInstance().get(credentials);
Map<String, String> map = new HashMap<>();
map.put(testId, account.getProperty(property));
new Form(new SyndesisRootPage().getRootElement()).fillByTestId(map);
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method validateLink.
@Then("^check \"([^\"]*)\" link is (not |)visible$")
public void validateLink(String linkTitle, String visibility) {
Condition condition = "not".equalsIgnoreCase(visibility.trim()) ? hidden : visible;
new SyndesisRootPage().getLink(linkTitle).shouldBe(condition);
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method expectElementsPresent.
@Then("^check visibility of the \"([^\"]*)\" elements$")
public void expectElementsPresent(String elementClassNames) {
String[] elementClassNamesArray = elementClassNames.split(",");
for (String elementClassName : elementClassNamesArray) {
SelenideElement element = new SyndesisRootPage().getElementByClassName(elementClassName);
element.shouldBe(visible);
}
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method isPresentedWithDialogPage.
@Then("^check visibility of dialog page \"(.*)\"$")
public void isPresentedWithDialogPage(String title) {
String titleText = new ModalDialogPage().getTitleText();
assertThat(titleText).isEqualToIgnoringCase(title);
}
Aggregations