Search in sources :

Example 1 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class ProjectQualityGatePageTest method should_set_default.

@Test
public void should_set_default() {
    QualityGate customQualityGate = createCustomQualityGate("should_set_default");
    qualityGateClient().setDefault(customQualityGate.id());
    ProjectQualityGatePage page = openPage();
    page.setQualityGate(customQualityGate.name());
    SelenideElement selectedQualityGate = page.getSelectedQualityGate();
    selectedQualityGate.should(Condition.hasText("Default"));
    selectedQualityGate.should(Condition.hasText(customQualityGate.name()));
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) ProjectQualityGatePage(pageobjects.ProjectQualityGatePage) QualityGate(org.sonar.wsclient.qualitygate.QualityGate) Test(org.junit.Test)

Example 2 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class ProjectKeyPage method assertDuplicated.

public ProjectKeyPage assertDuplicated(String oldKey) {
    SelenideElement row = $("#bulk-update-results").$("[data-key=\"" + oldKey + "\"]");
    row.$(".js-new-key").$(".badge-danger").shouldBe(visible);
    return this;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 3 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class ProjectKeyPage method assertBulkChangeSimulationResult.

public ProjectKeyPage assertBulkChangeSimulationResult(String oldKey, String newKey) {
    SelenideElement row = $("#bulk-update-results").$("[data-key=\"" + oldKey + "\"]");
    row.$(".js-old-key").should(hasText(oldKey));
    row.$(".js-new-key").should(hasText(newKey));
    return this;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 4 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class FacetItem method selectOptionItem.

public FacetItem selectOptionItem(String value) {
    SelenideElement selectInput = this.elt.$(".Select-input input");
    selectInput.val(value);
    this.elt.$("div.Select-option.is-focused").should(Condition.exist);
    selectInput.pressEnter();
    return this;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 5 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class SettingsPage method setStringValue.

public SettingsPage setStringValue(String settingKey, String value) {
    SelenideElement setting = $(".settings-definition[data-key=\"" + settingKey + "\"]");
    setting.find("input").val(value);
    setting.find(".js-save-changes").click();
    setting.find(".js-save-changes").shouldNot(exist);
    return this;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Aggregations

SelenideElement (com.codeborne.selenide.SelenideElement)20 Test (org.junit.Test)4 QualityGate (org.sonar.wsclient.qualitygate.QualityGate)4 ProjectQualityGatePage (pageobjects.ProjectQualityGatePage)4 AbstractSelenideTest (com.evolveum.midpoint.testing.selenide.tests.AbstractSelenideTest)1 HashMap (java.util.HashMap)1 Test (org.testng.annotations.Test)1