From 70867b941f36135fbb699b03c8610d51666cd1a6 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Mon, 22 Apr 2024 14:16:29 -0500 Subject: [PATCH] #5363 Fix locators, add tasks --- .../main/java/io/github/com/pages/FileInputsPage.java | 9 ++++----- .../epam/vuetify/tests/complex/FileInputsTests.java | 1 + .../epam/jdi/light/vuetify/annotations/JDIFileInput.java | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/FileInputsPage.java b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/FileInputsPage.java index bdf276db74..58953b2014 100644 --- a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/FileInputsPage.java +++ b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/FileInputsPage.java @@ -19,17 +19,16 @@ public class FileInputsPage extends VuetifyPage { @JDIFileInput(root = "#MultipleFileInput.v-file-input") public static FileInput multipleFileInput; - // @todo #5298 Locators should use .v-file-input class - @JDIFileInput(root = "//*[@id='AppendPrependIconFileInput']/div[1]") + @JDIFileInput(root = "#AppendPrependIconFileInput .v-file-input") public static FileInput prependIconFileInput; - @JDIFileInput(root = "//*[@id='AppendPrependIconFileInput']/div[2]") + @JDIFileInput(root = "#AppendPrependIconFileInput .v-file-input:nth-child(2)") public static FileInput prependInnerIconFileInput; - @JDIFileInput(root = "//*[@id='AppendPrependIconFileInput']/div[3]") + @JDIFileInput(root = "#AppendPrependIconFileInput .v-file-input:nth-child(3)") public static FileInput appendIconWithSuffixFileInput; - @JDIFileInput(root = "//*[@id='AppendPrependIconFileInput']/div[4]") + @JDIFileInput(root = "#AppendPrependIconFileInput .v-file-input:nth-child(4)") public static FileInput appendOuterIconWithPrefixFileInput; @JDIFileInput(root = "#ShowSizeFileInput.v-file-input") diff --git a/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/complex/FileInputsTests.java b/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/complex/FileInputsTests.java index aca2806881..84b5d64e4f 100644 --- a/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/complex/FileInputsTests.java +++ b/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/complex/FileInputsTests.java @@ -54,6 +54,7 @@ public void before() { @BeforeClass public void createFiles() throws IOException { + // @todo #5363 fix paths to do not use src, they are available in resources pathTXT = Paths.get(mergePath(COMMON.projectPath, "/src/test/resources/TextTestFile.txt")); pathPNG = Paths.get(mergePath(COMMON.projectPath, "/src/test/resources/ImageTestFile.png")); Files.deleteIfExists(pathTXT); diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/annotations/JDIFileInput.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/annotations/JDIFileInput.java index a4d741ea50..da87d2a5d1 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/annotations/JDIFileInput.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/annotations/JDIFileInput.java @@ -11,5 +11,7 @@ @Target({ElementType.TYPE, ElementType.FIELD}) public @interface JDIFileInput { @MarkupLocator String root() default ""; + // @todo #5363 Check if this descriptor is needed, add a tests if needed, + // delete if not needed with all annotation @MarkupLocator String files() default ""; }