Do not paint a description label when rendering an integration test (#153875)

Fixes https://github.com/flutter/flutter/issues/153624
This commit is contained in:
Jason Simmons
2024-08-29 10:08:38 -07:00
committed by GitHub
parent 05c454c28c
commit 9bf7d7bb35
3 changed files with 17 additions and 2 deletions

View File

@@ -1832,7 +1832,13 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
fontSize: 10.0,
);
void _setDescription(String value) {
/// Label describing the test.
@visibleForTesting
TextPainter? get label => _label;
/// Set a description label that is drawn into the test output.
@protected
void setLabel(String value) {
if (value.isEmpty) {
_label = null;
return;
@@ -2033,7 +2039,7 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
}) {
assert(!inTest);
_inTest = true;
_setDescription(description);
setLabel(description);
return _runTest(testBody, invariantTester, description);
}