diff --git a/packages/flutter/test/material/autocomplete_test.dart b/packages/flutter/test/material/autocomplete_test.dart index d7776dc3405..6bae0829a66 100644 --- a/packages/flutter/test/material/autocomplete_test.dart +++ b/packages/flutter/test/material/autocomplete_test.dart @@ -731,6 +731,25 @@ void main() { expect(field2.controller!.text, textSelection); }); + testWidgets('Autocomplete renders at zero area', (WidgetTester tester) async { + await tester.pumpWidget( + MaterialApp( + home: Center( + child: SizedBox.shrink( + child: Scaffold( + body: Autocomplete( + initialValue: const TextEditingValue(text: 'X'), + optionsBuilder: (TextEditingValue textEditingValue) => ['Y'], + ), + ), + ), + ), + ), + ); + final Finder xText = find.text('X'); + expect(tester.getSize(xText), Size.zero); + }); + testWidgets('autocomplete options have button semantics', (WidgetTester tester) async { const Color highlightColor = Color(0xFF112233); await tester.pumpWidget(