Skip to content

Commit 39203d8

Browse files
committed
Merge branch 'master' into angular_rework_development
# Conflicts: # jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/common/BasicButtonTests.java
2 parents cb5bbfb + 561bcb9 commit 39203d8

File tree

95 files changed

+427
-467
lines changed

Some content is hidden

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

95 files changed

+427
-467
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://mit-license.org/)
44
[![stackoverflow](https://img.shields.io/badge/stackoverflow-jdi-blue.svg?style=flat)](http://stackoverflow.com/questions/tagged/jdi)
5+
[![PDD Status](https://www.0pdd.com/svg?name=jdi-testing/jdi-light)](https://www.0pdd.com/p?name=jdi-testing/jdi-light)
56
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjdi-testing%2Fjdi-light.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjdi-testing%2Fjdi-light?ref=badge_shield)
67
[![SLACK](https://img.shields.io/badge/slack-community-green.svg)](https://join.slack.com/t/jdi-family/shared_invite/zt-toag8fgg-ppPiW~lZDU9873JAiSwTJw)
78
## Important

config/checkstyle/checkstyle.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,41 +308,55 @@
308308
<property name="format" value="\s+$" />
309309
<property name="message" value="Line has trailing spaces" />
310310
<property name="id" value="TrailingSpaces_Error" />
311+
<property name="fileExtensions" value="java"/>
311312
</module>
312313
<module name="RegexpSingleline">
313314
<property name="severity" value="error" />
314315
<property name="format" value="\.exit\(|\.halt\(|\.traceMethodCalls\(|\.traceInstructions\(|\.runFinalization\(|\.gc\(" />
315316
<property name="message" value="Suspicious invocation of dangerous JVM level operation" />
316317
<property name="id" value="DangerousJVMOperation_Error" />
318+
<property name="fileExtensions" value="java"/>
317319
</module>
318320
<module name="RegexpSingleline">
319321
<property name="severity" value="error" />
320322
<property name="format" value="long serialVersionUID" />
321323
<property name="message" value="Do not declare a serialVersionUID" />
322324
<property name="id" value="SerialVersionUIDDeclared_Error" />
325+
<property name="fileExtensions" value="java"/>
323326
</module>
324327
<module name="RegexpSingleline">
325328
<property name="severity" value="error" />
326329
<property name="format" value="\.printStackTrace\(\)|System\.out|System\.err|org\.apache\.commons\.logging\.Log|java\.util\.logging" />
327330
<property name="message" value="use SLF4J for logging" />
328331
<property name="id" value="InvalidLoggingMethod_Error" />
332+
<property name="fileExtensions" value="java"/>
329333
</module>
330334
<module name="RegexpSingleline">
331335
<property name="severity" value="error" />
332336
<property name="format" value="null !=|null ==" />
333337
<property name="message" value="Check for null in reverse order" />
334338
<property name="id" value="ReverseOrderNullCheck_Error" />
339+
<property name="fileExtensions" value="java"/>
335340
</module>
336341
<module name="RegexpSingleline">
337342
<property name="severity" value="error" />
338343
<property name="format" value="(?&lt;!\.)(css|hasClass|hasAttribute|attr|find|finds)\((?!@|\)|String)" />
339344
<property name="message" value="core() should be used with these methods" />
340345
<property name="id" value="CoreMethodsUnused_Error" />
346+
<property name="fileExtensions" value="java"/>
341347
</module>
342348
<module name="RegexpSingleline">
343349
<property name="severity" value="error" />
344350
<property name="format" value="\.is\((true|false)\)\)" />
345351
<property name="message" value="Matcher.is(true/false) should be used with error message" />
346352
<property name="id" value="MatcherBooleanWithoutMessage_Error" />
353+
<property name="fileExtensions" value="java"/>
354+
</module>
355+
<module name="RegexpSingleline">
356+
<property name="severity" value="error" />
357+
<property name="format" value="throw new RuntimeExc" />
358+
<property name="message" value="Use `throw runtimeException('Error Message')` or `throw exception('Error message')`" />
359+
<property name="id" value="MatcherThrowingExceptions_Error" />
360+
<property name="fileExtensions" value="java"/>
347361
</module>
348362
</module>

jdi-bdd-tests/src/main/java/io/github/com/pages/MetalAndColorsPage.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
import com.epam.jdi.light.ui.html.elements.complex.MultiSelector;
1010

1111
public class MetalAndColorsPage extends WebPage {
12-
// TODO simple html dropdowns
13-
@UI(".uui-side-bar[name='log-sidebar']") public static LogSidebar logSidebar;
12+
@UI(".uui-side-bar[name='log-sidebar']") public static LogSidebar logSidebar;
1413
@JDropdown(root = "div[ui=dropdown]", value = ".filter-option",
1514
list = "li", expand = ".caret")
1615
public static Dropdown colors;

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/common/BasicButtonTests.java

Whitespace-only changes.

jdi-light-bootstrap/src/main/java/com/epam/jdi/light/ui/bootstrap/elements/complex/RadioButtons.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,13 @@ public class RadioButtons extends com.epam.jdi.light.ui.html.elements.complex.Ra
1616

1717
@Override
1818
public WebList list() {
19-
WebList radioBtnWebList = new WebList(base()).setup(b -> b.setSearchRule("Any", ANY_ELEMENT))
19+
return new WebList(base()).setup(b -> b.setSearchRule("Any", ANY_ELEMENT))
2020
.setUIElementName(LABEL);
21-
// TODO REFACTOR
22-
//radioBtnWebList.setClickArea(ACTION_CLICK);
23-
return radioBtnWebList;
2421
}
2522

2623
public WebList list(JFunc1<WebElement, Boolean> searchRule, ElementArea elementArea) {
27-
WebList radioBtnWebList = new WebList(base()).setup(jdiB -> jdiB.setSearchRule("UNDEFINED", searchRule))
24+
return new WebList(base()).setup(jdiB -> jdiB.setSearchRule("UNDEFINED", searchRule))
2825
.setUIElementName(LABEL);
29-
// TODO REFACTOR
30-
//radioBtnWebList.setClickArea(elementArea);
31-
return radioBtnWebList;
3226
}
3327

3428
}

jdi-light-core/src/main/java/com/epam/jdi/light/elements/complex/table/SmartTable.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ protected int getRowsCount() {
5656
return rows.get().size();
5757
if (columns.get().any())
5858
return columns.get().get(0).value.size();
59-
// TODO
6059
return column(startIndex.get()).size();
6160
}
6261
protected int getTableSize() {
@@ -84,7 +83,7 @@ public WebList headerUI() {
8483
}
8584
return $$(header, headerName);
8685
}
87-
// TODO
86+
8887
WebList firstRow = getRowByIndex(startIndex.get());
8988
if (firstRow.size() > 0) {
9089
this.header.setRule(() -> getRowByIndex(1).values());

jdi-light-core/src/main/java/com/epam/jdi/light/settings/WebSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ public static boolean hasDomain() {
9595
}
9696

9797
public static String TEST_GROUP = "";
98-
// TODO multi properties example
9998
public static Safe<String> TEST_NAME = new Safe<>((String) null);
10099
public static String useDriver(JFunc<WebDriver> driver) {
101100
return WebDriverFactory.useDriver(driver);

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,11 @@ public class StaticSite {
4747
@Css("[ui=label]") public static UIElement navigationElement;
4848
@WaitAfterAction
4949
@UI("//*[@ui='label']//*[contains(text(),'%s')]") public static WebList navigationS;
50-
//TODO
51-
//@UI("[ui=label][*'%s']") public static WebList navigationS;
50+
5251
@UI(".sidebar-menu [ui=label]") public static Menu leftMenu;
53-
//TODO
54-
//@UI(".sidebar-menu span<[*'%s']<<") public static Menu leftMenu;
52+
5553
@UI("//*[contains(@class,'sidebar-menu')]//span/..//*[text()='%s']/../..") public static WebList leftMenuList;
56-
//TODO
57-
//@UI(".sidebar-menu span<[*'%s']<<") public static WebList leftMenuList;
54+
5855
@UI(".sidebar-menu span") public static JList<MenuItem> menu;
5956
@NoInheritance
6057
@JMenu({"[ui=label][*'%s']", "[ui=label][*'%s']"}) public static Menu2D leftMenu2D;

jdi-light-html-tests/src/test/java/io/github/epam/html/tests/elements/common/LinkTests.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,66 +26,56 @@ public void before() {
2626
}
2727
String text = "Github JDI";
2828

29-
//TODO Performance issue
3029
@Test
3130
public void getTextTest() {
3231
assertEquals(githubLink.getText(), text);
3332
}
3433

35-
//TODO Performance issue
3634
@Test
3735
public void getValueTest() {
3836
assertEquals(githubLink.getValue(), text);
3937
}
4038

41-
//TODO Performance issue
4239
@Test
4340
public void getRefTest() {
4441
assertEquals(githubLink.ref(), "https://github.com/jdi-testing");
4542
}
4643

47-
//TODO Performance issue
4844
@Test
4945
public void getUrlTest() {
5046
assertEquals(githubLink.url().getPath(), "/jdi-testing");
5147
}
5248

53-
//TODO Performance issue
5449
@Test
5550
public void getAltTest() {
5651
assertEquals(githubLink.alt(), "Github JDI Link");
5752
}
5853

59-
//TODO Performance issue
6054
@Test
6155
public void clickTest() {
6256
githubLink.click();
6357
assertEquals(getUrl(), "https://github.com/jdi-testing");
6458
html5Page.open();
6559
}
6660

67-
//TODO Performance issue
6861
@Test
6962
public void isValidationTest() {
7063
githubLink.is().text(is(text));
7164
githubLink.is().text(equalToIgnoringCase("Github jdi"));
7265
githubLink.is().enabled();
7366
}
7467

75-
//TODO Performance issue
7668
@Test
7769
public void linkValidationTest() {
7870
githubLink.is().ref(containsString("github"));
7971
githubLink.is().alt(containsString("JDI"));
8072
}
8173

82-
//TODO Performance issue
8374
@Test
8475
public void assertValidationTest() {
8576
githubLink.assertThat().text(is(text));
8677
}
8778

88-
//TODO Performance issue
8979
@Test
9080
public void baseValidationTest() {
9181
baseValidation(githubLink);

jdi-light-html-tests/src/test/java/io/github/epam/html/tests/elements/common/TextFieldTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public void placeholderTest() {
8080
assertEquals(yourName.placeholder(), "Input name");
8181
}
8282

83-
//TODO Performance issue
8483
@Test
8584
public void disabledTest() {
8685
try {

jdi-light-html-tests/src/test/java/io/github/epam/html/tests/elements/complex/RadioLabelTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void assertValidationTest() {
6767
odds.assertThat().values(contains("1", "3", "5", "7"));
6868
}
6969

70-
// TODO this is not a test but points to improve
70+
// @todo #5048 Transform to test, now there is no validation
7171
@Test(enabled = false)
7272
public void problems() {
7373
odds.list();

jdi-light-html-tests/src/test/java/io/github/epam/html/tests/performance/SoftAsserts.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ public void checkboxSoftAssertTest() {
126126
public void dataTableSoftAssertTest() {
127127
try {
128128
usersPage.open();
129-
// TODO fix performance
130129
users.verify()
131130
.row(d -> d.user.contains("Ivannn"))
132131
.all().rows(d -> d.user.length() > 4)
@@ -144,7 +143,6 @@ public void dataTableSoftAssertTest() {
144143
public void customFailTest() {
145144
try {
146145
usersPage.open();
147-
// TODO fix performance
148146
users.verify()
149147
.row(d -> d.user.contains("Ivannn"))
150148
.all().rows(d -> d.user.length() > 4)

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/displaydata/BadgePage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class BadgePage extends WebPage {
1818
@UI("#secondaryColorBadge")
1919
public static Badge secondaryColorBadgeContainer;
2020

21+
// @todo #5297 Button should be used from ButtomGruop, not directly as single
2122
@UI(".MuiButtonGroup-root button[aria-label='reduce']")
2223
public static Button buttonReduce;
2324

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/displaydata/ChipsPage.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ public class ChipsPage extends WebPage {
1818
@UI("#lastDeleteInfo")
1919
public static Text lastDeleteBasicInfo;
2020

21+
// @todo #5297 Fix locator, it is not stable
2122
@UI("//h2[text()='Outlined Chips']/following-sibling::div/div/div[contains(@class, 'MuiChip-root')]")
2223
public static List<Chip> outlinedChips;
2324

25+
// @todo #5297 Fix to css locator
2426
@UI("//a[contains(@class, 'MuiChip-root')]")
2527
public static List<Chip> linkChips;
2628

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/displaydata/IconsPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class IconsPage extends WebPage {
1212
@UI(".MuiGrid-grid-xs-8 > svg")
1313
public static List<Icon> simpleIcons;
1414

15+
// @todo #5297 Fix locator to be more stable against div
1516
@UI("//p[@id='colorLastClick']/..//div/*")
1617
public static List<Icon> colorIcons;
1718

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/feedback/ProgressPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class ProgressPage extends WebPage {
1313
@JProgress(root = "#circularIndeterminateProgress")
1414
public static CircularProgress circularProgressIndeterminate;
1515

16+
// @todo #5297 Check locators with aria-valuenow, very stange to use them
1617
@JProgress(root = "div[aria-valuenow='25'][1]")
1718
public static CircularProgress circularProgressDeterminateWithValue25;
1819

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/inputs/ButtonGroupPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
public class ButtonGroupPage extends WebPage {
1111

12+
// @todo #5297 Check locators, the class is the same is for Button
1213
@UI("div[aria-label = 'outlined primary button group'] .MuiButton-root")
1314
public static ButtonGroup basicButtonGroup;
1415

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/inputs/DateTimePickersPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
public class DateTimePickersPage extends WebPage {
99

10+
// @todo #5297 Check if locators with classses can be used
1011
@UI("//*[@id = 'date-picker-inline-label']/parent::div")
1112
public static DateTimePicker inlineDatePicker;
1213

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/inputs/TextFieldPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
public class TextFieldPage extends WebPage {
1111

12+
// @todo #5297 Fix locators for more stable variant
1213
@UI("//input[@id='standard-required']/../..")
1314
public static TextField requiredTextField;
1415

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/layout/BoxPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
public class BoxPage extends WebPage {
99

10+
// @todo #5297 Do not see any Box class, do we really need this page?
1011
@UI(".MuiButton-contained")
1112
public static Button buttonContainedBox;
1213

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/layout/HiddenPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.epam.jdi.light.ui.html.elements.common.Text;
77

88
public class HiddenPage extends WebPage {
9+
// @todo #5297 Check the page usage
910
@UI(".MuiTypography-subtitle1")
1011
public static Text currentWidth;
1112

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/ContextMenuPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class ContextMenuPage extends WebPage {
1010
@UI("p.MuiTypography-root")
1111
public static Text pageText;
1212

13+
// @todo #5297 Check the locator, looks like it points to item, not for Menu
1314
@UI(".MuiMenuItem-root")
1415
public static Menu contextMenuList;
1516
}

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/TabPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class TabPage extends WebPage {
1010
@UI("h2+div[1] .MuiTabs-root")
1111
public static Tabs simpleTabs;
1212

13+
// @todo #5297 Fix locator to be more stable for layout
1314
@UI("//div[./h2[text()='Simple tabs']]/div[1]/div[@role='tabpanel' and not(@hidden)]")
1415
public static Container simplePanels;
1516

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/TemporaryDrawerPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
public class TemporaryDrawerPage extends WebPage {
88

9+
// @todo #5297 Check the locators for drawer, looks like they must be relative, while they a written as absolute
910
@JButtonWithDrawer(
1011
root = "//span[text() = 'left']/parent::button",
1112
drawer = "//div[contains(@class, 'MuiDrawer-root')][./div[contains(@class, 'MuiDrawer-paperAnchorLeft')]]"

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/surfaces/BackToTopAppBarPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
public class BackToTopAppBarPage extends WebPage {
99

10+
// @todo #5297 Check the locator, looks like it is not for AppBar (or use correct classname)
1011
@UI(".MuiBox-root[1]")
1112
public static AppBar backToTopAppBar;
1213

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/surfaces/CardPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class CardPage extends WebPage {
1818
@UI("#complexInteraction")
1919
public static ComplexInteractionCard complexCard;
2020

21+
// @todo #5297 Class should be created to describe the card with image or image is a legal part of the card
2122
@UI("#complexInteraction .MuiCardMedia-root")
2223
public static Image complexCardImage;
2324

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/utils/PopoverHoverFrame.java

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

88

99
public class PopoverHoverFrame extends Section {
10-
10+
// @todo #5297 Page is not used, check it
1111
@UI(".MuiTypography-root")
1212
public Typography labelToHover;
1313

jdi-light-material-ui-tests/src/main/java/io/github/com/pages/utils/TransitionPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
public class TransitionPage extends WebPage {
1111

12+
// @todo #5297 Check the locators
1213
@UI("//h2[text()='Collapse']/following::div[contains(@class,'MuiCollapse-root')]")
1314
public static List<Transition> collapseTransitions;
1415

0 commit comments

Comments
 (0)