From bd0cf144be21cfaa453a593e798fabb26131a986 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Fri, 26 Apr 2024 11:52:48 -0500 Subject: [PATCH 1/3] #5362 fix locators --- .../io/github/com/pages/DatePickersPage.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java index 46064386a3..d00702261f 100644 --- a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java +++ b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java @@ -4,18 +4,17 @@ import com.epam.jdi.light.elements.composite.Section; import com.epam.jdi.light.elements.pageobjects.annotations.locators.UI; import com.epam.jdi.light.ui.html.elements.common.Button; -import com.epam.jdi.light.ui.html.elements.common.Checkbox; import com.epam.jdi.light.ui.html.elements.common.Text; import com.epam.jdi.light.vuetify.annotations.JDatePicker; +import com.epam.jdi.light.vuetify.elements.common.VueCheckbox; import com.epam.jdi.light.vuetify.elements.complex.DatePicker; import java.util.List; public class DatePickersPage extends VuetifyPage { - // @todo #5298 Locators should use .v-picker class @JDatePicker( - root = "#AllowedDatesDatePicker > div") + root = "#AllowedDatesDatePicker > .v-picker--date") public static DatePicker allowedDatePicker; @JDatePicker( @@ -31,11 +30,11 @@ public class DatePickersPage extends VuetifyPage { public static DatePicker elevationWithElevationDatePicker; @JDatePicker( - root = "#IconsDatePicker > div") + root = "#IconsDatePicker > .v-picker--date") public static DatePicker iconsDatePicker; @JDatePicker( - root = "#MultipleDatePicker .v-picker") + root = "#MultipleDatePicker .v-picker--date") public static DatePicker multipleDatePicker; @JDatePicker( @@ -54,14 +53,14 @@ public class DatePickersPage extends VuetifyPage { public static List news; @JDatePicker( - root = "#RangeDatePicker .v-picker") + root = "#RangeDatePicker .v-picker--date") public static DatePicker rangeDatePicker; @UI("//div[@id='RangeDatePicker']//div[text()[contains(.,'model')]]") public static Label modelDateRange; @JDatePicker( - root = "#ReadonlyDatePicker > div") + root = "#ReadonlyDatePicker > .v-picker--date") public static DatePicker readOnlyDatePicker; @JDatePicker( @@ -77,7 +76,7 @@ public class DatePickersPage extends VuetifyPage { public static DatePicker firstWidthDatePicker; @JDatePicker( - root = "#WidthDatePicker > div.v-picker.v-card.v-picker--date.mt-4.v-picker--full-width.theme--light") + root = "#WidthDatePicker > .v-picker--date") public static DatePicker secondWidthDatePicker; @UI("div.v-main__wrap > div.container > div") @@ -134,13 +133,15 @@ public class DatePickersPage extends VuetifyPage { root = "#InternationalizationDatePicker > div:nth-child(2)") public static DatePicker swedishDatePicker; - @UI("//div[contains(@class, 'v-input--selection-controls__ripple')]") - public static Checkbox orientationSwitcher; + // @todo #5362 Locator should be ".v-input--checkbox" + @UI(".v-input--checkbox") + public static VueCheckbox orientationSwitcher; @JDatePicker( - root = "#OrientationDatePicker .v-picker") + root = "#OrientationDatePicker .v-picker--date") public static DatePicker orientationDatePicker; + // @todo #5362 These controls are in the picker, should be used from the picker only @UI(".v-menu__content .v-picker__actions .v-btn:last-child") public static Button buttonOkMenu; From a7c1831f258ed5eedd0ef6179823b945527baf64 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Fri, 26 Apr 2024 15:00:49 -0500 Subject: [PATCH 2/3] #5362 fix locators --- .../main/java/io/github/com/pages/DatePickersPage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java index d00702261f..deeaffbaf2 100644 --- a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java +++ b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java @@ -18,7 +18,7 @@ public class DatePickersPage extends VuetifyPage { public static DatePicker allowedDatePicker; @JDatePicker( - root = "#ColorsDatePicker > div:nth-child(1)") + root = "#ColorsDatePicker > .v-picker--date") public static DatePicker colorFirstDatePicker; @JDatePicker( @@ -43,7 +43,7 @@ public class DatePickersPage extends VuetifyPage { public static DatePicker multipleInMenuDatePicker; @JDatePicker( - root = "#PickerDateDatePicker > div:nth-child(1)") + root = "#PickerDateDatePicker > .v-picker--date") public static DatePicker pickerDateDatePicker; @UI("#PickerDateDatePicker div.text-h6") @@ -64,7 +64,7 @@ public class DatePickersPage extends VuetifyPage { public static DatePicker readOnlyDatePicker; @JDatePicker( - root = "#ShowCurrentDatePicker > div:nth-child(1)") + root = "#ShowCurrentDatePicker > .v-picker--date") public static DatePicker firstShowCurrentDatePicker; @JDatePicker( @@ -72,11 +72,11 @@ public class DatePickersPage extends VuetifyPage { public static DatePicker secondShowCurrentDatePicker; @JDatePicker( - root = "#WidthDatePicker > div:nth-child(1)") + root = "#WidthDatePicker > .v-picker--date") public static DatePicker firstWidthDatePicker; @JDatePicker( - root = "#WidthDatePicker > .v-picker--date") + root = "#WidthDatePicker > div:nth-child(2)") public static DatePicker secondWidthDatePicker; @UI("div.v-main__wrap > div.container > div") From a5d2c95f64a8ffa65d6a27e512aaf99ab053e10f Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Fri, 26 Apr 2024 17:00:20 -0500 Subject: [PATCH 3/3] #5362 fix locators --- .../src/main/java/io/github/com/pages/DatePickersPage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java index deeaffbaf2..dbd9c24a6a 100644 --- a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java +++ b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/DatePickersPage.java @@ -43,7 +43,7 @@ public class DatePickersPage extends VuetifyPage { public static DatePicker multipleInMenuDatePicker; @JDatePicker( - root = "#PickerDateDatePicker > .v-picker--date") + root = "#PickerDateDatePicker .v-picker--date") public static DatePicker pickerDateDatePicker; @UI("#PickerDateDatePicker div.text-h6") @@ -90,6 +90,8 @@ public class DatePickersPage extends VuetifyPage { root = "#DateEventsDatePicker > div:nth-child(2)") public static DatePicker secondDateEventsDatePicker; + // @todo #5362 Looks like this is not a picker, but input with date type, so datepicker + // appears to select value. Should be checked @JDatePicker( root = "#ActivePickerDatePicker", expandedRoot = "#app > div.v-menu__content.theme--light.menuable__content__active")