Skip to content

Commit dff581e

Browse files
committed
Fix asserts
1 parent a14c031 commit dff581e

30 files changed

+238
-233
lines changed

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/AutoCompleteAssert.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,100 +14,100 @@
1414

1515
public class AutoCompleteAssert extends UIAssert<AutoCompleteAssert, AutoComplete> implements ITextAssert<AutoCompleteAssert> {
1616

17-
@JDIAction("Assert that '{name}' is expanded")
17+
@JDIAction(value = "Assert that '{name}' is expanded", isAssert = true)
1818
public AutoCompleteAssert expanded() {
1919
jdiAssert(element().expanded(), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
2020
return this;
2121
}
2222

23-
@JDIAction("Assert that '{name}' is collapsed")
23+
@JDIAction(value = "Assert that '{name}' is collapsed", isAssert = true)
2424
public AutoCompleteAssert collapsed() {
2525
jdiAssert(element().collapsed(), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
2626
return this;
2727
}
2828

29-
@JDIAction("Assert that '{name}' text {0}")
29+
@JDIAction(value = "Assert that '{name}' text {0}", isAssert = true)
3030
@Override
3131
public AutoCompleteAssert text(String expected) {
3232
jdiAssert(element().getText(), Matchers.is(expected));
3333
return this;
3434
}
3535

36-
@JDIAction("Assert that '{name}' text {0}")
36+
@JDIAction(value = "Assert that '{name}' text {0}", isAssert = true)
3737
@Override
3838
public AutoCompleteAssert text(Matcher<String> condition) {
3939
jdiAssert(element().getValue(), condition);
4040
return this;
4141
}
4242

43-
@JDIAction("Assert that '{name}' has placeholder {0}")
43+
@JDIAction(value = "Assert that '{name}' has placeholder {0}", isAssert = true)
4444
public AutoCompleteAssert placeholder(String expected) {
4545
jdiAssert(element().placeholder(), Matchers.is(expected));
4646
return this;
4747
}
4848

49-
@JDIAction("Assert that '{name} is mandatory")
49+
@JDIAction(value = "Assert that '{name} is mandatory", isAssert = true)
5050
public AutoCompleteAssert mandatory() {
5151
jdiAssert(element().isMandatory(), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
5252
return this;
5353
}
5454

55-
@JDIAction("Assert that '{name} is not mandatory")
55+
@JDIAction(value = "Assert that '{name} is not mandatory", isAssert = true)
5656
public AutoCompleteAssert notMandatory() {
5757
jdiAssert(element().isMandatory(), Matchers.is(false), "ERROR MESSAGE IS REQUIRED");
5858
return this;
5959
}
6060

61-
@JDIAction("Assert that '{name}' has empty value")
61+
@JDIAction(value = "Assert that '{name}' has empty value", isAssert = true)
6262
@Override
6363
public AutoCompleteAssert empty() {
6464
jdiAssert(element().getValue(), Matchers.is(""));
6565
return this;
6666
}
6767

68-
@JDIAction("Assert that '{name} is invalid")
68+
@JDIAction(value = "Assert that '{name} is invalid", isAssert = true)
6969
public AutoCompleteAssert invalid() {
7070
jdiAssert(element().isInvalidated(), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
7171
return this;
7272
}
7373

74-
@JDIAction("Assert that '{name} is valid")
74+
@JDIAction(value = "Assert that '{name} is valid", isAssert = true)
7575
public AutoCompleteAssert valid() {
7676
jdiAssert(element().isInvalidated(), Matchers.is(false), "ERROR MESSAGE IS REQUIRED");
7777
return this;
7878
}
7979

80-
@JDIAction("Assert that '{name}' has display value")
80+
@JDIAction(value = "Assert that '{name}' has display value", isAssert = true)
8181
public AutoCompleteAssert displayValue(String expected) {
8282
jdiAssert(element().getValue(), Matchers.is(expected));
8383
return this;
8484
}
8585

86-
@JDIAction("Assert that '{name}' has options")
86+
@JDIAction(value = "Assert that '{name}' has options", isAssert = true)
8787
public AutoCompleteAssert options(List<String> options) {
8888
jdiAssert(element().options(), Matchers.is(options));
8989
return this;
9090
}
9191

92-
@JDIAction("Assert that '{name}' has groups")
92+
@JDIAction(value = "Assert that '{name}' has groups", isAssert = true)
9393
public AutoCompleteAssert groups(List<String> groups) {
9494
jdiAssert(element().groups(), Matchers.is(groups));
9595
return this;
9696
}
9797

98-
@JDIAction("Assert that '{name}' has groups and options")
98+
@JDIAction(value = "Assert that '{name}' has groups and options", isAssert = true)
9999
public AutoCompleteAssert groupsAndOptions(Map<String, List<String>> expectedGroupsAndOptions) {
100100
jdiAssert(element().groupsAndOptionsValues(), Matchers.is(expectedGroupsAndOptions));
101101
return this;
102102
}
103103

104-
@JDIAction("Assert that '{name}' has the {0} option being highlighted")
104+
@JDIAction(value = "Assert that '{name}' has the {0} option being highlighted", isAssert = true)
105105
public AutoCompleteAssert optionHighlighted(String option) {
106106
jdiAssert(element().isOptionHighlighted(option), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
107107
return this;
108108
}
109109

110-
@JDIAction("Assert that '{name}' has the {0} option being not highlighted")
110+
@JDIAction(value = "Assert that '{name}' has the {0} option being not highlighted", isAssert = true)
111111
public AutoCompleteAssert optionNotHighlighted(String option) {
112112
jdiAssert(element().isOptionHighlighted(option), Matchers.is(false), "ERROR MESSAGE IS REQUIRED");
113113
return this;

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/BadgeAssert.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
public class BadgeAssert extends UIAssert<BadgeAssert, Badge> {
1111

12-
@JDIAction("Assert that '{name}' has '{0}' color")
12+
@JDIAction(value = "Assert that '{name}' has '{0}' color", isAssert = true)
1313
public BadgeAssert color(String value) {
1414
String actualColor = element().color();
1515
jdiAssert(actualColor, Matchers.equalTo(value));
1616
return this;
1717
}
1818

19-
@JDIAction("Assert that '{name}' has text {0}")
19+
@JDIAction(value = "Assert that '{name}' has text {0}", isAssert = true)
2020
public BadgeAssert text(String value) {
2121
final String actualText = element().getText();
2222
jdiAssert(actualText, Matchers.is(value));

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/BottomSheetAssert.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
public class BottomSheetAssert extends UIAssert<BottomSheetAssert, BottomSheet> {
1616

17-
@JDIAction("Assert that '{name}' has values '{0}'")
17+
@JDIAction(value = "Assert that '{name}' has values '{0}'", isAssert = true)
1818
public BottomSheetAssert values(final Matcher<? super List<String>> condition) {
1919
jdiAssert(element().values(), condition);
2020
return this;

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/ButtonAssert.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,47 @@
1212

1313
public class ButtonAssert extends UIAssert<ButtonAssert, Button> implements HasBadgeAssert {
1414

15-
@JDIAction("Assert that '{name}' has text '{0}'")
15+
@JDIAction(value = "Assert that '{name}' has text '{0}'", isAssert = true)
1616
public ButtonAssert text(String expectedText) {
1717
jdiAssert(element().text(), Matchers.is(expectedText));
1818
return this;
1919
}
2020

21-
@JDIAction("Assert that '{name}' is focused")
21+
@JDIAction(value = "Assert that '{name}' is focused", isAssert = true)
2222
public ButtonAssert focused() {
2323
boolean actualFocused = element().focused();
2424
jdiAssert(actualFocused, Matchers.is(true),
2525
"Element is not focused");
2626
return this;
2727
}
2828

29-
@JDIAction("Assert that '{name}' color is '{0}'")
29+
@JDIAction(value = "Assert that '{name}' color is '{0}'", isAssert = true)
3030
public ButtonAssert color(String expectedColor) {
3131
jdiAssert(element().color(), Matchers.equalToIgnoringCase(expectedColor.toLowerCase()));
3232
return this;
3333
}
3434

35-
@JDIAction("Assert that '{name}' color is '{0}'")
35+
@JDIAction(value = "Assert that '{name}' color is '{0}'", isAssert = true)
3636
public ButtonAssert color(AngularColors expectedColor) {
3737
jdiAssert(element().color(), Matchers.is(expectedColor.getColor()));
3838
return this;
3939
}
4040

41-
@JDIAction("Assert that '{name}' has default color")
41+
@JDIAction(value = "Assert that '{name}' has default color", isAssert = true)
4242
public ButtonAssert defaultColor() {
4343
jdiAssert(element().defaultColor(), Matchers.is(true),
4444
"Element doesn't have default color.");
4545
return this;
4646
}
4747

48-
@JDIAction("Assert that '{name}' has visual type '{0}'")
48+
@JDIAction(value = "Assert that '{name}' has visual type '{0}'", isAssert = true)
4949
public ButtonAssert visualType(ButtonsTypes expectedType) {
5050
ButtonsTypes actualVisualType = element().visualType();
5151
jdiAssert(actualVisualType.getType(), Matchers.is(expectedType.getType()));
5252
return this;
5353
}
5454

55-
@JDIAction("Assert that '{name}' has icon")
55+
@JDIAction(value = "Assert that '{name}' has icon", isAssert = true)
5656
public ButtonAssert hasIcon() {
5757
jdiAssert(element().hasIcon(), Matchers.is(true),
5858
"Element doesn't have icon inside");

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/ButtonToggleAssert.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,84 +9,84 @@
99

1010
public class ButtonToggleAssert extends UIAssert<ButtonToggleAssert, ButtonToggle> {
1111

12-
@JDIAction("Assert that '{name}' has '{0}' class")
12+
@JDIAction(value = "Assert that '{name}' has '{0}' class", isAssert = true)
1313
public ButtonToggleAssert assertButtonToggleIsSelected(String value) {
1414
jdiAssert(element().isButtonToggleSelected(value), Matchers.is(true),
1515
"Button toggle element is not selected");
1616
return this;
1717
}
1818

19-
@JDIAction("Assert that '{name}' has '{0}' class")
19+
@JDIAction(value = "Assert that '{name}' has '{0}' class", isAssert = true)
2020
public ButtonToggleAssert assertButtonToggleIsNotSelected(String value) {
2121
jdiAssert(element().isButtonToggleSelected(value), Matchers.is(false),
2222
"Button toggle element is selected");
2323
return this;
2424
}
2525

26-
@JDIAction("Assert that '{name}' has attr '{0}'")
26+
@JDIAction(value = "Assert that '{name}' has attr '{0}'", isAssert = true)
2727
public ButtonToggleAssert assertButtonToggleButtonIsPressed(String value) {
2828
jdiAssert(element().isButtonToggleButtonPressed(value), Matchers.is(true),
2929
"Button toggle element is not pressed");
3030
return this;
3131
}
3232

33-
@JDIAction("Assert that '{name}' with value '{0}' has text '{1}'")
33+
@JDIAction(value = "Assert that '{name}' with value '{0}' has text '{1}'", isAssert = true)
3434
public ButtonToggleAssert assertButtonToggleButtonHasText(String value, String text) {
3535
jdiAssert(element().buttonToggleHasText(value, text), Matchers.is(true),
3636
"Button toggle element text is not equal " + text);
3737
return this;
3838
}
3939

40-
@JDIAction("Assert that '{name}' has value '{0}'")
40+
@JDIAction(value = "Assert that '{name}' has value '{0}'", isAssert = true)
4141
public ButtonToggleAssert assertButtonToggleHasValue(String value) {
4242
jdiAssert(element().buttonToggleHasValue(value), Matchers.is(true),
4343
"Button toggle element value is not equal " + value);
4444
return this;
4545
}
4646

47-
@JDIAction("Assert that '{name}' with value '{0}' has aria-label '{1}'")
47+
@JDIAction(value = "Assert that '{name}' with value '{0}' has aria-label '{1}'", isAssert = true)
4848
public ButtonToggleAssert assertButtonToggleHasAriaLabel(String value, String ariaLabel) {
4949
jdiAssert(element().buttonToggleHasAriaLabel(value, ariaLabel), Matchers.is(true),
5050
"Button toggle aria-label is not equal " + ariaLabel);
5151
return this;
5252
}
5353

54-
@JDIAction("Assert that '{name}' has attr legacy appearance")
54+
@JDIAction(value = "Assert that '{name}' has attr legacy appearance", isAssert = true)
5555
public ButtonToggleAssert assertButtonToggleHasLegacyAppearance() {
5656
jdiAssert(element().buttonToggleHasLegacyAppearance(), Matchers.is(true),
5757
"Button toggle appearance is not legacy");
5858
return this;
5959
}
6060

61-
@JDIAction("Assert that '{name} is disabled'")
61+
@JDIAction(value = "Assert that '{name} is disabled'", isAssert = true)
6262
public ButtonToggleAssert assertButtonToggleIsDisabled() {
6363
jdiAssert(element().buttonToggleDisabled(), Matchers.is(true),
6464
"Button toggle is enabled");
6565
return this;
6666
}
6767

68-
@JDIAction("Assert that '{name}' in button-toggle is disabled")
68+
@JDIAction(value = "Assert that '{name}' in button-toggle is disabled", isAssert = true)
6969
public ButtonToggleAssert assertButtonInButtonToggleIsDisabled(String value) {
7070
jdiAssert(element().isButtonToggleDisabled(value), Matchers.is(true),
7171
"Button toggle element is enabled");
7272
return this;
7373
}
7474

75-
@JDIAction("Assert that '{name}' is vertical")
75+
@JDIAction(value = "Assert that '{name}' is vertical", isAssert = true)
7676
public ButtonToggleAssert assertButtonToggleVertical() {
7777
jdiAssert(element().buttonToggleVertical(), Matchers.is(true),
7878
"Button toggle is horizontal");
7979
return this;
8080
}
8181

82-
@JDIAction("Assert that '{name}' has ripple effect")
82+
@JDIAction(value = "Assert that '{name}' has ripple effect", isAssert = true)
8383
public ButtonToggleAssert assertButtonToggleWithRipple(String value) {
8484
jdiAssert(element().buttonToggleHasNoRippleEffect(value), Matchers.is(false),
8585
"Button toggle element does not have ripple effect");
8686
return this;
8787
}
8888

89-
@JDIAction("Assert that '{name}' has no ripple effect")
89+
@JDIAction(value = "Assert that '{name}' has no ripple effect", isAssert = true)
9090
public ButtonToggleAssert assertButtonToggleNoRipple(String value) {
9191
jdiAssert(element().buttonToggleHasNoRippleEffect(value), Matchers.is(true),
9292
"Button toggle element has ripple effect");

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/CardAssert.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert;
99

1010
public class CardAssert extends UIAssert<CardAssert, Card> {
11-
@JDIAction("Assert that '{name}' has text '{0}'")
11+
@JDIAction(value = "Assert that '{name}' has text '{0}'", isAssert = true)
1212
public CardAssert assertCardText(String value) {
1313
jdiAssert(element().getCardText().equals(value), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
1414
return this;
1515
}
1616

17-
@JDIAction("Assert that '{name}' alt image attribute has text '{0}'")
17+
@JDIAction(value = "Assert that '{name}' alt image attribute has text '{0}'", isAssert = true)
1818
public CardAssert assertAltImageAttribute(String value) {
1919
jdiAssert(element().getImage().getAttribute("alt").contains(value), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
2020
return this;
2121
}
2222

23-
@JDIAction("Assert that '{name}' src image attribute has text '{0}'")
23+
@JDIAction(value = "Assert that '{name}' src image attribute has text '{0}'", isAssert = true)
2424
public CardAssert assertSrcImageAttribute(String value) {
2525
jdiAssert(element().getImage().getAttribute("src").contains(value), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
2626
return this;
2727
}
2828

29-
@JDIAction("Assert that '{name}' has '{0}' buttons")
29+
@JDIAction(value = "Assert that '{name}' has '{0}' buttons", isAssert = true)
3030
public CardAssert assertNumberOfButtonsOnCard(int number) {
3131
jdiAssert(element().getButtons().size() == number, Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
3232
return this;

0 commit comments

Comments
 (0)