-
Notifications
You must be signed in to change notification settings - Fork 47
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
#4908: Tests refactoring: Form field element #5391
base: angular_rework_development
Are you sure you want to change the base?
Conversation
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.
и автопроверки упали
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/complex/FormField.java
Outdated
Show resolved
Hide resolved
try { | ||
getDriver().findElement(By.xpath(currentXpath + "//input")); | ||
core().find(By.cssSelector("input")).get(); |
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.
- не нужна эта эвристика, должен быть FormField<TextArea> если там длинный текст и другие поля (для них надо интерфейс сделать, чтобы можно было расширять)
- вместо try catch существует метод IsExists
@kira-vlsv давай начнем с того, что ты поймешь, как исправлять ошибки автопроверки, например |
...ngular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/FormFieldTests.java
Outdated
Show resolved
Hide resolved
...ngular-tests/src/test/java/io/github/epam/angular/tests/elements/complex/FormFieldTests.java
Outdated
Show resolved
Hide resolved
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/interfaces/IFormField.java
Outdated
Show resolved
Hide resolved
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/interfaces/IFormField.java
Outdated
Show resolved
Hide resolved
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/interfaces/IFormField.java
Outdated
Show resolved
Hide resolved
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/interfaces/IFormField.java
Outdated
Show resolved
Hide resolved
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/interfaces/IFormField.java
Outdated
Show resolved
Hide resolved
jdi-light-angular/src/main/java/com/epam/jdi/light/angular/elements/interfaces/IFormField.java
Outdated
Show resolved
Hide resolved
@JDIAction("Get icon with '{name}'") | ||
default UIElement icon() { | ||
WebElement element = core().find(By.xpath("//mat-icon/ancestor::button")); | ||
return new UIElement(element); |
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.
find(...) возвращает UIElement, зачем еще что-то?
Refactored tests for FormFieldTests
Added new ones to cover the following features:
appearance: 'fill' | 'outline'
floatLabel: 'always' | 'auto'
hideRequiredMarker: boolean
disabled: boolean
empty: boolean
required: boolean
shouldLabelFloat: boolean