Prepare 0.7.9 with decisive Dock tap transitions

This commit is contained in:
david1465833828
2026-10-28 19:37:04 +08:00
parent 23c1a58ca3
commit 8713bce0ee
9 changed files with 85 additions and 9 deletions
+24
View File
@@ -11,6 +11,30 @@ import 'navigation_test.dart' show uiController;
void main() {
setUpAll(tzdata.initializeTimeZones);
testWidgets(
'tap reaches its page promptly and finishes the glass pulse within 480ms',
(tester) async {
await tester.pumpWidget(_dock());
await tester.pumpAndSettle();
final lens = find.byType(GlassRefraction).last;
final rest = tester.getSize(lens);
final target = tester.getCenter(find.byIcon(Icons.assignment_rounded)).dx;
await tester.tap(find.byIcon(Icons.assignment_rounded));
await tester.pump();
await tester.pump(const Duration(milliseconds: 160));
expect((tester.getCenter(lens).dx - target).abs(), lessThan(7));
for (var i = 0; i < 20; i++) {
await tester.pump(const Duration(milliseconds: 16));
}
expect(
find.byKey(const ValueKey('dock-symbol-refraction')),
findsNothing,
);
expect(tester.getSize(lens).width, closeTo(rest.width, 0.5));
expect(tester.getCenter(lens).dx, closeTo(target, 0.6));
await tester.pumpAndSettle();
},
);
testWidgets(
'moving lens refracts symbols above the icon row and releases cleanly',
(tester) async {