fix(test): settle the menu overlay before re-tapping the top button
The "tapping the same top button toggles closed" case re-tapped File before the open overlay finished laying out, so getCenter intermittently threw on a not-yet-positioned hit box under load. Settle first. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user