-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first methods for select implementation
- Loading branch information
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/SelectAssert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.epam.jdi.light.angular.asserts; | ||
|
||
import com.epam.jdi.light.angular.elements.complex.Select; | ||
import com.epam.jdi.light.asserts.generic.UIAssert; | ||
|
||
public class SelectAssert extends UIAssert<SelectAssert, Select> { | ||
|
||
|
||
} |
85 changes: 85 additions & 0 deletions
85
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/complex/Select.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package com.epam.jdi.light.angular.elements.complex; | ||
|
||
import com.epam.jdi.light.angular.asserts.SelectAssert; | ||
import com.epam.jdi.light.common.JDIAction; | ||
import com.epam.jdi.light.elements.base.UIBaseElement; | ||
import com.epam.jdi.light.elements.interfaces.base.HasPlaceholder; | ||
import com.epam.jdi.light.elements.interfaces.base.IClickable; | ||
|
||
public class Select extends UIBaseElement<SelectAssert> implements HasPlaceholder, IClickable { | ||
|
||
@JDIAction | ||
public boolean expanded() { | ||
return core().getAttribute("aria-expanded").equalsIgnoreCase("true"); | ||
} | ||
|
||
@JDIAction | ||
public boolean collapsed() { | ||
return !expanded(); | ||
} | ||
|
||
@JDIAction | ||
public void expand() { | ||
click(); | ||
} | ||
|
||
@JDIAction | ||
public String name() { | ||
return core().getAttribute("name"); | ||
} | ||
|
||
@JDIAction | ||
public String role() { | ||
return core().getAttribute("name"); | ||
} | ||
|
||
@JDIAction | ||
public boolean required() { | ||
return attrs().has("required"); | ||
} | ||
|
||
@JDIAction | ||
public boolean disableRipple() { | ||
return attrs().has("disableripple"); | ||
} | ||
|
||
@JDIAction | ||
public boolean disabled() { | ||
return attrs().has("disabled"); | ||
} | ||
|
||
@JDIAction | ||
public boolean multiple() { | ||
return attrs().has("multiple"); | ||
} | ||
|
||
@JDIAction | ||
public boolean hideSingleSelectionIndicator() { | ||
return attrs().has("hidesingleselectionindicator"); | ||
} | ||
|
||
@JDIAction() | ||
public boolean labelDisabled() { | ||
return core().getAttribute("aria-disabled").equalsIgnoreCase("true"); | ||
} | ||
|
||
@JDIAction | ||
public boolean labelRequired() { | ||
return core().getAttribute("aria-required").equalsIgnoreCase("true"); | ||
} | ||
|
||
@JDIAction | ||
public String label() { | ||
return core().getAttribute("aria-label"); | ||
} | ||
|
||
@Override | ||
public void click() { | ||
core().click(); | ||
} | ||
|
||
@Override | ||
public SelectAssert is() { | ||
return new SelectAssert().set(this); | ||
} | ||
} |