Lay out chat content against the animated pane viewport
This commit is contained in:
@@ -92,6 +92,17 @@ void main() {
|
||||
final intermediate = tester.getSize(_rect(first)).height;
|
||||
expect(intermediate, greaterThan(oldHeight));
|
||||
expect(intermediate, lessThan((800 - 6) * .8));
|
||||
// Content follows the animated viewport, rather than jumping to the
|
||||
// target height and leaving a blank area during the transition.
|
||||
expect(
|
||||
tester.getSize(find.byKey(const ValueKey('a'))).height,
|
||||
closeTo(intermediate, 1),
|
||||
);
|
||||
final shrinkingHeight = tester.getSize(_rect(second)).height;
|
||||
expect(
|
||||
tester.getSize(find.byKey(const ValueKey('b'))).height,
|
||||
closeTo(shrinkingHeight < 300 ? 300 : shrinkingHeight, 1),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
expect(controller.activePane?.sessionId, 'a');
|
||||
expect(tester.getSize(_rect(first)).height, closeTo((800 - 6) * .8, 1));
|
||||
|
||||
Reference in New Issue
Block a user