Skip to content

Increase test coverage for search.dart#9795

Open
kenzieschmoll wants to merge 7 commits intoflutter:masterfrom
kenzieschmoll:searchtest
Open

Increase test coverage for search.dart#9795
kenzieschmoll wants to merge 7 commits intoflutter:masterfrom
kenzieschmoll:searchtest

Conversation

@kenzieschmoll
Copy link
Copy Markdown
Member

Fixes #3514.

@kenzieschmoll kenzieschmoll requested review from a team and srawlins as code owners April 21, 2026 20:40
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds build/ to the .gitignore and significantly expands test coverage for search and autocomplete functionality in devtools_app. It introduces new tests for match navigation, search resetting, debouncing, and autocomplete logic, along with widget tests for search fields. Feedback suggests using fakeAsync for more reliable tests, passing RegExp objects directly for idiomatic string matching, and replacing a GlobalKey getter with a final field to avoid Flutter anti-patterns.

Comment thread packages/devtools_app/test/shared/ui/search_test.dart Outdated
Comment thread packages/devtools_app/test/shared/ui/search_test.dart
Comment thread packages/devtools_app/test/shared/ui/search_test.dart Outdated
Comment thread packages/devtools_app/test/shared/ui/search_test.dart Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to just send out a PR that re-formats all files?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think what we need to do is include the tool/ directory in the CI formatting check. Right now I believe it is omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase test coverage for search.dart

2 participants