Search in sources :

Example 1 with ModalDialogPage

use of io.syndesis.qe.pages.ModalDialogPage in project syndesis-qe by syndesisio.

the class IntegrationsListComponent method clickDeleteIntegration.

public void clickDeleteIntegration(String integrationName) {
    log.info("clicking delete link for integration {}", integrationName);
    this.getRootElement().find(Element.ITEM).shouldBe(visible);
    SelenideElement parentElement = null;
    ElementsCollection parentElements = this.getAllIntegrations();
    for (SelenideElement element : parentElements) {
        String name = getIntegrationName(element);
        if (name.equals(integrationName)) {
            parentElement = element;
            break;
        }
    }
    if (parentElement != null) {
        parentElement.find(Button.KEBAB_DROPDOWN).shouldBe(visible).click();
    }
    this.getRootElement().find(Link.KEBAB_DELETE).shouldBe(visible).click();
    ModalDialogPage modal = new ModalDialogPage();
    modal.getButton("OK").shouldBe(visible).click();
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 2 with ModalDialogPage

use of io.syndesis.qe.pages.ModalDialogPage in project syndesis-qe by syndesisio.

the class IntegrationSteps method startIntegration.

@And("^Camilla starts integration \"([^\"]*)\"$")
public void startIntegration(String integrationName) {
    detailPage.clickOnKebabMenuAction("Publish");
    ModalDialogPage modal = new ModalDialogPage();
    modal.getButton("OK").shouldBe(visible).click();
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) And(cucumber.api.java.en.And)

Example 3 with ModalDialogPage

use of io.syndesis.qe.pages.ModalDialogPage in project syndesis-qe by syndesisio.

the class ConnectionsList method invokeActionOnItem.

@Override
public boolean invokeActionOnItem(String title, ListAction action) {
    if (super.invokeActionOnItem(title, action)) {
        return true;
    } else {
        KebabMenu kebabMenu = new KebabMenu(getItem(title).$(By.xpath(".//button")));
        switch(action) {
            case DELETE:
                kebabMenu.open();
                kebabMenu.getItemElement("Delete").shouldBe(visible).click();
                new ModalDialogPage().getButton("OK").shouldBe(visible).click();
                return false;
            default:
                return false;
        }
    }
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) KebabMenu(io.syndesis.qe.fragments.common.menu.KebabMenu)

Example 4 with ModalDialogPage

use of io.syndesis.qe.pages.ModalDialogPage in project syndesis-qe by syndesisio.

the class CommonSteps method isPresentedWithDialogPage.

@Then("^she is presented with dialog page \"([^\"]*)\"$")
public void isPresentedWithDialogPage(String title) throws Throwable {
    String titleText = new ModalDialogPage().getTitleText();
    assertThat(titleText.equals(title), is(true));
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) Then(cucumber.api.java.en.Then)

Aggregations

ModalDialogPage (io.syndesis.qe.pages.ModalDialogPage)4 ElementsCollection (com.codeborne.selenide.ElementsCollection)1 SelenideElement (com.codeborne.selenide.SelenideElement)1 And (cucumber.api.java.en.And)1 Then (cucumber.api.java.en.Then)1 KebabMenu (io.syndesis.qe.fragments.common.menu.KebabMenu)1