Skip to content

Conversation

@KuznetsovRoman
Copy link
Member

No description provided.

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-736.testing_library branch from efb7f56 to 6e6d47c Compare September 23, 2025 23:56
@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-736.testing_library branch from 6e6d47c to 35c135b Compare September 24, 2025 12:30
// Find by role
const fileSearchResultsItems = await fileSearchResults.findAllByRole("option");
expect(fileSearchResultsItems.length).toBeGreaterThan(1);
Copy link
Member

Choose a reason for hiding this comment

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

лучше везде перед expect добавлять await, чтобы не думать, что вот в этой проверке он не нужен, а в expect(fileSearchResults).toBeDisabled(); обязателен. Лучше сразу пример генерить с await, чтобы никто даже не думал, что можно по-другому

// Find by placeholder
const fileSearchInput = await browser.findByPlaceholderText("Search docs");
await fileSearchInput.setValue("config");
Copy link
Member

Choose a reason for hiding this comment

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

перед вводом текста я бы еще проверил на видимость элемента - await fileSearchInput.isDisplayedInViewport();

Copy link
Member Author

Choose a reason for hiding this comment

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

"isDisplayedInViewport" просто вернет true / false
Добавил "waitForDisplayed"

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-736.testing_library branch from 17e1742 to 27d37d7 Compare September 24, 2025 13:27
@KuznetsovRoman KuznetsovRoman merged commit 467f6f8 into master Sep 24, 2025
3 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-736.testing_library branch September 24, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants