Skip to content

Commit 1d0442e

Browse files
committed
Merge branch 'master' into update_appium_client_9_0_0
2 parents 170b226 + 31d9f20 commit 1d0442e

File tree

87 files changed

+335
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+335
-335
lines changed

config/checkstyle/checkstyle.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,10 @@
333333
<property name="message" value="Check for null in reverse order" />
334334
<property name="id" value="ReverseOrderNullCheck_Error" />
335335
</module>
336+
<module name="RegexpSingleline">
337+
<property name="severity" value="error" />
338+
<property name="format" value="(?&lt;!\.)(css|hasClass|hasAttribute|attr|find|finds)\(" />
339+
<property name="message" value="core() should be used with these methods" />
340+
<property name="id" value="CoreMethodsUnused_Error" />
341+
</module>
336342
</module>

jdi-bdd-tests/src/main/java/io/github/com/custom/MenuItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
public class MenuItem extends UIElement {
66
@Override
77
public boolean isSelected() {
8-
return find("<<").hasClass("active");
8+
return core().find("<<").hasClass("active");
99
}
1010
}

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/common/Checkbox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void uncheck() {
3939
@Override
4040
public boolean isSelected() {
4141
boolean attribute = hasAttribute(ARIA_CHECKED) && attr(ARIA_CHECKED).equals("true");
42-
return hasClass("mat-checkbox-checked") || attribute || core().isSelected();
42+
return core().hasClass("mat-checkbox-checked") || attribute || core().isSelected();
4343
}
4444

4545
@JDIAction("Is '{name}' enabled")
@@ -82,7 +82,7 @@ public void click() {
8282

8383
@JDIAction("Is '{name}' indeterminate")
8484
public boolean isIndeterminate() {
85-
return hasClass("mat-checkbox-indeterminate") || attr(ARIA_CHECKED).equals("mixed");
85+
return core().hasClass("mat-checkbox-indeterminate") || attr(ARIA_CHECKED).equals("mixed");
8686
}
8787

8888
@Override

jdi-light-core/src/main/java/com/epam/jdi/light/elements/interfaces/base/HasLabel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ default String labelText() {
2525
*
2626
* @return boolean if there is displayed and existed label or not
2727
*/
28-
default Boolean hasLabel() {
28+
default boolean hasLabel() {
2929
return label().isExist() & label().isDisplayed();
3030
}
3131
}

jdi-light-html-tests/src/main/java/io/github/com/custom/MenuItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
public class MenuItem extends UIElement {
66
@Override
77
public boolean isSelected() {
8-
return find("<<").hasClass("active");
8+
return core().find("<<").hasClass("active");
99
}
1010
}

jdi-light-html/src/main/java/com/epam/jdi/light/ui/html/interfaces/HasImage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ default String imageLocator() {
1616
*/
1717
@JDIAction("Get '{name}' image")
1818
default Image image() {
19-
return new Image().setCore(Image.class, find(imageLocator()));
19+
return new Image().setCore(Image.class, core().find(imageLocator()));
2020
}
2121

2222
/**

jdi-light-material-ui-tests/src/main/java/io/github/com/custom/elements/CustomStepContent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ public CustomStepContent(UIElement root) {
1313
}
1414

1515
public String stepLabel() {
16-
return find(LABEL_LOCATOR).text();
16+
return core().find(LABEL_LOCATOR).text();
1717
}
1818

1919
public MUIButton nextStep() {
20-
return new MUIButton().setCore(MUIButton.class, find(NEXT_LOCATOR));
20+
return new MUIButton().setCore(MUIButton.class, core().find(NEXT_LOCATOR));
2121
}
2222
public void goToNextStep() {
2323
this.nextStep().click();
2424
}
2525

2626
public MUIButton backStep() {
27-
return new MUIButton().setCore(MUIButton.class, find(BACK_LOCATOR));
27+
return new MUIButton().setCore(MUIButton.class, core().find(BACK_LOCATOR));
2828
}
2929
public void goToBackStep() {
3030
this.backStep().click();

jdi-light-material-ui-tests/src/main/java/io/github/com/custom/elements/table/CollapsingTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void expandRow(int rowNum) {
8383

8484
buttons.get(rowNum).click();
8585
By tableLocator = By.xpath(String.format("//tbody/tr[%d]//table", rowNum * tableRowMultiplier));
86-
InnerTable innerTable = new InnerTable().setCore(InnerTable.class, find(tableLocator));
86+
InnerTable innerTable = new InnerTable().setCore(InnerTable.class, core().find(tableLocator));
8787
innerTables[rowNum - 1] = innerTable;
8888
}
8989

jdi-light-material-ui/src/main/java/com/epam/jdi/light/material/elements/displaydata/Avatar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class Avatar extends UIBaseElement<AvatarAssert> implements HasImage, Has
2727
@JDIAction("Get avatar '{name}'s icon")
2828
@Override
2929
public Icon icon() {
30-
return new Icon().setCore(Icon.class, find(".MuiSvgIcon-root"));
30+
return new Icon().setCore(Icon.class, core().find(".MuiSvgIcon-root"));
3131
}
3232

3333
@Override

jdi-light-material-ui/src/main/java/com/epam/jdi/light/material/elements/displaydata/Badge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public <T extends UIElement> T content(Class<T> clazz) {
3939
*/
4040
@JDIAction("Check that '{name}' has a dot")
4141
public boolean hasDot() {
42-
return core().finds(MUI_BADGE_DOT_LOCATOR).size() > 0;
42+
return !core().finds(MUI_BADGE_DOT_LOCATOR).isEmpty();
4343
}
4444

4545
@Override

0 commit comments

Comments
 (0)