Prepare 0.7.9 with decisive Dock tap transitions
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user