Remove opt out for CurvedAnimation. (#147594)
This commit is contained in:
parent
0214afb40b
commit
65e3007687
@ -8,7 +8,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
|
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
@ -143,10 +142,7 @@ void main() {
|
|||||||
expect(tester.getRect(find.byWidget(child)), childRect);
|
expect(tester.getRect(find.byWidget(child)), childRect);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Can open CupertinoContextMenu by tap and hold',
|
testWidgets('Can open CupertinoContextMenu by tap and hold', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final Widget child = getChild();
|
final Widget child = getChild();
|
||||||
await tester.pumpWidget(getContextMenu(child: child));
|
await tester.pumpWidget(getContextMenu(child: child));
|
||||||
expect(find.byWidget(child), findsOneWidget);
|
expect(find.byWidget(child), findsOneWidget);
|
||||||
@ -593,10 +589,7 @@ void main() {
|
|||||||
expect(findStatic(), findsNothing);
|
expect(findStatic(), findsNothing);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Can close CupertinoContextMenu by flinging down',
|
testWidgets('Can close CupertinoContextMenu by flinging down', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final Widget child = getChild();
|
final Widget child = getChild();
|
||||||
await tester.pumpWidget(getContextMenu(child: child));
|
await tester.pumpWidget(getContextMenu(child: child));
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
|
|
||||||
@ -356,10 +355,7 @@ void main() {
|
|||||||
expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'OK')), equals(const Size(310.0, 98.0)));
|
expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'OK')), equals(const Size(310.0, 98.0)));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Dialog respects small constraints.',
|
testWidgets('Dialog respects small constraints.', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final ScrollController scrollController = ScrollController();
|
final ScrollController scrollController = ScrollController();
|
||||||
addTearDown(scrollController.dispose);
|
addTearDown(scrollController.dispose);
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
|
@ -12,7 +12,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
|
|
||||||
@ -644,10 +643,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Fullscreen route animates correct transform values over time',
|
testWidgets('Fullscreen route animates correct transform values over time', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
CupertinoApp(
|
CupertinoApp(
|
||||||
home: Builder(
|
home: Builder(
|
||||||
@ -865,17 +861,11 @@ void main() {
|
|||||||
expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(-0.0, epsilon: 1.0));
|
expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(-0.0, epsilon: 1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top',
|
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await testParallax(tester, fromFullscreenDialog: false);
|
await testParallax(tester, fromFullscreenDialog: false);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top',
|
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await testParallax(tester, fromFullscreenDialog: true);
|
await testParallax(tester, fromFullscreenDialog: true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -989,17 +979,11 @@ void main() {
|
|||||||
expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(0.0, epsilon: 1.0));
|
expect(tester.getTopLeft(find.byType(Placeholder)).dx, moreOrLessEquals(0.0, epsilon: 1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation',
|
testWidgets('CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await testParallax(tester, fromFullscreenDialog: false);
|
await testParallax(tester, fromFullscreenDialog: false);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation',
|
testWidgets('FullscreenDialog CupertinoPageRoute has parallax when non fullscreenDialog route is pushed on top and gets popped before the end of the animation', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await testParallax(tester, fromFullscreenDialog: true);
|
await testParallax(tester, fromFullscreenDialog: true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -1085,24 +1069,15 @@ void main() {
|
|||||||
expect(tester.getTopLeft(find.byType(Placeholder)).dx, 0.0);
|
expect(tester.getTopLeft(find.byType(Placeholder)).dx, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
testWidgets('CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top',
|
testWidgets('CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await testNoParallax(tester, fromFullscreenDialog: false);
|
await testNoParallax(tester, fromFullscreenDialog: false);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('FullscreenDialog CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top',
|
testWidgets('FullscreenDialog CupertinoPageRoute has no parallax when fullscreenDialog route is pushed on top', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await testNoParallax(tester, fromFullscreenDialog: true);
|
await testNoParallax(tester, fromFullscreenDialog: true);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Animated push/pop is not linear',
|
testWidgets('Animated push/pop is not linear', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const CupertinoApp(
|
const CupertinoApp(
|
||||||
home: Text('1'),
|
home: Text('1'),
|
||||||
@ -2620,10 +2595,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets(
|
testWidgets( 'Fullscreen route does not leak CurveAnimation', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
'Fullscreen route does not leak CurveAnimation', (WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: Builder(
|
home: Builder(
|
||||||
@ -2667,10 +2639,7 @@ void main() {
|
|||||||
await tester.pump(const Duration(milliseconds: 400));
|
await tester.pump(const Duration(milliseconds: 400));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('CupertinoModalPopupRoute does not leak CurveAnimation',
|
testWidgets('CupertinoModalPopupRoute does not leak CurveAnimation', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: Navigator(
|
home: Navigator(
|
||||||
onGenerateRoute: (RouteSettings settings) {
|
onGenerateRoute: (RouteSettings settings) {
|
||||||
@ -2697,10 +2666,7 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('CupertinoDialogRoute does not leak CurveAnimation',
|
testWidgets('CupertinoDialogRoute does not leak CurveAnimation', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: Navigator(
|
home: Navigator(
|
||||||
onGenerateRoute: (RouteSettings settings) {
|
onGenerateRoute: (RouteSettings settings) {
|
||||||
|
@ -14,13 +14,9 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Switch can toggle on tap',
|
testWidgets('Switch can toggle on tap', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final Key switchKey = UniqueKey();
|
final Key switchKey = UniqueKey();
|
||||||
bool value = false;
|
bool value = false;
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
|
@ -43,16 +43,9 @@ Future<void> testExecutable(FutureOr<void> Function() testMain) {
|
|||||||
|
|
||||||
if (_isLeakTrackingEnabled()) {
|
if (_isLeakTrackingEnabled()) {
|
||||||
LeakTesting.enable();
|
LeakTesting.enable();
|
||||||
|
|
||||||
LeakTracking.warnForUnsupportedPlatforms = false;
|
LeakTracking.warnForUnsupportedPlatforms = false;
|
||||||
|
|
||||||
LeakTesting.settings = LeakTesting.settings.withIgnored(
|
LeakTesting.settings = LeakTesting.settings.withIgnored(
|
||||||
createdByTestHelpers: true,
|
createdByTestHelpers: true,
|
||||||
allNotGCed: true,
|
|
||||||
classes: <String>[
|
|
||||||
// TODO(polina-c): CurvedAnimation is leaking, https://github.com/flutter/flutter/issues/145600 [leaks-to-clean]
|
|
||||||
'CurvedAnimation',
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('MaterialBanner properties are respected', (WidgetTester tester) async {
|
testWidgets('MaterialBanner properties are respected', (WidgetTester tester) async {
|
||||||
@ -508,10 +507,7 @@ void main() {
|
|||||||
expect(find.text('banner2'), findsNothing);
|
expect(find.text('banner2'), findsNothing);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('ScaffoldMessenger does not duplicate a MaterialBanner when presenting a SnackBar.',
|
testWidgets('ScaffoldMessenger does not duplicate a MaterialBanner when presenting a SnackBar.', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
const Key materialBannerTapTarget = Key('materialbanner-tap-target');
|
const Key materialBannerTapTarget = Key('materialbanner-tap-target');
|
||||||
const Key snackBarTapTarget = Key('snackbar-tap-target');
|
const Key snackBarTapTarget = Key('snackbar-tap-target');
|
||||||
const String snackBarText = 'SnackBar';
|
const String snackBarText = 'SnackBar';
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
test('MaterialBannerThemeData copyWith, ==, hashCode basics', () {
|
test('MaterialBannerThemeData copyWith, ==, hashCode basics', () {
|
||||||
@ -325,10 +324,7 @@ void main() {
|
|||||||
expect(find.byType(Divider), findsNothing);
|
expect(find.byType(Divider), findsNothing);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('MaterialBanner widget properties take priority over theme when presented by ScaffoldMessenger',
|
testWidgets('MaterialBanner widget properties take priority over theme when presented by ScaffoldMessenger', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
const Color backgroundColor = Colors.purple;
|
const Color backgroundColor = Colors.purple;
|
||||||
const double elevation = 6.0;
|
const double elevation = 6.0;
|
||||||
const TextStyle textStyle = TextStyle(color: Colors.green);
|
const TextStyle textStyle = TextStyle(color: Colors.green);
|
||||||
|
@ -14,7 +14,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
import 'package:vector_math/vector_math_64.dart' show Vector3;
|
import 'package:vector_math/vector_math_64.dart' show Vector3;
|
||||||
|
|
||||||
import '../widgets/feedback_tester.dart';
|
import '../widgets/feedback_tester.dart';
|
||||||
@ -2188,10 +2187,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('BottomNavigationBar handles items.length changes',
|
testWidgets('BottomNavigationBar handles items.length changes', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
// Regression test for https://github.com/flutter/flutter/issues/10322
|
// Regression test for https://github.com/flutter/flutter/issues/10322
|
||||||
|
|
||||||
Widget buildFrame(int itemCount) {
|
Widget buildFrame(int itemCount) {
|
||||||
@ -2326,10 +2322,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
for (int pump = 1; pump < 9; pump++) {
|
for (int pump = 1; pump < 9; pump++) {
|
||||||
testWidgets('pump $pump',
|
testWidgets('pump $pump', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']).withCreationStackTrace(),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(runTest());
|
await tester.pumpWidget(runTest());
|
||||||
await tester.tap(find.text('Green'));
|
await tester.tap(find.text('Green'));
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ import 'dart:ui';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
@ -1283,10 +1281,7 @@ void main() {
|
|||||||
await checkDragHandleAndColors();
|
await checkDragHandleAndColors();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('showModalBottomSheet does not use root Navigator by default',
|
testWidgets('showModalBottomSheet does not use root Navigator by default', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
body: Navigator(onGenerateRoute: (RouteSettings settings) => MaterialPageRoute<void>(builder: (_) {
|
body: Navigator(onGenerateRoute: (RouteSettings settings) => MaterialPageRoute<void>(builder: (_) {
|
||||||
|
@ -6,7 +6,6 @@ import 'package:flutter/gestures.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
test('DataTableThemeData copyWith, ==, hashCode basics', () {
|
test('DataTableThemeData copyWith, ==, hashCode basics', () {
|
||||||
@ -553,10 +552,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// This is a regression test for https://github.com/flutter/flutter/issues/143340.
|
// This is a regression test for https://github.com/flutter/flutter/issues/143340.
|
||||||
testWidgets('DataColumn label can be centered with DataTableTheme.headingRowAlignment',
|
testWidgets('DataColumn label can be centered with DataTableTheme.headingRowAlignment', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
const double horizontalMargin = 24.0;
|
const double horizontalMargin = 24.0;
|
||||||
|
|
||||||
Widget buildTable({ MainAxisAlignment? headingRowAlignment, bool sortEnabled = false }) {
|
Widget buildTable({ MainAxisAlignment? headingRowAlignment, bool sortEnabled = false }) {
|
||||||
|
@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
class TestIcon extends StatefulWidget {
|
class TestIcon extends StatefulWidget {
|
||||||
const TestIcon({super.key});
|
const TestIcon({super.key});
|
||||||
@ -223,10 +222,7 @@ void main() {
|
|||||||
expect(iconColor(collapsedIconKey), foregroundColor);
|
expect(iconColor(collapsedIconKey), foregroundColor);
|
||||||
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
|
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
|
||||||
|
|
||||||
testWidgets('ExpansionTile subtitle',
|
testWidgets('ExpansionTile subtitle', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const MaterialApp(
|
const MaterialApp(
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
|
@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/feedback_tester.dart';
|
import '../widgets/feedback_tester.dart';
|
||||||
|
|
||||||
@ -957,10 +956,7 @@ void main() {
|
|||||||
expect(getIconData(tester).color, theme.iconTheme.color?.withAlpha(0xde));
|
expect(getIconData(tester).color, theme.iconTheme.color?.withAlpha(0xde));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Customize FilterChip delete button',
|
testWidgets('Customize FilterChip delete button', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
Widget buildChip({
|
Widget buildChip({
|
||||||
Widget? deleteIcon,
|
Widget? deleteIcon,
|
||||||
Color? deleteIconColor,
|
Color? deleteIconColor,
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Theme.wrap()', (WidgetTester tester) async {
|
testWidgets('Theme.wrap()', (WidgetTester tester) async {
|
||||||
@ -146,10 +145,7 @@ void main() {
|
|||||||
await tester.pumpAndSettle(); // menu route animation
|
await tester.pumpAndSettle(); // menu route animation
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Material3 - PopupMenuTheme.wrap()',
|
testWidgets('Material3 - PopupMenuTheme.wrap()', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
const TextStyle textStyle = TextStyle(fontSize: 24.0, color: Color(0xFF0000FF));
|
const TextStyle textStyle = TextStyle(fontSize: 24.0, color: Color(0xFF0000FF));
|
||||||
|
|
||||||
Widget buildFrame() {
|
Widget buildFrame() {
|
||||||
|
@ -10,7 +10,6 @@ library;
|
|||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
/// Adds the basic requirements for a Chip.
|
/// Adds the basic requirements for a Chip.
|
||||||
Widget wrapForChip({
|
Widget wrapForChip({
|
||||||
@ -457,10 +456,7 @@ void main() {
|
|||||||
await expectLater(find.byType(RawChip), matchesGoldenFile('input_chip.disabled.delete_button.png'));
|
await expectLater(find.byType(RawChip), matchesGoldenFile('input_chip.disabled.delete_button.png'));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Delete button tooltip is not shown on disabled InputChip',
|
testWidgets('Delete button tooltip is not shown on disabled InputChip', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
Widget buildChip({ bool enabled = true }) {
|
Widget buildChip({ bool enabled = true }) {
|
||||||
return wrapForChip(
|
return wrapForChip(
|
||||||
child: InputChip(
|
child: InputChip(
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
test('copyWith, ==, hashCode basics', () {
|
test('copyWith, ==, hashCode basics', () {
|
||||||
@ -146,10 +145,7 @@ void main() {
|
|||||||
expect(_indicatorDecoration(tester)?.shape, indicatorShape);
|
expect(_indicatorDecoration(tester)?.shape, indicatorShape);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('NavigationRail values take priority over NavigationRailThemeData values when both properties are specified',
|
testWidgets('NavigationRail values take priority over NavigationRailThemeData values when both properties are specified', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
const Color backgroundColor = Color(0x00000001);
|
const Color backgroundColor = Color(0x00000001);
|
||||||
const double elevation = 7.0;
|
const double elevation = 7.0;
|
||||||
const double selectedIconSize = 25.0;
|
const double selectedIconSize = 25.0;
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
const Color kSelectedColor = Color(0xFF00FF00);
|
const Color kSelectedColor = Color(0xFF00FF00);
|
||||||
const Color kUnselectedColor = Colors.transparent;
|
const Color kUnselectedColor = Colors.transparent;
|
||||||
@ -87,10 +86,7 @@ void main() {
|
|||||||
expect(indicatorColors(tester), const <Color>[kUnselectedColor, kUnselectedColor, kSelectedColor]);
|
expect(indicatorColors(tester), const <Color>[kUnselectedColor, kUnselectedColor, kSelectedColor]);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('PageSelector responds correctly to TabController.animateTo()',
|
testWidgets('PageSelector responds correctly to TabController.animateTo()', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final TabController tabController = TabController(
|
final TabController tabController = TabController(
|
||||||
vsync: const TestVSync(),
|
vsync: const TestVSync(),
|
||||||
length: 3,
|
length: 3,
|
||||||
@ -282,10 +278,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('PageSelector responds correctly to TabController.animateTo() from the default tab controller',
|
testWidgets('PageSelector responds correctly to TabController.animateTo() from the default tab controller', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
Localizations(
|
Localizations(
|
||||||
locale: const Locale('en', 'US'),
|
locale: const Locale('en', 'US'),
|
||||||
|
@ -8,7 +8,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
|
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
|
||||||
@ -98,10 +97,7 @@ void main() {
|
|||||||
expect(findZoomPageTransition(), findsOneWidget);
|
expect(findZoomPageTransition(), findsOneWidget);
|
||||||
}, variant: TargetPlatformVariant.only(TargetPlatform.android));
|
}, variant: TargetPlatformVariant.only(TargetPlatform.android));
|
||||||
|
|
||||||
testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition',
|
testWidgets('PageTransitionsTheme override builds a _OpenUpwardsPageTransition', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
||||||
'/': (BuildContext context) => Material(
|
'/': (BuildContext context) => Material(
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
|
@ -6,7 +6,6 @@ import 'package:flutter/gestures.dart' show DragStartBehavior;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import 'data_table_test_utils.dart';
|
import 'data_table_test_utils.dart';
|
||||||
|
|
||||||
@ -71,10 +70,7 @@ void main() {
|
|||||||
setUp(() => source = TestDataSource());
|
setUp(() => source = TestDataSource());
|
||||||
tearDown(() => source.dispose());
|
tearDown(() => source.dispose());
|
||||||
|
|
||||||
testWidgets('PaginatedDataTable paging',
|
testWidgets('PaginatedDataTable paging', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final List<String> log = <String>[];
|
final List<String> log = <String>[];
|
||||||
|
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
@ -383,10 +379,7 @@ void main() {
|
|||||||
expect(find.byWidgetPredicate((Widget widget) => widget is SizedBox && widget.height == (rowsPerPage - (rowCount % rowsPerPage)) * 46.0), findsOneWidget);
|
expect(find.byWidgetPredicate((Widget widget) => widget is SizedBox && widget.height == (rowsPerPage - (rowCount % rowsPerPage)) * 46.0), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('PaginatedDataTable control test',
|
testWidgets('PaginatedDataTable control test', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
TestDataSource source = TestDataSource()
|
TestDataSource source = TestDataSource()
|
||||||
..generation = 42;
|
..generation = 42;
|
||||||
addTearDown(source.dispose);
|
addTearDown(source.dispose);
|
||||||
|
@ -9,7 +9,6 @@ import 'package:flutter/gestures.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/feedback_tester.dart';
|
import '../widgets/feedback_tester.dart';
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
@ -2142,10 +2141,7 @@ void main() {
|
|||||||
expect(find.text('PopupMenuButton icon'), findsOneWidget);
|
expect(find.text('PopupMenuButton icon'), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('showMenu uses nested navigator by default',
|
testWidgets('showMenu uses nested navigator by default', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final MenuObserver rootObserver = MenuObserver();
|
final MenuObserver rootObserver = MenuObserver();
|
||||||
final MenuObserver nestedObserver = MenuObserver();
|
final MenuObserver nestedObserver = MenuObserver();
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/src/physics/utils.dart' show nearEqual;
|
import 'package:flutter/src/physics/utils.dart' show nearEqual;
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
|
|
||||||
@ -120,10 +119,7 @@ void main() {
|
|||||||
expect(dragStarted, false);
|
expect(dragStarted, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Range Slider can move when tapped (continuous LTR)',
|
testWidgets('Range Slider can move when tapped (continuous LTR)', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
RangeValues values = const RangeValues(0.3, 0.7);
|
RangeValues values = const RangeValues(0.3, 0.7);
|
||||||
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
|
@ -11,7 +11,6 @@ import 'package:flutter/gestures.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('$ReorderableListView', () {
|
group('$ReorderableListView', () {
|
||||||
@ -690,10 +689,7 @@ void main() {
|
|||||||
handle.dispose();
|
handle.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets("Doesn't hide accessibility when a child declares its own semantics",
|
testWidgets("Doesn't hide accessibility when a child declares its own semantics", (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final SemanticsHandle handle = tester.ensureSemantics();
|
final SemanticsHandle handle = tester.ensureSemantics();
|
||||||
final Widget reorderableListView = ReorderableListView(
|
final Widget reorderableListView = ReorderableListView(
|
||||||
onReorder: (int oldIndex, int newIndex) { },
|
onReorder: (int oldIndex, int newIndex) { },
|
||||||
|
@ -9,7 +9,6 @@ import 'package:flutter/gestures.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
|
|
||||||
@ -899,10 +898,7 @@ void main() {
|
|||||||
expect(textField.textCapitalization, TextCapitalization.none);
|
expect(textField.textCapitalization, TextCapitalization.none);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('SearchAnchor respects viewOnChanged and viewOnSubmitted properties',
|
testWidgets('SearchAnchor respects viewOnChanged and viewOnSubmitted properties', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final SearchController controller = SearchController();
|
final SearchController controller = SearchController();
|
||||||
addTearDown(controller.dispose);
|
addTearDown(controller.dispose);
|
||||||
int onChangedCalled = 0;
|
int onChangedCalled = 0;
|
||||||
|
@ -13,7 +13,6 @@ import 'package:flutter/scheduler.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/src/physics/utils.dart' show nearEqual;
|
import 'package:flutter/src/physics/utils.dart' show nearEqual;
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
|
|
||||||
@ -171,10 +170,7 @@ void main() {
|
|||||||
expect(log[0], const Offset(212.0, 300.0));
|
expect(log[0], const Offset(212.0, 300.0));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets(
|
testWidgets('Slider can move when tapped (LTR)', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
'Slider can move when tapped (LTR)', (WidgetTester tester) async {
|
|
||||||
final Key sliderKey = UniqueKey();
|
final Key sliderKey = UniqueKey();
|
||||||
double value = 0.0;
|
double value = 0.0;
|
||||||
double? startValue;
|
double? startValue;
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
import '../widgets/semantics_tester.dart';
|
import '../widgets/semantics_tester.dart';
|
||||||
|
|
||||||
const Key avatarA = Key('A');
|
const Key avatarA = Key('A');
|
||||||
@ -262,10 +261,7 @@ void main() {
|
|||||||
expect(transformWidget.transform.getRotation()[4], 1.0);
|
expect(transformWidget.transform.getRotation()[4], 1.0);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('UserAccountsDrawerHeader icon color changes',
|
testWidgets('UserAccountsDrawerHeader icon color changes', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: Material(
|
home: Material(
|
||||||
child: UserAccountsDrawerHeader(
|
child: UserAccountsDrawerHeader(
|
||||||
|
@ -10,7 +10,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
Future<void> verifyMarkedNeedsLayoutDuringTransientCallbacksPhase(WidgetTester tester, RenderObject renderObject) async {
|
Future<void> verifyMarkedNeedsLayoutDuringTransientCallbacksPhase(WidgetTester tester, RenderObject renderObject) async {
|
||||||
assert(!renderObject.debugNeedsLayout);
|
assert(!renderObject.debugNeedsLayout);
|
||||||
@ -213,10 +212,7 @@ void main() {
|
|||||||
await verifyMarkedNeedsLayoutDuringTransientCallbacksPhase(tester, renderObject);
|
await verifyMarkedNeedsLayoutDuringTransientCallbacksPhase(tester, renderObject);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Slider relayout upon system fonts changes',
|
testWidgets('Slider relayout upon system fonts changes', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: Material(
|
home: Material(
|
||||||
|
@ -14,7 +14,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
class _TestSliverPersistentHeaderDelegate extends SliverPersistentHeaderDelegate {
|
class _TestSliverPersistentHeaderDelegate extends SliverPersistentHeaderDelegate {
|
||||||
_TestSliverPersistentHeaderDelegate({
|
_TestSliverPersistentHeaderDelegate({
|
||||||
@ -2055,10 +2054,7 @@ void main() {
|
|||||||
expect(tester.getTopLeft(find.text('Item 9')).dy, 226.0);
|
expect(tester.getTopLeft(find.text('Item 9')).dy, 226.0);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('allows overscrolling on default platforms - vertical',
|
testWidgets('allows overscrolling on default platforms - vertical', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
// Regression test for https://github.com/flutter/flutter/issues/10949
|
// Regression test for https://github.com/flutter/flutter/issues/10949
|
||||||
// Scrollables should overscroll by default on iOS and macOS
|
// Scrollables should overscroll by default on iOS and macOS
|
||||||
final ScrollController controller = ScrollController();
|
final ScrollController controller = ScrollController();
|
||||||
|
@ -11,7 +11,6 @@ library;
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import '../impeller_test_helpers.dart';
|
import '../impeller_test_helpers.dart';
|
||||||
|
|
||||||
@ -31,10 +30,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Color filter - sepia',
|
testWidgets('Color filter - sepia', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
|
|
||||||
const ColorFilter sepia = ColorFilter.matrix(<double>[
|
const ColorFilter sepia = ColorFilter.matrix(<double>[
|
||||||
0.39, 0.769, 0.189, 0, 0, //
|
0.39, 0.769, 0.189, 0, 0, //
|
||||||
|
@ -8,7 +8,6 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import 'semantics_tester.dart';
|
import 'semantics_tester.dart';
|
||||||
|
|
||||||
@ -2821,10 +2820,7 @@ void main() {
|
|||||||
expect(events.length, 2);
|
expect(events.length, 2);
|
||||||
}, variant: KeySimulatorTransitModeVariant.all());
|
}, variant: KeySimulatorTransitModeVariant.all());
|
||||||
|
|
||||||
testWidgets('Focus traversal does not throw when no focusable is available in a group',
|
testWidgets('Focus traversal does not throw when no focusable is available in a group', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(const MaterialApp(home: Scaffold(body: ListTile(title: Text('title')))));
|
await tester.pumpWidget(const MaterialApp(home: Scaffold(body: ListTile(title: Text('title')))));
|
||||||
final FocusNode? initialFocus = primaryFocus;
|
final FocusNode? initialFocus = primaryFocus;
|
||||||
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
|
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
|
||||||
|
@ -301,10 +301,7 @@ Future<void> main() async {
|
|||||||
expect(find.byKey(thirdKey), isInCard);
|
expect(find.byKey(thirdKey), isInCard);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Heroes still animate after hero controller is swapped.',
|
testWidgets('Heroes still animate after hero controller is swapped.', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final GlobalKey<NavigatorState> key = GlobalKey<NavigatorState>();
|
final GlobalKey<NavigatorState> key = GlobalKey<NavigatorState>();
|
||||||
final UniqueKey heroKey = UniqueKey();
|
final UniqueKey heroKey = UniqueKey();
|
||||||
final HeroController controller1 = HeroController();
|
final HeroController controller1 = HeroController();
|
||||||
|
@ -8,7 +8,6 @@ import 'dart:ui';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
import 'semantics_tester.dart';
|
import 'semantics_tester.dart';
|
||||||
|
|
||||||
@ -975,10 +974,7 @@ void main() {
|
|||||||
expect(secondaryAnimationOfRouteOne.value, primaryAnimationOfRouteTwo.value);
|
expect(secondaryAnimationOfRouteOne.value, primaryAnimationOfRouteTwo.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('showGeneralDialog handles transparent barrier color',
|
testWidgets('showGeneralDialog handles transparent barrier color', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: Builder(
|
home: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
class TestItem extends StatelessWidget {
|
class TestItem extends StatelessWidget {
|
||||||
const TestItem({ super.key, required this.item, this.width, this.height });
|
const TestItem({ super.key, required this.item, this.width, this.height });
|
||||||
@ -41,10 +40,7 @@ Widget buildFrame({ int? count, double? width, double? height, Axis? scrollDirec
|
|||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('SliverPrototypeExtentList.builder test',
|
testWidgets('SliverPrototypeExtentList.builder test', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
|
@ -10,7 +10,6 @@ library;
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Centered text', (WidgetTester tester) async {
|
testWidgets('Centered text', (WidgetTester tester) async {
|
||||||
@ -189,11 +188,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets(
|
testWidgets('Text Fade', (WidgetTester tester) async {
|
||||||
'Text Fade',
|
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
theme: ThemeData(useMaterial3: false),
|
theme: ThemeData(useMaterial3: false),
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('toString control test', (WidgetTester tester) async {
|
testWidgets('toString control test', (WidgetTester tester) async {
|
||||||
@ -96,10 +95,7 @@ void main() {
|
|||||||
expect(actualDecoration.boxShadow, null);
|
expect(actualDecoration.boxShadow, null);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('animations work with curves test',
|
testWidgets('animations work with curves test', (WidgetTester tester) async {
|
||||||
// TODO(polina-c): remove when fixed https://github.com/flutter/flutter/issues/145600 [leak-tracking-opt-in]
|
|
||||||
experimentalLeakTesting: LeakTesting.settings.withTracked(classes: const <String>['CurvedAnimation']),
|
|
||||||
(WidgetTester tester) async {
|
|
||||||
final CurvedAnimation curvedAnimation = CurvedAnimation(
|
final CurvedAnimation curvedAnimation = CurvedAnimation(
|
||||||
parent: controller,
|
parent: controller,
|
||||||
curve: Curves.easeOut,
|
curve: Curves.easeOut,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user