[material_ui] Enable chip_test#12009
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes @Skip annotations from several test files, reorganizes imports, and extracts the findByTooltip finder and FeedbackTester helper into standalone test utility files (finders.dart and feedback_tester.dart) to resolve cross-import issues. Feedback is provided to use optional chaining instead of a null assertion operator on widget.richMessage in finders.dart to avoid potential runtime exceptions.
003a9d4 to
0492e1d
Compare
0492e1d to
56ce5d7
Compare
There was a problem hiding this comment.
Code Review
This pull request removes the @Skip annotation from chip_test.dart, fixes cross-imports by updating relative paths, and wraps a thrown multiline string in an Exception object. The review feedback suggests refactoring the multiline string exception message to avoid preserving accidental leading whitespace, recommending adjacent string literals with explicit newlines instead.
| throw Exception(''' | ||
| Expected: center == $expectedCenter, radius == $expectedRadius | ||
| Found: center == $center radius == $radius'''; | ||
| Found: center == $center radius == $radius'''); |
There was a problem hiding this comment.
The multiline string literal preserves the leading whitespace (14 spaces) on each line, which will make the exception message heavily indented and hard to read in test failure logs.
Using adjacent string literals with explicit \n avoids accidental leading whitespace while keeping the code clean and readable.
throw Exception(
'Expected: center == $expectedCenter, radius == $expectedRadius\n'
'Found: center == $center radius == $radius',
);
Port over
chip_testfrom flutter/flutter#184279Work towards flutter/flutter#182636 and flutter/flutter#188395
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2