Search in sources :

Example 26 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class BasicFilterStepComponent method fillConfiguration.

public void fillConfiguration() {
    for (int i = 0; i < getRuleArray().size(); i++) {
        BasicFilterRule rule = ruleArray.get(i);
        this.setLatestPathInput(rule.getPath());
        this.setLatestOpSelect(rule.getOp());
        this.setLatestValueInput(rule.getValue());
        if (i != (getRuleArray().size() - 1)) {
            SelenideElement addRuleLink = this.getRootElement().find(Link.ADD_RULE);
            addRuleLink.shouldBe(visible).click();
        }
    }
    String predicate = getPredicateString();
    this.setPredicate(predicate);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 27 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class BasicFilterStepComponent method setPath.

public void setPath(String path) {
    log.info("setting basic filter step path to {}", path);
    SelenideElement pathInput = this.getRootElement().find(Input.PATH);
    pathInput.shouldBe(visible).clear();
    pathInput.shouldBe(visible).sendKeys(path);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 28 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class BasicFilterStepComponent method addRule.

public void addRule(String ruleString) {
    String[] ruleStringArray = ruleString.split(", ");
    BasicFilterRule basicFilterRule = new BasicFilterRule(ruleStringArray[0], ruleStringArray[1], ruleStringArray[2]);
    SelenideElement addRuleLink = this.getRootElement().$(Link.ADD_RULE);
    addRuleLink.shouldBe(visible).click();
    this.setLatestPathInput(basicFilterRule.getPath());
    this.setLatestOpSelect(basicFilterRule.getOp());
    this.setLatestValueInput(basicFilterRule.getValue());
    this.ruleArray.add(basicFilterRule);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 29 with SelenideElement

use of com.codeborne.selenide.SelenideElement 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 30 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.

the class IntegrationsListComponent method checkAllIntegrationsKebabButtons.

public void checkAllIntegrationsKebabButtons() {
    ElementsCollection integrationsItems = getAllIntegrations();
    for (SelenideElement item : integrationsItems) {
        String status = this.getIntegrationItemStatus(item);
        if (status.equals("Deleted")) {
            this.getKebabButtonFromItem(item).shouldBe(hidden);
        } else {
            SelenideElement kebabB = this.getKebabButtonFromItem(item);
            kebabB.shouldBe(visible).click();
            this.checkIfKebabHasWhatShouldHave(item, status);
        }
    }
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Aggregations

SelenideElement (com.codeborne.selenide.SelenideElement)91 ElementsCollection (com.codeborne.selenide.ElementsCollection)16 Then (cucumber.api.java.en.Then)13 And (cucumber.api.java.en.And)8 SyndesisRootPage (io.syndesis.qe.pages.SyndesisRootPage)6 ArrayList (java.util.ArrayList)5 When (cucumber.api.java.en.When)4 Test (org.junit.Test)4 QualityGate (org.sonar.wsclient.qualitygate.QualityGate)4 ProjectQualityGatePage (pageobjects.ProjectQualityGatePage)4 Given (cucumber.api.java.en.Given)2 ModalDialogPage (io.syndesis.qe.pages.ModalDialogPage)2 DashboardPage (io.syndesis.qe.pages.dashboard.DashboardPage)2 StepComponent (io.syndesis.qe.pages.integrations.edit.steps.StepComponent)2 List (java.util.List)2 By (org.openqa.selenium.By)2 CollectionCondition.sizeGreaterThanOrEqual (com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual)1 Condition.visible (com.codeborne.selenide.Condition.visible)1 AbstractSelenideTest (com.evolveum.midpoint.testing.selenide.tests.AbstractSelenideTest)1 DataTable (cucumber.api.DataTable)1