-
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.
- Loading branch information
Showing
2 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/asserts/SlideToggleAssert.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,25 @@ | ||
package com.epam.jdi.light.angular.asserts; | ||
|
||
import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert; | ||
|
||
import com.epam.jdi.light.angular.elements.common.SlideToggle; | ||
import com.epam.jdi.light.asserts.generic.UIAssert; | ||
import com.epam.jdi.light.common.JDIAction; | ||
import org.hamcrest.Matchers; | ||
|
||
public class SlideToggleAssert extends UIAssert<SlideToggleAssert, SlideToggle> { | ||
|
||
@Override | ||
@JDIAction("Assert that '{name}' is disabled") | ||
public SlideToggleAssert disabled() { | ||
jdiAssert(element().isDisabled(), Matchers.is(true), "Element is enabled"); | ||
return this; | ||
} | ||
|
||
@Override | ||
@JDIAction("Assert that '{name}' is disabled") | ||
public SlideToggleAssert enabled() { | ||
jdiAssert(element().isDisabled(), Matchers.is(false), "Element is disabled"); | ||
return this; | ||
} | ||
} |
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