Search in sources :

Example 21 with When

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();
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) When(io.cucumber.java.en.When)

Example 22 with When

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();
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) When(io.cucumber.java.en.When)

Example 23 with When

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();
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) When(io.cucumber.java.en.When)

Example 24 with When

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);
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) SelenideElement(com.codeborne.selenide.SelenideElement) When(io.cucumber.java.en.When)

Example 25 with When

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);
}
Also used : CreateIntegrationSteps(io.syndesis.qe.steps.integrations.editor.CreateIntegrationSteps) EditorSteps(io.syndesis.qe.steps.integrations.editor.EditorSteps) CommonSteps(io.syndesis.qe.steps.CommonSteps) ChooseConnectionSteps(io.syndesis.qe.steps.integrations.editor.add.ChooseConnectionSteps) When(io.cucumber.java.en.When)

Aggregations

When (io.cucumber.java.en.When)111 SelenideElement (com.codeborne.selenide.SelenideElement)23 Map (java.util.Map)10 File (java.io.File)8 AttributeType (com.vaticle.typedb.core.concept.type.AttributeType)7 ModalDialogPage (io.syndesis.qe.pages.ModalDialogPage)7 Attribute (com.vaticle.typedb.core.concept.thing.Attribute)6 Account (io.syndesis.qe.account.Account)6 Form (io.syndesis.qe.fragments.common.form.Form)6 Syndesis (io.syndesis.qe.resource.impl.Syndesis)6 TimeoutException (java.util.concurrent.TimeoutException)6 RoleType (com.vaticle.typedb.core.concept.type.RoleType)5 IOException (java.io.IOException)5 HashMap (java.util.HashMap)5 Slf4j (lombok.extern.slf4j.Slf4j)5 ElementsCollection (com.codeborne.selenide.ElementsCollection)4 DataTable (io.cucumber.datatable.DataTable)4 IntegrationsEndpoint (io.syndesis.qe.endpoint.IntegrationsEndpoint)4 SyndesisRootPage (io.syndesis.qe.pages.SyndesisRootPage)4 List (java.util.List)4