diff --git a/test/builtin/menubar/menu_bar_test.dart b/test/builtin/menubar/menu_bar_test.dart index 972ea07c..3d5fe1fe 100644 --- a/test/builtin/menubar/menu_bar_test.dart +++ b/test/builtin/menubar/menu_bar_test.dart @@ -99,6 +99,9 @@ void main() { await tester.pump(); await openMenu(tester, 'File'); expect(find.text('Open Folder…'), findsOneWidget); + // Let the open overlay finish laying out before re-tapping the top button, + // so its hit-test box is stable under load (getCenter would otherwise throw). + await tester.pumpAndSettle(); await tester.tap(find.text('File')); await tester.pump(); await tester.pump(const Duration(milliseconds: 20)); // flush the close under load