-
Notifications
You must be signed in to change notification settings - Fork 16
fix(E2E): integrate view searching into tests instead of scrolling for specific tree items #3138
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
Draft
shouples
wants to merge
16
commits into
main
Choose a base branch
from
djs/fix-e2e-scrolling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
39f6f0e to
0fa280a
Compare
0fa280a to
245eaa1
Compare
…or `getItemByLabel` to use search behavior for new SearchableView subclass on supporting views
…logging full playwright error for sidebar closing or extension/sidecar log saving issues
shouples
commented
Dec 23, 2025
Comment on lines
-17
to
-20
| /** Get the placeholder text from the input field. */ | ||
| get placeholder(): Locator { | ||
| return this.input; | ||
| } |
Contributor
Author
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.
No need for this since we can just use .input directly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
The current
.scrollIntoViewIfNeeded()doesn't work for virtualized views, since all tree items aren't loaded into the Electron DOM after the initialgetChildrenand subsequentgetTreeItemcalls. As a result, we need a dedicated way to look up specific items in a view when there may be many.This PR extends the
Viewpage object model with a newSearchableViewclass with some helper functions to invoke the*.searchcommand from the nav area, complete the text input, and return aViewItemafter asserting the searched item is found, reducing boilerplate needed for callers to access their targeted tree items.(The first iteration of this attempted to manually scroll through the view and hope the target item eventually appeared, but that grew slower over time / as more items were added to the view, so the most straightforward implementation was to go with the existing search functionality, which also indirectly adds more test coverage.)
Closes #3136
Optional: Any additional details or context that should be provided?
progressIndicatorgetter method. Without it, we would occasionally see race conditions in the test where an action would be invoked for a tree item before/during a loading state, and the command wouldn't receive the corresponding tree item resource (e.g. aKafkaTopicwhen trying to produce messages, delete the topic, etc)baseTest.tsare to avoid the additional noise when 1) tests failed to save extension/sidecar logs, and 2) the electron context timed out when closing (which we typically see in CI)Pull request checklist
Please check if your PR fulfills the following (if applicable):
Tests
Release notes