From 5b09e51bf9d00f17a01bb88cd8cc0d3fbeba42e6 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Sun, 14 Apr 2024 13:08:36 -0500 Subject: [PATCH] #5336 add cmt for badge --- .../light/vuetify/asserts/SparklineAssert.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/SparklineAssert.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/SparklineAssert.java index 19118d6078..805d5a7aa9 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/SparklineAssert.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/SparklineAssert.java @@ -5,6 +5,7 @@ import com.epam.jdi.light.vuetify.elements.common.Sparkline; import com.epam.jdi.light.vuetify.interfaces.asserts.FilledAssert; import com.epam.jdi.light.vuetify.interfaces.asserts.MeasurementAssert; +import org.hamcrest.Matcher; import org.hamcrest.Matchers; import java.util.List; @@ -14,7 +15,6 @@ public class SparklineAssert extends UIAssert implements MeasurementAssert, FilledAssert { - // @todo #5048 Check method functionality doesn't look like common @JDIAction(value = "Assert that all '{name}' data point labels have a '{0}' prefix", isAssert = true) public SparklineAssert labelsPrefixedWith(String prefix) { List labels = element().getLabelTexts(); @@ -56,13 +56,13 @@ public SparklineAssert pathShapeNotEqualTo(String pathShape) { @JDIAction(value = "Assert that '{name}' has type bar", isAssert = true) public SparklineAssert bar() { - jdiAssert(element().isBar(), Matchers.is(true), "Element's type is not bar"); + jdiAssert(element().isBar(), Matchers.is(true), "Sparkline's type is not bar"); return this; } @JDIAction(value = "Assert that '{name}' has trend line", isAssert = true) public SparklineAssert trendline() { - jdiAssert(element().isTrendline(), Matchers.is(true), "Element's type is not trendline"); + jdiAssert(element().isTrendline(), Matchers.is(true), "Sparkline's type is not trendline"); return this; } @@ -74,22 +74,28 @@ public SparklineAssert labelFontSize(int labelFontSize) { @JDIAction(value = "Assert that '{name}' has visible labels", isAssert = true) public SparklineAssert labels() { - jdiAssert(element().hasLabels(), Matchers.is(true), "Element has no visible labels"); + jdiAssert(element().hasLabels(), Matchers.is(true), "Sparkline has no visible labels"); return this; } @JDIAction(value = "Assert that '{name}' has not visible labels", isAssert = true) public SparklineAssert noLabels() { - jdiAssert(element().hasLabels(), Matchers.is(false), "Element has visible labels"); + jdiAssert(element().hasLabels(), Matchers.is(false), "Sparkline has visible labels"); return this; } - @JDIAction(value = "Assert that '{name}' has visible labels", isAssert = true) + @JDIAction(value = "Assert that '{name}' has visible labels with texts", isAssert = true) public SparklineAssert labelTexts(List labelTexts) { jdiAssert(element().getLabelTexts(), Matchers.equalTo(labelTexts)); return this; } + @JDIAction(value = "Assert that '{name}' labels match condition", isAssert = true) + public SparklineAssert labelTexts(Matcher> labelTextMatcher) { + jdiAssert(element().getLabelTexts(), labelTextMatcher); + return this; + } + @JDIAction(value = "Assert that '{name}' has line width '{0}'", isAssert = true) public SparklineAssert lineWidth(int lineWidth) { jdiAssert(element().lineWidth(), Matchers.equalTo(lineWidth));