Skip to content

Commit

Permalink
Mark routing test as leaking. (#133697)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Aug 30, 2023
1 parent 784629c commit 2bc4c7a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/flutter/test/material/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void main() {
expect(focusNode.hasFocus, isTrue);
});

testWidgets('Can place app inside FocusScope', (WidgetTester tester) async {
testWidgetsWithLeakTracking('Can place app inside FocusScope', (WidgetTester tester) async {
final FocusScopeNode focusScopeNode = FocusScopeNode();

await tester.pumpWidget(FocusScope(
Expand All @@ -69,6 +69,7 @@ void main() {
));

expect(find.text('Home'), findsOneWidget);
focusScopeNode.dispose();
});

testWidgetsWithLeakTracking('Can show grid without losing sync', (WidgetTester tester) async {
Expand Down Expand Up @@ -310,7 +311,7 @@ void main() {
expect(find.text('route "/b"', skipOffstage: false), findsNothing);
});

testWidgets('Initial route with missing step', (WidgetTester tester) async {
testWidgetsWithLeakTracking('Initial route with missing step', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/': (BuildContext context) => const Text('route "/"'),
'/a': (BuildContext context) => const Text('route "/a"'),
Expand All @@ -333,7 +334,12 @@ void main() {
expect(find.text('route "/a/b"'), findsNothing);
expect(find.text('route "/b"'), findsNothing);
}
});
},
// TODO(polina-c): remove after fixing
// https://github.com/flutter/flutter/issues/133695
leakTrackingTestConfig: const LeakTrackingTestConfig(
notDisposedAllowList: <String, int?> {'ValueNotifier<String?>': 3},
));

testWidgetsWithLeakTracking('Make sure initialRoute is only used the first time', (WidgetTester tester) async {
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
Expand Down

0 comments on commit 2bc4c7a

Please sign in to comment.