use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class ManageCiCdPageSteps method renameTag.
@When("^rename tag (\\w+) to (\\w+) in Manage CI/CD page$")
public void renameTag(String tagName, String newName) {
ciCdPage.clickOnEditButton(tagName);
ModalDialogPage editDialog = new ModalDialogPage();
assertThat(editDialog.getTitleText()).isEqualTo("Edit Tag");
editDialog.fillInputByDataTestid("cicd-edit-dialog-tag-name", newName);
new ModalDialogPage().getButton("Save").click();
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class ManageCiCdPageSteps method deleteTag.
@When("^delete tag (\\w+) from Manage CI/CD page$")
public void deleteTag(String tagName) {
ciCdPage.clickOnRemoveButton(tagName);
ModalDialogPage warning = new ModalDialogPage();
assertThat(warning.getTitleText()).isEqualTo("Are you sure you want to remove the tag?");
new ModalDialogPage().getButton("Yes").click();
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class ManageCiCdPageSteps method createNewTag.
@When("^create new tag with name (\\w+) in Manage CI/CD page$$")
public void createNewTag(String tagName) {
ciCdPage.clickOnAddNewTagButton();
ModalDialogPage addDialog = new ModalDialogPage();
assertThat(addDialog.getTitleText()).isEqualTo("Add Tag Name");
addDialog.fillInputByDataTestid("cicd-edit-dialog-tag-name", tagName);
new ModalDialogPage().getButton("Save").click();
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class EditorSteps method cancelIntegrationEditorSave.
@When("^save and cancel integration editor$")
public void cancelIntegrationEditorSave() {
editor.getRootElement().$(Button.SAVE_AS_DRAFT).shouldBe(visible).click();
TestUtils.sleepIgnoreInterrupt(2000);
editor.getRootElement().$(Button.CANCEL).shouldBe(visible).click();
SelenideElement dialog = new ModalDialogPage().getRootElement();
dialog.find(By.xpath(".//button[text()[contains(.,'Confirm')]]")).waitUntil(Condition.appears, 10000).click();
dialog.waitUntil(Condition.not(visible), 10 * 1000);
}
use of io.cucumber.java.en.When in project syndesis-qe by syndesisio.
the class ApiProviderSteps method createTheTODOIntegration.
/**
* Convenience method to prevent repeating the same steps over and over again
*
* @param name
* @param source
* @param path
*/
@When("^create an API Provider integration \"([^\"]*)\" from (\\w+) (.+)$")
public void createTheTODOIntegration(String name, String source, String path) {
CommonSteps cs = new CommonSteps();
cs.clickOnLink("Create Integration");
new EditorSteps().verifyNewIntegrationEditorOpened();
new ChooseConnectionSteps().selectConnection("API Provider");
createApiProviderSpec(source, path);
navigateToTheNextAPIProviderWizardStep();
cs.clickOnButton("Next");
cs.clickOnLink("Save");
new CreateIntegrationSteps().setIntegrationName(name);
cs.clickOnButton("Save");
TestUtils.sleepIgnoreInterrupt(2000);
}
Aggregations