Cycle mobile tape through added panes and retain horizontal unfold layout
This commit is contained in:
@@ -156,6 +156,10 @@ void main() {
|
||||
);
|
||||
final workspace = tester.widget<ChatWorkspace>(find.byType(ChatWorkspace));
|
||||
expect(workspace.controller.paneCount, 2);
|
||||
expect(
|
||||
(workspace.controller.root as ChatWorkspaceSplit).axis,
|
||||
ChatSplitAxis.horizontal,
|
||||
);
|
||||
expect(workspace.controller.activePane?.sessionId, 'b');
|
||||
final first = workspace.controller.panes.first.id;
|
||||
await tester.tap(find.byKey(ValueKey('chat-peek-$first')));
|
||||
@@ -169,6 +173,25 @@ void main() {
|
||||
isFalse,
|
||||
);
|
||||
expect(tester.state(_thread('a')), same(stateA));
|
||||
tester.view.physicalSize = const Size(880, 1000);
|
||||
await tester.pumpAndSettle();
|
||||
final aRect = tester.getRect(
|
||||
find.byKey(
|
||||
ValueKey('chat-workspace-${workspace.controller.panes.first.id}'),
|
||||
),
|
||||
);
|
||||
final bRect = tester.getRect(
|
||||
find.byKey(
|
||||
ValueKey('chat-workspace-${workspace.controller.panes.last.id}'),
|
||||
),
|
||||
);
|
||||
expect(aRect.top, bRect.top);
|
||||
expect(aRect.right, lessThan(bRect.left));
|
||||
expect(tester.state(_thread('a')), same(stateA));
|
||||
expect(
|
||||
tester.widget<EditableText>(_input('a')).controller.text,
|
||||
'Phone draft A',
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user