-
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.
Merge pull request #5512 from jdi-testing/5428
#5428 add HasSize interface
- Loading branch information
Showing
6 changed files
with
83 additions
and
51 deletions.
There are no files selected for viewing
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
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
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
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
32 changes: 32 additions & 0 deletions
32
jdi-light-vuetify/src/main/java/com/epam/jdi/light/vuetify/interfaces/HasSize.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,32 @@ | ||
package com.epam.jdi.light.vuetify.interfaces; | ||
|
||
import com.epam.jdi.light.common.JDIAction; | ||
import com.epam.jdi.light.elements.interfaces.base.ICoreElement; | ||
|
||
public interface HasSize extends ICoreElement { | ||
|
||
@JDIAction("Get if '{name}' hss x-small size") | ||
default boolean xSmallSize() { | ||
return core().hasClass("v-size--x-small"); | ||
} | ||
|
||
@JDIAction("Get if '{name}' has small size") | ||
default boolean smallSize() { | ||
return core().hasClass("v-size--small"); | ||
} | ||
|
||
@JDIAction("Get if '{name}' has default size") | ||
default boolean defaultSize() { | ||
return core().hasClass("v-size--default"); | ||
} | ||
|
||
@JDIAction("Get if '{name}' has large size") | ||
default boolean largeSize() { | ||
return core().hasClass("v-size--large"); | ||
} | ||
|
||
@JDIAction("Get if '{name}' has x-large size") | ||
default boolean xLargeSize() { | ||
return core().hasClass("v-size--x-large"); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...light-vuetify/src/main/java/com/epam/jdi/light/vuetify/interfaces/asserts/SizeAssert.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,41 @@ | ||
package com.epam.jdi.light.vuetify.interfaces.asserts; | ||
|
||
import com.epam.jdi.light.asserts.generic.IBaseAssert; | ||
import com.epam.jdi.light.common.JDIAction; | ||
import com.epam.jdi.light.vuetify.interfaces.HasSize; | ||
import org.hamcrest.Matchers; | ||
|
||
import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert; | ||
|
||
public interface SizeAssert<A, E extends HasSize> extends IBaseAssert<E> { | ||
|
||
@JDIAction(value = "Assert that '{name}' size is x-small", isAssert = true) | ||
default A xSmallSize() { | ||
jdiAssert(element().xSmallSize(), Matchers.is(true), "Chip's size is not x-small"); | ||
return (A) this; | ||
} | ||
|
||
@JDIAction(value = "Assert that '{name}' size is small", isAssert = true) | ||
default A smallSize() { | ||
jdiAssert(element().smallSize(), Matchers.is(true), "Chip's size is not small"); | ||
return (A) this; | ||
} | ||
|
||
@JDIAction(value = "Assert that '{name}' size is default", isAssert = true) | ||
default A defaultSize() { | ||
jdiAssert(element().defaultSize(), Matchers.is(true), "Chip's size is not default"); | ||
return (A) this; | ||
} | ||
|
||
@JDIAction(value = "Assert that '{name}' size is large", isAssert = true) | ||
default A largeSize() { | ||
jdiAssert(element().largeSize(), Matchers.is(true), "Chip's size is not large"); | ||
return (A) this; | ||
} | ||
|
||
@JDIAction(value = "Assert that '{name}' size is x-large", isAssert = true) | ||
default A xLargeSize() { | ||
jdiAssert(element().xLargeSize(), Matchers.is(true), "Chip's size is not x-large"); | ||
return (A) this; | ||
} | ||
} |