Fix teardown of a FocusScopeNode in material/app_test (#151115)

This test suite had been failing when run with --test-randomize-ordering-seed=20240701
This commit is contained in:
Jason Simmons
2024-07-01 10:06:54 -07:00
committed by GitHub
parent 99bb2ff6a6
commit 1ebbb9d711

View File

@@ -58,6 +58,7 @@ void main() {
testWidgets('Can place app inside FocusScope', (WidgetTester tester) async {
final FocusScopeNode focusScopeNode = FocusScopeNode();
addTearDown(focusScopeNode.dispose);
await tester.pumpWidget(FocusScope(
autofocus: true,
@@ -68,7 +69,6 @@ void main() {
));
expect(find.text('Home'), findsOneWidget);
focusScopeNode.dispose();
});
testWidgets('Can show grid without losing sync', (WidgetTester tester) async {