use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method saveBeforeTime.
/**
* Save current time to the singleton class
*/
@Then("^save time before request for integration ([^\"]*)$")
public void saveBeforeTime(String integrationName) {
calendarUtils.setBeforeRequest(Calendar.getInstance(), integrationName);
log.info("Time before request was saved: " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(calendarUtils.getLastBeforeRequest().getTime()));
// due to border values
TestUtils.sleepIgnoreInterrupt(3000);
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method fillFormViaTestID.
@Then("^fill in values by element data-testid")
public void fillFormViaTestID(DataTable data) {
Form.waitForInputs(20);
TestUtils.sleepIgnoreInterrupt(2000);
Map<String, String> dataMap = new HashMap<>(data.asMap(String.class, String.class));
dataMap.replaceAll((key, value) -> value == null ? "" : value);
new Form(new SyndesisRootPage().getRootElement()).fillByTestId(dataMap);
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class CommonSteps method forceFillFormViaTestID.
@Then("^force fill in values by element data-testid$")
public void forceFillFormViaTestID(DataTable data) {
Form.waitForInputs(20);
TestUtils.sleepIgnoreInterrupt(2000);
new Form(new SyndesisRootPage().getRootElement()).forceFillByTestId(data.asMap(String.class, String.class));
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class ManageCiCdPageSteps method checkCreationSameTag.
@Then("^check that tag (\\w+) cannot be created because another tag with same name exist$")
public void checkCreationSameTag(String tagName) {
ciCdPage.clickOnAddNewTagButton();
ModalDialogPage addDialog = new ModalDialogPage();
assertThat(addDialog.getTitleText()).isEqualTo("Add Tag Name");
addDialog.fillInputByDataTestid("cicd-edit-dialog-tag-name", tagName);
addDialog.getElementByClassName("help-block").shouldBe(Condition.visible).shouldHave(Condition.text("That tag name is already in use."));
addDialog.getButton("Save").shouldBe(Condition.disabled);
new ModalDialogPage().getButton("Cancel").click();
}
use of io.cucumber.java.en.Then in project syndesis-qe by syndesisio.
the class ManageCiCdPageSteps method checkRenameToExistingTag.
@Then("^check that tag (\\w+) cannot be updated to (\\w+) because another tag with same name exist$")
public void checkRenameToExistingTag(String tagName, String newTagName) {
ciCdPage.clickOnEditButton(tagName);
ModalDialogPage editDialog = new ModalDialogPage();
assertThat(editDialog.getTitleText()).isEqualTo("Edit Tag");
editDialog.fillInputByDataTestid("cicd-edit-dialog-tag-name", tagName);
editDialog.getElementByClassName("help-block").shouldBe(Condition.visible).shouldHave(Condition.text("That tag name is already in use."));
editDialog.getButton("Save").shouldBe(Condition.disabled);
new ModalDialogPage().getButton("Cancel").click();
}
Aggregations