Skip to content

Commit 775d22a

Browse files
authored
Merge pull request #5279 from jdi-testing/remove_todo
Remove TODO's
2 parents 936eae0 + 28d52a9 commit 775d22a

File tree

13 files changed

+88
-120
lines changed

13 files changed

+88
-120
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ public class HtmlElementsPage extends WebPage {
8888
//endregion
8989

9090
//region Complex Elements
91-
// TODO add Enum
9291

9392
public static DropdownSelect dressCode;
9493
@UI("#dress-code") public static Dropdown dressCode2;

jdi-bdd-tests/src/test/resources/features/WebPage.feature

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ Feature: Checking Basic WebPage Actions
2828
When I scroll "10" px right
2929
And I scroll "5" px left
3030
Then the page scrolled by "5" px right
31-
# TODO
32-
#Scenario: zoom test
33-
# When I zoom in "2" times
34-
# Then the page is zoomed "2" times
3531

3632
Scenario: go back test
3733
When I go back

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public void inputWithACustomErrorStateMatcherTest() {
4444
@Test
4545
public void autoResizingTextAreaTest() {
4646
autoSizeTextArea.isDisplayed();
47-
// TODO FIX TEST
48-
// autoSizeTextArea.has().cssClass("cdktextareaautosize");
4947
autoSizeTextArea.setLines("line1", "line2");
5048
autoSizeTextArea.addNewLine("line3");
5149
autoSizeTextArea.is().text("line1\nline2\nline3");

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -199,29 +199,4 @@ default String cell(String colName, String rowName) {
199199
}
200200
// endregion
201201

202-
// region Matchers
203-
//default Line row(Matcher<String> matcher) {
204-
// return LinqUtils.first(rows(), matcher::matches);
205-
//}
206-
//default List<Line> rows(Matcher<? super String> matcher) {
207-
// return LinqUtils.filter(rows(), matcher::matches);
208-
//}
209-
//default Line column(Matcher<String> matcher) {
210-
// return LinqUtils.first(columns(), matcher::matches);
211-
//}
212-
//default List<Line> columns(Matcher<? super String> matcher) {
213-
// return LinqUtils.filter(columns(), matcher::matches);
214-
//}
215-
//default UIElement cell(Matcher<String> matcher) {
216-
// return LinqUtils.first(webCells(), matcher::matches);
217-
//}
218-
//default List<UIElement> cells(Matcher<? super String> matcher) {
219-
// return LinqUtils.filter(webCells(), matcher::matches);
220-
//}
221-
// endregion
222-
223-
// region TableMatchers
224-
// TODO
225-
// endregion
226-
227202
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ public class HtmlElementsPage extends WebPage {
9090
// @UI("#height") public static NumberSelector height;
9191

9292
//region Complex Elements
93-
// TODO add Enum
94-
9593
// @UI("#dress-code") public static Dropdown dressCode;
9694
public static DropdownSelect dressCode;
9795
@UI("#dress-code") public static Dropdown dressCode2;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* Email: [email protected]; Skype: roman.iovlev
1818
*/
1919

20-
// TODO
2120
public class ActionsCloseTests implements TestsInit {
2221

2322
@BeforeMethod

jdi-light-vuetify-tests/src/main/java/io/github/com/pages/AutocompletesPage.java

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,25 @@
99

1010
public class AutocompletesPage extends VuetifyPage {
1111

12-
@JAutocomplete(root = "//div[@id='style']/div[2]//div[2]/div[contains(@class, 'v-autocomplete')]",
13-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[@class='v-list-item__title']")
12+
@UI("//div[@id='style']/div[2]//div[2]/div[contains(@class, 'v-autocomplete')]")
1413
public static Autocomplete lightDenseShapedOutlinedAutocomplete;
1514

16-
@JAutocomplete(root = "//div[@id='style']/div[2]//div[3]/div[contains(@class, 'v-autocomplete')]",
17-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[@class='v-list-item__title']")
15+
@UI("//div[@id='style']/div[2]//div[3]/div[contains(@class, 'v-autocomplete')]")
1816
public static Autocomplete lightDenseFilledRoundedAutocomplete;
1917

20-
@JAutocomplete(root = "//div[@id='style']/div[3]//div[4]/div[contains(@class, 'v-autocomplete')]",
21-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[@class='v-list-item__title']")
18+
@UI("//div[@id='style']/div[3]//div[4]/div[contains(@class, 'v-autocomplete')]")
2219
public static Autocomplete darkSoloAutocomplete;
2320

24-
@JAutocomplete(root = "//div[@id='style']/div[3]//div[5]/div[contains(@class, 'v-autocomplete')]",
25-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[@class='v-list-item__title']")
21+
@UI("//div[@id='style']/div[3]//div[5]/div[contains(@class, 'v-autocomplete')]")
2622
public static Autocomplete darkSoloInvertedAutocomplete;
2723

28-
@JAutocomplete(root = "//div[@id='functionality']//div[1]/div[contains(@class, 'v-autocomplete')]",
29-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[@class='v-list-item__title']")
24+
@UI("//div[@id='functionality']//div[1]/div[contains(@class, 'v-autocomplete')]")
3025
public static Autocomplete disabledAutocomplete;
3126

32-
@JAutocomplete(root = "//div[@id='functionality']//div[2]/div[contains(@class, 'v-autocomplete')]",
33-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[@class='v-list-item__title']")
27+
@UI("//div[@id='functionality']//div[2]/div[contains(@class, 'v-autocomplete')]")
3428
public static Autocomplete clearableAutocomplete;
3529

36-
@JAutocomplete(root = "//div[@id='functionality']//div[3]/div[contains(@class, 'v-autocomplete')]",
37-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[contains(@class,'v-list-item')]")
30+
@UI("//div[@id='functionality']//div[3]/div[contains(@class, 'v-autocomplete')]")
3831
public static Autocomplete autoselectAutocomplete;
3932

4033
@UI("#filter .v-btn--round")
@@ -43,21 +36,16 @@ public class AutocompletesPage extends VuetifyPage {
4336
@UI("#filter .v-input")
4437
public static Input filterName;
4538

46-
@JAutocomplete(
47-
root = "#filter .v-autocomplete",
48-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[@class='v-list-item__title']"
49-
)
39+
@UI("#filter .v-autocomplete")
5040
public static Autocomplete filterStateAutocomplete;
5141

5242
@UI("#filter .v-btn.success")
5343
public static Button filterSaveButton;
5444

55-
@JAutocomplete(root = "#slots .v-autocomplete",
56-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[contains(@class,'v-list-item')]")
45+
@UI("#slots .v-autocomplete")
5746
public static Autocomplete selectAutocomplete;
5847

59-
@JAutocomplete(root = "#api .v-autocomplete",
60-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[contains(@class,'v-list-item')]")
48+
@UI("#api .v-autocomplete")
6149
public static Autocomplete publicApiAutocomplete;
6250

6351
@UI("#api .v-list-item__title")
@@ -66,7 +54,6 @@ public class AutocompletesPage extends VuetifyPage {
6654
@UI("//span[text()[contains(.,'Clear')]]")
6755
public static Button clearApiButton;
6856

69-
@JAutocomplete(root = "#async .v-autocomplete",
70-
listItems = "//div[contains(@class, 'v-autocomplete__content') and not(contains(@style, 'display'))]//div[contains(@class,'v-list-item')]")
57+
@UI("#async .v-autocomplete")
7158
public static Autocomplete asynchronousItemsAutocomplete;
7259
}

jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/complex/AutocompletesTests.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,28 @@ public void styleAutocompleteTest() {
4545
.shaped()
4646
.outlined();
4747
lightDenseShapedOutlinedAutocomplete.expand();
48-
lightDenseShapedOutlinedAutocomplete.listItems().has().values(list);
48+
lightDenseShapedOutlinedAutocomplete.has().options(list);
4949
lightDenseShapedOutlinedAutocomplete.close();
5050

5151
lightDenseFilledRoundedAutocomplete.is()
5252
.filled()
5353
.rounded();
5454
lightDenseFilledRoundedAutocomplete.expand();
55-
lightDenseFilledRoundedAutocomplete.listItems().has().values(list);
55+
lightDenseFilledRoundedAutocomplete.has().options(list);
5656
lightDenseFilledRoundedAutocomplete.close();
5757

5858
darkSoloAutocomplete.is()
5959
.dark()
6060
.solo();
6161
darkSoloAutocomplete.expand();
62-
darkSoloAutocomplete.listItems().has().values(list);
62+
darkSoloAutocomplete.has().options(list);
6363
darkSoloAutocomplete.close();
6464

6565
darkSoloInvertedAutocomplete.is()
6666
.dark()
6767
.soloInverted();
6868
darkSoloInvertedAutocomplete.expand();
69-
darkSoloInvertedAutocomplete.listItems().has().values(list);
69+
darkSoloInvertedAutocomplete.has().options(list);
7070
darkSoloInvertedAutocomplete.close();
7171
}
7272

@@ -78,11 +78,10 @@ public void functionalityAutocompleteTest() {
7878
clearableAutocomplete.expand();
7979
clearableAutocomplete.select("fizz");
8080
clearableAutocomplete.clickClear();
81-
clearableAutocomplete.listItems().isDisplayed();
8281
clearableAutocomplete.close();
8382

8483
autoselectAutocomplete.typeText("f");
85-
autoselectAutocomplete.listItems().has().values("foo", "fizz");
84+
autoselectAutocomplete.has().options(Arrays.asList("foo", "fizz"));
8685
autoselectAutocomplete.input().sendKeys(Keys.ENTER);
8786
autoselectAutocomplete.has().selected("foo");
8887
}

jdi-light-vuetify/pom.xml

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

77
<artifactId>jdi-light-vuetify</artifactId>
88
<packaging>jar</packaging>
9-
<name>JDI Light Vuetify</name>
9+
<name>JDI Light Vuetify v2</name>
1010
<version>1.5.3-SNAPSHOT</version>
1111
<groupId>com.epam.jdi</groupId>
1212
<url>https://github.com/jdi-testing</url>

jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/AutocompleteAssert.java

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,81 +2,71 @@
22

33
import com.epam.jdi.light.asserts.generic.UIAssert;
44
import com.epam.jdi.light.common.JDIAction;
5+
import com.epam.jdi.light.elements.interfaces.common.IsText;
56
import com.epam.jdi.light.vuetify.elements.complex.Autocomplete;
6-
import com.jdiai.tools.Timer;
77
import org.hamcrest.Matchers;
88

99
import java.util.List;
10+
import java.util.stream.Collectors;
1011

1112
import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert;
1213

1314
public class AutocompleteAssert extends UIAssert<AutocompleteAssert, Autocomplete> {
1415

1516
@JDIAction("Assert that '{name}' is expanded")
1617
public AutocompleteAssert expanded() {
17-
new Timer(base().getTimeout() * 1000L)
18-
.wait(() -> element().listItems().isDisplayed());
1918
jdiAssert(element().isExpanded(), Matchers.is(true), "Autocomplete is not expanded");
2019
return this;
2120
}
2221

2322
@JDIAction("Assert that '{name}' is closed")
2423
public AutocompleteAssert closed() {
25-
new Timer(base().getTimeout() * 1000L)
26-
.wait(() -> element().root().isDisplayed());
2724
jdiAssert(element().isExpanded(), Matchers.is(false), "Autocomplete is not closed");
2825
return this;
2926
}
3027

3128
@JDIAction("Assert that '{name}' is selected")
3229
public AutocompleteAssert selected(String value) {
33-
new Timer(base().getTimeout() * 1000L)
34-
.wait(() -> element().value().isDisplayed());
35-
jdiAssert(element().isSelected(value), Matchers.is(true),
36-
"Autocomplete value " + value + " is not selected");
30+
jdiAssert(element().selected().get(0), Matchers.is(value));
31+
return this;
32+
}
33+
34+
@JDIAction("Assert that '{name}' is selected")
35+
public AutocompleteAssert options(List<String> values) {
36+
jdiAssert(element().options().stream().map(IsText::getText).collect(Collectors.toList()),
37+
Matchers.is(values));
3738
return this;
3839
}
3940

40-
// TODO fix this assertion and create a method to get the list of selected elements
4141
@JDIAction("Assert that '{name}' is selected")
4242
public AutocompleteAssert selected(List<String> values) {
43-
new Timer(base().getTimeout() * 1000L)
44-
.wait(() -> element().value().isDisplayed());
4543
jdiAssert(element().isSelected(values), Matchers.is(true), "Autocomplete doesn't have selected value");
4644
return this;
4745
}
4846

4947
@JDIAction("Assert that '{name}' is not selected")
5048
public AutocompleteAssert notSelected(String value) {
51-
new Timer(base().getTimeout() * 1000L)
52-
.wait(() -> element().isDisplayed());
5349
jdiAssert(element().isSelected(value), Matchers.is(false),
5450
"Autocomplete doesn't have selected value " + value);
5551
return this;
5652
}
5753

5854
@JDIAction("Assert that '{name}' is not selected")
5955
public AutocompleteAssert notSelected(List<String> values) {
60-
new Timer(base().getTimeout() * 1000L)
61-
.wait(() -> element().isDisplayed());
6256
jdiAssert(element().isSelected(values), Matchers.is(false),
6357
"Autocomplete doesn't have selected values ");
6458
return this;
6559
}
6660

6761
@JDIAction("Assert that '{name}' is disabled")
6862
public AutocompleteAssert disabled() {
69-
new Timer(base().getTimeout() * 1000L)
70-
.wait(() -> element().isDisplayed());
7163
jdiAssert(element().isDisabled(), Matchers.is(true),
7264
"Autocomplete is not disabled");
7365
return this;
7466
}
7567

7668
@JDIAction("Assert that '{name}' is expanded")
7769
public AutocompleteAssert active() {
78-
new Timer(base().getTimeout() * 1000L)
79-
.wait(() -> element().isDisplayed());
8070
jdiAssert(element().isDisabled(), Matchers.is(false),
8171
"Autocomplete is not active");
8272
return this;

0 commit comments

Comments
 (0)