Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5362 fix locators #5494

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
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(
root = "#ColorsDatePicker > div:nth-child(1)")
root = "#ColorsDatePicker > .v-picker--date")
public static DatePicker colorFirstDatePicker;

@JDatePicker(
Expand All @@ -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(
Expand All @@ -44,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")
Expand All @@ -54,30 +53,30 @@ public class DatePickersPage extends VuetifyPage {
public static List<Text> 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(
root = "#ShowCurrentDatePicker > div:nth-child(1)")
root = "#ShowCurrentDatePicker > .v-picker--date")
public static DatePicker firstShowCurrentDatePicker;

@JDatePicker(
root = "#ShowCurrentDatePicker > div:nth-child(2)")
public static DatePicker secondShowCurrentDatePicker;

@JDatePicker(
root = "#WidthDatePicker > div:nth-child(1)")
root = "#WidthDatePicker > .v-picker--date")
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 > div:nth-child(2)")
public static DatePicker secondWidthDatePicker;

@UI("div.v-main__wrap > div.container > div")
Expand All @@ -91,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")
Expand Down Expand Up @@ -134,13 +135,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;

Expand Down