diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-02-08 15:38:53 +0100 |
---|---|---|
committer | Guillaume Jambet <guillaume.jambet@gmail.com> | 2018-03-01 15:21:05 +0100 |
commit | 87ca6669cd77f57d0621c70e53adaa42350ff128 (patch) | |
tree | 108e601f1433330f81c319653b84cd9088d12773 /server/sonar-qa-util | |
parent | f44552d26beabb3a99e0483c575bc486a72ef8eb (diff) | |
download | sonarqube-87ca6669cd77f57d0621c70e53adaa42350ff128.tar.gz sonarqube-87ca6669cd77f57d0621c70e53adaa42350ff128.zip |
SONAR-10347 Create a BoxedGroupAccordion component and use it in system page
Diffstat (limited to 'server/sonar-qa-util')
-rw-r--r-- | server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SystemInfoPage.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SystemInfoPage.java b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SystemInfoPage.java index 9c9802e7e7f..857153eb517 100644 --- a/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SystemInfoPage.java +++ b/server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/pageobjects/SystemInfoPage.java @@ -21,26 +21,28 @@ package org.sonarqube.qa.util.pageobjects; import com.codeborne.selenide.CollectionCondition; import com.codeborne.selenide.Condition; -import com.codeborne.selenide.Selenide; +import com.codeborne.selenide.ElementsCollection; import com.codeborne.selenide.SelenideElement; +import static com.codeborne.selenide.Selenide.$; +import static com.codeborne.selenide.Selenide.$$; + public class SystemInfoPage { public SystemInfoPage() { - Selenide.$(".page-title").should(Condition.exist).shouldHave(Condition.text("System Info")); - } - - public SystemInfoPage shouldHaveCard(String title) { - Selenide.$$(".system-info-health-card-title").find(Condition.text(title)).should(Condition.exist); - return this; + $(".page-title").should(Condition.exist).shouldHave(Condition.text("System Info")); } public SystemInfoPage shouldHaveCards(String... titles) { - Selenide.$$(".system-info-health-card-title").shouldHave(CollectionCondition.texts(titles)); + getHealthCards().shouldHave(CollectionCondition.texts(titles)); return this; } public SystemInfoPageItem getCardItem(String card) { - SelenideElement cardTitle = Selenide.$$(".system-info-health-card-title").find(Condition.text(card)).should(Condition.exist); + SelenideElement cardTitle = getHealthCards().find(Condition.text(card)).should(Condition.exist); return new SystemInfoPageItem(cardTitle.parent().parent()); } + + private static ElementsCollection getHealthCards() { + return $$(".boxed-group-accordion-title"); + } } |