diff --git a/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/common/ChipsTests.java b/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/common/ChipsTests.java index bef4904f74..039aa8a390 100644 --- a/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/common/ChipsTests.java +++ b/jdi-light-vuetify-tests/src/test/java/io/github/epam/vuetify/tests/common/ChipsTests.java @@ -111,8 +111,7 @@ public void sizesChipTests() { int expectedHeight = 16; Chip sizeChip = sizesChips.get(1); sizeChip.show(); - sizeChip.has().fontSize(expectedFontSize) - .and().height(expectedHeight) + sizeChip.has().height(expectedHeight) .and().xSmallSize(); sizesChips.get(2).has().smallSize(); sizesChips.get(3).has().defaultSize(); diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/ChipAssert.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/ChipAssert.java index 9e53626466..4fb6f0af18 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/ChipAssert.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/ChipAssert.java @@ -65,17 +65,16 @@ public ChipAssert notLabel() { return this; } - // @todo #5048 Check if this method usefull @JDIAction(value = "Assert that ''{name}' filter icon is displayed'", isAssert = true) public ChipAssert filterIconDisplayed() { - jdiAssert(element().isFilterIconDisplayed(), Matchers.is(true), + jdiAssert(element().filter().isDisplayed(), Matchers.is(true), "Chip's filter icon is not displayed"); return this; } @JDIAction(value = "Assert that ''{name}' filter icon is not displayed'", isAssert = true) public ChipAssert filterIconNotDisplayed() { - jdiAssert(element().isFilterIconDisplayed(), Matchers.is(false), + jdiAssert(element().filter().isDisplayed(), Matchers.is(false), "Chip's filter icon is displayed"); return this; } @@ -92,12 +91,6 @@ public ChipAssert image() { return this; } - @JDIAction(value = "Assert that '{name}' font size is equal to '{0} px'", isAssert = true) - public ChipAssert fontSize(int fontSize) { - jdiAssert(element().fontSize(), Matchers.equalTo(fontSize)); - return this; - } - @JDIAction(value = "Assert that '{name}' size is x-small", isAssert = true) public ChipAssert xSmallSize() { jdiAssert(element().hasXSmallSize(), Matchers.is(true), "Chip's size is not x-small"); diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/Chip.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/Chip.java index 4176fdd9a4..8656992852 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/Chip.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/Chip.java @@ -60,12 +60,11 @@ public boolean active() { return core().hasClass("v-chip--active"); } - @JDIAction("Get if '{name}' filter icon is displayed") - public boolean isFilterIconDisplayed() { - return core().find(FILTER_LOCATOR).isDisplayed(); + @JDIAction("Get '{name}' filter icon") + public UIElement filter() { + return core().find(FILTER_LOCATOR); } - // "label" refers to specific element border radius settings @JDIAction("Get if '{name}' is marked as label chip") public boolean isLabel() { return core().hasClass("v-chip--label"); @@ -77,11 +76,7 @@ public Image image() { return new Image().setCore(Image.class, core().find(IMAGE_LOCATOR)); } - @JDIAction("Get '{name}' font size") - public int fontSize() { - return Integer.parseInt(core().css("font-size").replace("px", "")); - } - + // @todo #5309 Ass interface for sizes (all small, x-small, default, large, x-large) @JDIAction("Get if '{name}' hss x-small size") public boolean hasXSmallSize() { return core().hasClass("v-size--x-small");