Skip to content
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

Open
wants to merge 14 commits into
base: angular_rework_development
Choose a base branch
from

Conversation

kira-vlsv
Copy link

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

Copy link
Contributor

@pnatashap pnatashap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и автопроверки упали

try {
getDriver().findElement(By.xpath(currentXpath + "//input"));
core().find(By.cssSelector("input")).get();
Copy link
Contributor

@pnatashap pnatashap Feb 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. не нужна эта эвристика, должен быть FormField<TextArea> если там длинный текст и другие поля (для них надо интерфейс сделать, чтобы можно было расширять)
  2. вместо try catch существует метод IsExists

@pnatashap
Copy link
Contributor

@kira-vlsv давай начнем с того, что ты поймешь, как исправлять ошибки автопроверки, например

@JDIAction("Get icon with '{name}'")
default UIElement icon() {
WebElement element = core().find(By.xpath("//mat-icon/ancestor::button"));
return new UIElement(element);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find(...) возвращает UIElement, зачем еще что-то?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants