diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/AutocompleteAssert.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/AutocompleteAssert.java index ebb09a3772..2ea3b50c86 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/AutocompleteAssert.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/asserts/AutocompleteAssert.java @@ -4,10 +4,7 @@ import com.epam.jdi.light.common.JDIAction; import com.epam.jdi.light.elements.interfaces.common.IsText; import com.epam.jdi.light.vuetify.elements.complex.Autocomplete; -import com.epam.jdi.light.vuetify.interfaces.asserts.DenseAssert; -import com.epam.jdi.light.vuetify.interfaces.asserts.FilledAssert; -import com.epam.jdi.light.vuetify.interfaces.asserts.OutlinedAssert; -import com.epam.jdi.light.vuetify.interfaces.asserts.ShapedAssert; +import com.epam.jdi.light.vuetify.interfaces.asserts.*; import org.hamcrest.Matchers; import java.util.List; @@ -19,6 +16,7 @@ public class AutocompleteAssert extends UIAssert, OutlinedAssert, DenseAssert, + RoundedAssert, ShapedAssert { @JDIAction(value = "Assert that '{name}' is expanded", isAssert = true) @@ -89,16 +87,6 @@ public AutocompleteAssert solo() { return this; } - // @todo #5308 Create interface for rounded - @JDIAction(value = "Assert that 'name' has rounded style", isAssert = true) - public AutocompleteAssert rounded() { - jdiAssert( - element().root().attr("class"), - Matchers.containsString("v-text-field--rounded") - ); - return this; - } - // @todo #5308 create interface for Themes @JDIAction(value = "Assert that 'name' has dark style", isAssert = true) public AutocompleteAssert dark() { diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/VuetifyButton.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/VuetifyButton.java index d7aacb3d7f..abd0f1d86e 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/VuetifyButton.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/common/VuetifyButton.java @@ -21,7 +21,8 @@ * https://v2.vuetifyjs.com/en/components/buttons/ */ -public class VuetifyButton extends Button implements HasClick, HasIcon, HasColor, HasTheme, HasElevation, IsOutlined, +public class VuetifyButton extends Button implements HasClick, HasIcon, + HasColor, HasTheme, HasElevation, IsOutlined, HasMeasurement, HasRounded { @UI(".v-btn__loader") @@ -93,4 +94,9 @@ public VuetifyButtonAssert verify() { return is(); } + @Override + public boolean isRounded() { + return core().attr("class").contains("v-btn--rounded"); + } + } diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/complex/Autocomplete.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/complex/Autocomplete.java index 418e8fc329..cc3c59706f 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/complex/Autocomplete.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/complex/Autocomplete.java @@ -8,10 +8,7 @@ import com.epam.jdi.light.vuetify.annotations.JAutocomplete; import com.epam.jdi.light.vuetify.asserts.AutocompleteAssert; import com.epam.jdi.light.vuetify.elements.common.ListItem; -import com.epam.jdi.light.vuetify.interfaces.IsDense; -import com.epam.jdi.light.vuetify.interfaces.IsFilled; -import com.epam.jdi.light.vuetify.interfaces.IsOutlined; -import com.epam.jdi.light.vuetify.interfaces.IsShaped; +import com.epam.jdi.light.vuetify.interfaces.*; import com.jdiai.tools.Timer; import org.openqa.selenium.Keys; @@ -30,7 +27,7 @@ */ public class Autocomplete extends UIBaseElement - implements ISetup, IsFilled, IsOutlined, IsDense, IsShaped { + implements ISetup, IsFilled, IsOutlined, IsDense, IsShaped, HasRounded { private static final String VALUE_LOCATOR = "div input[type='hidden']"; private static final String INPUT_LOCATOR = "div input[type='text']"; private static final String EXPAND_LOCATOR = "div .v-input__append-inner"; @@ -226,4 +223,9 @@ public void clickClear() { public boolean isSolo() { return root().attr("class").contains("v-text-field--solo"); } + + @Override + public boolean isRounded() { + return root().attr("class").contains("v-text-field--rounded"); + } } diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/composite/VuetifyList.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/composite/VuetifyList.java index 9e15a7993d..1c564d3dd1 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/composite/VuetifyList.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/elements/composite/VuetifyList.java @@ -148,6 +148,12 @@ public boolean isDisabled() { return core().hasClass("v-list--disabled"); } + @Override + @JDIAction("Get if '{name}' is enabled") + public boolean isEnabled() { + return !this.isDisabled(); + } + @Override @JDIAction("Get if '{name}' is rounded") public boolean isRounded() { diff --git a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/interfaces/HasRounded.java b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/interfaces/HasRounded.java index 1f4b62a518..286256e9c0 100644 --- a/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/interfaces/HasRounded.java +++ b/jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/interfaces/HasRounded.java @@ -7,6 +7,7 @@ /** * Interface HasRounded includes methods to check that element is rounded. */ +// @todo #5420 Check the all classes has this class if can be rounded public interface HasRounded extends ICoreElement { String ROUNDED_PATTERN = "rounded?[^-0][\\S]*";