Lay out each chat once per center stage move and record the feature
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:pipelines_app/features/chat/workspace/chat_center_stage_controll
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_center_stage_keys.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_center_stage_layout.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_center_stage_strip.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_motion_viewport.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_workspace.dart';
|
||||
import 'package:pipelines_app/features/chat/workspace/chat_workspace_geometry.dart';
|
||||
|
||||
@@ -166,8 +167,18 @@ void main() {
|
||||
stage.value = true;
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 40));
|
||||
// Mid-flight the stage is on its way, neither split nor staged.
|
||||
expect(widthOf(tester, 'three'), inExclusiveRange(before['three']!, 950));
|
||||
// Mid-flight the stage's painted rectangle is on its way, while its chat
|
||||
// is laid out once, at its destination width.
|
||||
final painted = tester
|
||||
.getSize(
|
||||
find.ancestor(
|
||||
of: find.byKey(const ValueKey('input-three')),
|
||||
matching: find.byType(ChatMotionViewport),
|
||||
),
|
||||
)
|
||||
.width;
|
||||
expect(painted, inExclusiveRange(before['three']!, 950));
|
||||
expect(widthOf(tester, 'three'), 950);
|
||||
await tester.pumpAndSettle();
|
||||
expect(widthOf(tester, 'three'), 950);
|
||||
expect(find.byType(ChatCenterStageStrip), findsNWidgets(2));
|
||||
|
||||
Reference in New Issue
Block a user