Skip to content

Commit 7e0a70f

Browse files
committed
4987-88-refactoringSelectMoveToNewPage
1 parent e1ee9e6 commit 7e0a70f

24 files changed

+96
-144
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import io.github.com.pages.ButtonsPage;
1010
import io.github.com.pages.ProgressBarPage;
1111
import io.github.com.pages.ProgressSpinnerPage;
12+
import io.github.com.pages.SelectPage;
1213

1314
@JSite("https://jdi-testing.github.io/jdi-light/angular-page/#/")
1415
public class StaticSite {
@@ -33,4 +34,7 @@ public class StaticSite {
3334

3435
@Url("autocompletes")
3536
public static AutocompletePage autocompletePage;
37+
38+
@Url("select")
39+
public static SelectPage selectPage;
3640
}

jdi-light-angular-tests/src/main/java/io/github/com/pages/AngularPage.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public class AngularPage extends WebPage {
2121
public static ToolbarSection toolbarSection;
2222
public static SlideToggleSection slideToggleSection;
2323
public static InputSection inputSection;
24-
public static SelectSection selectSection;
2524
public static ListSection listSection;
2625
public static GridListSection gridListSection;
2726
public static SnackbarSection snackbarSection;
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
1-
package io.github.com.pages.sections;
2-
3-
import com.epam.jdi.light.angular.elements.common.Checkbox;
4-
import com.epam.jdi.light.angular.elements.complex.MaterialSelector;
5-
import com.epam.jdi.light.angular.elements.complex.NativeSelector;
6-
import com.epam.jdi.light.elements.composite.Section;
7-
import com.epam.jdi.light.ui.html.elements.common.Text;
8-
9-
public class SelectSection extends Section {
10-
public static MaterialSelector basicMatSelect;
11-
public static NativeSelector basicNativeSelect;
12-
13-
public static MaterialSelector twoBindingSelect;
14-
public static Text selectBindingConfirm;
15-
16-
public static MaterialSelector formMatSelect;
17-
public static Text formMatSelectConfirm;
18-
19-
public static NativeSelector formNativeSelect;
20-
public static Text formNativeSelectConfirm;
21-
22-
public static MaterialSelector formMatFeatureSelect;
23-
public static NativeSelector formNativeFeatureSelect;
24-
25-
public static MaterialSelector disableMatSelect;
26-
public static NativeSelector disableNativeSelect;
27-
public static Checkbox disableCheckboxSelect;
28-
29-
public static MaterialSelector resetMatSelect;
30-
public static NativeSelector resetNativeSelect;
31-
32-
public static MaterialSelector optionGroupsMatSelect;
33-
public static NativeSelector optionGroupsNativeSelect;
34-
35-
public static MaterialSelector multipleSelect;
36-
37-
public static MaterialSelector customTriggerTextSelect;
38-
39-
public static MaterialSelector noOptionRippleSelect;
40-
41-
public static MaterialSelector customPanelStylingSelect;
42-
43-
public static MaterialSelector matErrorStateMatcherSelect;
44-
public static NativeSelector nativeErrorStateMatcherSelect;
45-
}
1+
package io.github.com.pages;
2+
3+
import com.epam.jdi.light.angular.elements.common.Checkbox;
4+
import com.epam.jdi.light.angular.elements.complex.MaterialSelector;
5+
import com.epam.jdi.light.angular.elements.complex.NativeSelector;
6+
import com.epam.jdi.light.ui.html.elements.common.Text;
7+
8+
public class SelectPage extends NewAngularPage {
9+
10+
public static MaterialSelector basicMatSelect;
11+
public static NativeSelector basicNativeSelect;
12+
13+
public static MaterialSelector twoBindingSelect;
14+
public static Text selectBindingConfirm;
15+
16+
public static MaterialSelector formMatSelect;
17+
public static Text formMatSelectConfirm;
18+
19+
public static NativeSelector formNativeSelect;
20+
public static Text formNativeSelectConfirm;
21+
22+
public static MaterialSelector formMatFeatureSelect;
23+
public static NativeSelector formNativeFeatureSelect;
24+
25+
public static MaterialSelector disableMatSelect;
26+
public static NativeSelector disableNativeSelect;
27+
public static Checkbox disableCheckboxSelect;
28+
29+
public static MaterialSelector resetMatSelect;
30+
public static NativeSelector resetNativeSelect;
31+
32+
public static MaterialSelector optionGroupsMatSelect;
33+
public static NativeSelector optionGroupsNativeSelect;
34+
35+
public static MaterialSelector multipleSelect;
36+
37+
public static MaterialSelector customTriggerTextSelect;
38+
39+
public static MaterialSelector noOptionRippleSelect;
40+
41+
public static MaterialSelector customPanelStylingSelect;
42+
43+
public static MaterialSelector matErrorStateMatcherSelect;
44+
public static NativeSelector nativeErrorStateMatcherSelect;
45+
46+
}

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/BasicMatSelectTests.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87
import java.util.Collections;
98

109
import static com.epam.jdi.light.settings.JDISettings.ELEMENT;
11-
import static io.github.com.StaticSite.angularPage;
12-
import static io.github.com.pages.sections.SelectSection.basicMatSelect;
10+
import static com.jdiai.tools.Timer.waitCondition;
11+
import static io.github.com.StaticSite.selectPage;
12+
import static io.github.com.pages.SelectPage.basicMatSelect;
1313
import static org.hamcrest.Matchers.hasItems;
1414

15-
// TODO Move to the new page
16-
@Ignore
1715
public class BasicMatSelectTests extends TestsSelectBase {
1816
@BeforeMethod(alwaysRun = true)
1917
public void before() {
20-
angularPage.shouldBeOpened();
21-
basicMatSelect.show();
18+
selectPage.open();
19+
waitCondition(() -> selectPage.isOpened());
20+
selectPage.checkOpened();
2221
}
2322

2423
@Test

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/BasicNativeSelectTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87
import java.util.Collections;
98

10-
import static io.github.com.pages.sections.SelectSection.basicNativeSelect;
9+
import static io.github.com.pages.SelectPage.basicNativeSelect;
1110
import static org.hamcrest.Matchers.*;
1211

13-
// TODO Move to the new page
14-
@Ignore
1512
public class BasicNativeSelectTests extends TestsSelectBase {
1613
@BeforeMethod(alwaysRun = true)
1714
public void before() {

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/CustomPanelStylingSelectTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

9-
import static io.github.com.pages.sections.SelectSection.customPanelStylingSelect;
8+
import static io.github.com.pages.SelectPage.customPanelStylingSelect;
109
import static org.hamcrest.Matchers.hasItems;
1110

12-
// TODO Move to the new page
13-
@Ignore
1411
public class CustomPanelStylingSelectTests extends TestsSelectBase {
1512
@BeforeMethod(alwaysRun = true)
1613
public void before() {

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/CustomTriggerTextSelectTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

9-
import static io.github.com.StaticSite.angularPage;
10-
import static io.github.com.pages.sections.SelectSection.customTriggerTextSelect;
8+
import static com.jdiai.tools.Timer.waitCondition;
9+
import static io.github.com.StaticSite.selectPage;
10+
import static io.github.com.pages.SelectPage.customTriggerTextSelect;
11+
1112

12-
// TODO Move to the new page
13-
@Ignore
1413
public class CustomTriggerTextSelectTests extends TestsSelectBase {
1514
private String[] multiOptions = new String[1];
1615

1716
@BeforeMethod(alwaysRun = true)
1817
public void before() {
19-
angularPage.shouldBeOpened();
20-
customTriggerTextSelect.show();
18+
selectPage.open();
19+
waitCondition(() -> selectPage.isOpened());
20+
selectPage.checkOpened();
2121
}
2222

2323
@Test

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/DisableMatSelectTests.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

98
import static com.epam.jdi.light.settings.JDISettings.ELEMENT;
10-
import static io.github.com.pages.sections.SelectSection.disableCheckboxSelect;
11-
import static io.github.com.pages.sections.SelectSection.disableMatSelect;
9+
import static io.github.com.pages.SelectPage.disableCheckboxSelect;
10+
import static io.github.com.pages.SelectPage.disableMatSelect;
1211

13-
// TODO Move to the new page
14-
@Ignore
1512
public class DisableMatSelectTests extends TestsSelectBase {
1613
private static final String ARIA_DISABLED = "aria-disabled";
1714
private static final String OPTION_2_DISABLED = "Option 2 (disabled)";

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/DisableNativeSelectTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

98
import static com.epam.jdi.light.settings.JDISettings.ELEMENT;
10-
import static io.github.com.pages.sections.SelectSection.disableNativeSelect;
9+
import static io.github.com.pages.SelectPage.disableNativeSelect;
1110

12-
// TODO Move to the new page
13-
@Ignore
1411
public class DisableNativeSelectTests extends TestsSelectBase {
1512
private static final String DISABLED = "disabled";
1613

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/FormMatFeatureSelectTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

9-
import static io.github.com.pages.sections.SelectSection.formMatFeatureSelect;
8+
import static io.github.com.pages.SelectPage.formMatFeatureSelect;
109
import static org.hamcrest.Matchers.matchesPattern;
1110

12-
// TODO Move to the new page
13-
@Ignore
1411
public class FormMatFeatureSelectTests extends TestsSelectBase {
1512
@BeforeMethod(alwaysRun = true)
1613
public void before() {

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/FormMatSelectTests.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87
import java.util.Collections;
98

109
import static com.epam.jdi.light.settings.JDISettings.ELEMENT;
11-
import static io.github.com.pages.sections.SelectSection.formMatSelect;
12-
import static io.github.com.pages.sections.SelectSection.formMatSelectConfirm;
10+
import static io.github.com.pages.SelectPage.formMatSelect;
11+
import static io.github.com.pages.SelectPage.formMatSelectConfirm;
1312
import static org.hamcrest.Matchers.hasItems;
1413

15-
// TODO Move to the new page
16-
@Ignore
1714
public class FormMatSelectTests extends TestsSelectBase {
1815
@BeforeMethod(alwaysRun = true)
1916
public void before() {

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/FormNativeFeatureSelectTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

9-
import static io.github.com.pages.sections.SelectSection.formNativeFeatureSelect;
8+
import static io.github.com.pages.SelectPage.formNativeFeatureSelect;
109
import static org.hamcrest.Matchers.hasItem;
1110
import static org.hamcrest.Matchers.hasItems;
1211

13-
// TODO Move to the new page
14-
@Ignore
1512
public class FormNativeFeatureSelectTests extends TestsSelectBase {
1613
@BeforeMethod(alwaysRun = true)
1714
public void before() {

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/FormNativeSelectTests.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

9-
import static io.github.com.pages.sections.SelectSection.formNativeSelect;
10-
import static io.github.com.pages.sections.SelectSection.formNativeSelectConfirm;
8+
import static io.github.com.pages.SelectPage.formNativeSelect;
9+
import static io.github.com.pages.SelectPage.formNativeSelectConfirm;
1110
import static org.hamcrest.Matchers.*;
1211

13-
// TODO Move to the new page
14-
@Ignore
1512
public class FormNativeSelectTests extends TestsSelectBase {
1613
@BeforeMethod(alwaysRun = true)
1714
public void before() {

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/MatErrorStateMatcherSelectTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

9-
import static io.github.com.pages.sections.SelectSection.matErrorStateMatcherSelect;
8+
import static io.github.com.pages.SelectPage.matErrorStateMatcherSelect;
109
import static org.hamcrest.Matchers.hasItems;
1110
import static org.hamcrest.Matchers.matchesPattern;
1211

13-
// TODO Move to the new page
14-
@Ignore
1512
public class MatErrorStateMatcherSelectTests extends TestsSelectBase {
1613
private static final String CLEAR = "Clear";
1714

jdi-light-angular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/select/MultipleSelectTests.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
package io.github.epam.angular.tests.elements.complex.select;
22

33
import org.testng.annotations.BeforeMethod;
4-
import org.testng.annotations.Ignore;
54
import org.testng.annotations.Test;
65

76
import java.util.Arrays;
87

9-
import static io.github.com.StaticSite.angularPage;
10-
import static io.github.com.pages.sections.SelectSection.multipleSelect;
8+
import static com.jdiai.tools.Timer.waitCondition;
9+
import static io.github.com.StaticSite.selectPage;
10+
import static io.github.com.pages.SelectPage.multipleSelect;
1111
import static org.hamcrest.Matchers.hasItems;
1212

13-
// TODO Move to the new page
14-
@Ignore
1513
public class MultipleSelectTests extends TestsSelectBase {
1614
private String[] multiOptions = new String[3];
1715
private int[] multiSelect = new int[1];
1816

1917
@BeforeMethod(alwaysRun = true)
2018
public void before() {
21-
angularPage.shouldBeOpened();
22-
multipleSelect.show();
19+
selectPage.open();
20+
waitCondition(() -> selectPage.isOpened());
21+
selectPage.checkOpened();
2322
}
2423

2524
@Test

0 commit comments

Comments
 (0)