Shorten quick switching to 440 milliseconds
This commit is contained in:
@@ -152,7 +152,7 @@ void main() {
|
||||
bState.controller.text = 'Retained draft';
|
||||
controller.activate(a);
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 140));
|
||||
await tester.pump(ChatPaneSwitchMotion.duration ~/ 4);
|
||||
final t = ChatPaneSwitchMotion.curve.transform(.25);
|
||||
final incoming = tester.getRect(rect(a));
|
||||
final wrapped = tester.getRect(rect(b));
|
||||
@@ -215,7 +215,7 @@ void main() {
|
||||
final pane = controller.panes.firstWhere((pane) => pane.sessionId == id);
|
||||
await tester.tap(find.byKey(ValueKey('chat-peek-${pane.id}')));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 140));
|
||||
await tester.pump(ChatPaneSwitchMotion.duration ~/ 4);
|
||||
final incoming = tester.getRect(rect(pane.id));
|
||||
final next = controller
|
||||
.panes[(controller.panes.indexWhere((p) => p.id == pane.id) + 1) % 4];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_pane_switch_motion.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_peek_header.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -75,7 +76,7 @@ void main() {
|
||||
before.controller.text = 'Keep my draft';
|
||||
controller.activate(a);
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 140));
|
||||
await tester.pump(ChatPaneSwitchMotion.duration ~/ 4);
|
||||
// Card paint rectangles vary, but transcripts keep their useful full
|
||||
// viewport until settling to the real small preview once.
|
||||
expect(
|
||||
@@ -125,7 +126,7 @@ void main() {
|
||||
QuickSwitchAnimation.rolodex,
|
||||
}.contains(style),
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 210));
|
||||
await tester.pump(ChatPaneSwitchMotion.duration * 3 ~/ 8);
|
||||
expect(
|
||||
surface().children.indexWhere(
|
||||
(w) => w.key == ValueKey('chat-workspace-$b'),
|
||||
|
||||
Reference in New Issue
Block a user