Skip to content

Commit 589fd64

Browse files
author
Konstantin Bulavin
committed
Modified in accordance with the comments
1 parent d552742 commit 589fd64

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/complex/ChipGroup.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.epam.jdi.light.angular.asserts.ChipGroupAssert;
44
import com.epam.jdi.light.angular.elements.common.Chip;
5-
import com.epam.jdi.light.angular.elements.interfaces.HasErrorState;
5+
import com.epam.jdi.light.angular.elements.interfaces.FormField;
66
import com.epam.jdi.light.angular.elements.interfaces.HasOrientation;
77
import com.epam.jdi.light.angular.elements.interfaces.IsGroupElement;
88
import com.epam.jdi.light.common.JDIAction;
@@ -12,7 +12,7 @@
1212
import java.util.List;
1313
import java.util.stream.Collectors;
1414

15-
public class ChipGroup extends UIBaseElement<ChipGroupAssert> implements IsGroupElement<Chip>, HasOrientation, HasErrorState {
15+
public class ChipGroup extends UIBaseElement<ChipGroupAssert> implements IsGroupElement<Chip>, HasOrientation, FormField {
1616

1717
public static final String CHIP_LOCATOR = ".mat-mdc-chip";
1818

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.epam.jdi.light.angular.elements.interfaces;
2+
3+
import com.epam.jdi.light.common.JDIAction;
4+
import com.epam.jdi.light.elements.interfaces.base.ICoreElement;
5+
6+
public interface FormField extends ICoreElement {
7+
8+
/**
9+
* Checks if element has Error State or not.
10+
*
11+
* @return {@code true} if element has Error State, otherwise {@code false}
12+
*/
13+
@JDIAction("Get if '{name}' is vertical")
14+
default boolean errorState() {
15+
return core().hasClass("mat-form-field-invalid");
16+
}
17+
}

0 commit comments

Comments
 (0)