-
Notifications
You must be signed in to change notification settings - Fork 47
5378 Fix failing tests for Snackbar #5379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: angular_rework_development
Are you sure you want to change the base?
Changes from 4 commits
bffd263
5bcaab1
952c65c
234d252
c501379
16c6929
e919568
1057f50
90b4fe2
3058d29
c6e5fb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,33 +4,34 @@ | |
| import com.epam.jdi.light.common.JDIAction; | ||
| import com.epam.jdi.light.elements.base.UIBaseElement; | ||
| import com.epam.jdi.light.elements.common.UIElement; | ||
| import com.epam.jdi.light.ui.html.elements.common.Button; | ||
|
|
||
| /** | ||
| * To see an example of Snackbar web element please visit https://material.angular.io/components/snack-bar/overview. | ||
| */ | ||
|
|
||
| public class Snackbar extends UIBaseElement<SnackbarAssert> { | ||
| protected UIElement message; | ||
|
||
| protected String messageLocator = "./span"; | ||
| protected String messageLocator = "//*[@matsnackbarlabel]"; | ||
|
||
|
|
||
| protected UIElement action; | ||
| protected String actionLocator = ".//button"; | ||
| public Button action; | ||
vklonin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| protected String actionLocator = "//button"; | ||
|
||
|
|
||
| public Snackbar() { | ||
| message = new UIElement(); | ||
|
||
| message.core().setLocator(messageLocator); | ||
|
|
||
| action = new UIElement(); | ||
| action = new Button(); | ||
| action.core().setLocator(actionLocator); | ||
| } | ||
|
|
||
| @JDIAction("Get '{name}' message") | ||
| public String getMessageText() { | ||
| return message.getValue(); | ||
| public String messageText() { | ||
| return message.getText(); | ||
| } | ||
|
|
||
| @JDIAction("Get '{name}' action") | ||
|
||
| public String getActionText() { | ||
| public String actionText() { | ||
|
||
| return action.getValue(); | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
на текст всегда ставим валидатор с матчером, чтобы не только на полное соответствие можно было проверить
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Заменил на
Matchers.containsString(expected)