Treat hidden IndexedStack children as offstage for test finder (#123129)

Treat hidden `IndexedStack` children as offstage for test finder
This commit is contained in:
Simon Binder
2023-03-29 21:58:58 +02:00
committed by GitHub
parent 42f61b32c5
commit c71f1dd76b
6 changed files with 164 additions and 96 deletions

View File

@@ -318,8 +318,9 @@ void main() {
],
)),
);
expect(find.byType(GestureDetector), findsNWidgets(2));
final Finder hitTestable = find.byType(GestureDetector).hitTestable();
expect(find.byType(GestureDetector), findsOneWidget);
expect(find.byType(GestureDetector, skipOffstage: false), findsNWidgets(2));
final Finder hitTestable = find.byType(GestureDetector, skipOffstage: false).hitTestable();
expect(hitTestable, findsOneWidget);
expect(tester.widget(hitTestable).key, const ValueKey<int>(0));
});