Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5336 add cmt for badge #5468

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -14,7 +15,6 @@

public class SparklineAssert extends UIAssert<SparklineAssert, Sparkline> implements
MeasurementAssert<SparklineAssert, Sparkline>, FilledAssert<SparklineAssert, Sparkline> {
// @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<String> labels = element().getLabelTexts();
Expand Down Expand Up @@ -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;
}

Expand All @@ -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<String> labelTexts) {
jdiAssert(element().getLabelTexts(), Matchers.equalTo(labelTexts));
return this;
}

@JDIAction(value = "Assert that '{name}' labels match condition", isAssert = true)
public SparklineAssert labelTexts(Matcher<List<String>> 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));
Expand Down
Loading