Merge branch 'fix/mobile-motion'
This commit is contained in:
@@ -14,6 +14,7 @@ Future<void> _pump(
|
||||
WidgetTester tester, {
|
||||
required bool peek,
|
||||
required double reveal,
|
||||
double? height,
|
||||
}) async {
|
||||
final gateway = FakeChatGateway();
|
||||
addTearDown(gateway.close);
|
||||
@@ -31,14 +32,17 @@ Future<void> _pump(
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: ChatPanePresentation(
|
||||
peek: peek,
|
||||
barReveal: AlwaysStoppedAnimation(reveal),
|
||||
child: ChatThreadView(
|
||||
gateway: gateway,
|
||||
sessionId: 's',
|
||||
title: 'Presented',
|
||||
onBack: () {},
|
||||
body: SizedBox(
|
||||
height: height,
|
||||
child: ChatPanePresentation(
|
||||
peek: peek,
|
||||
barReveal: AlwaysStoppedAnimation(reveal),
|
||||
child: ChatThreadView(
|
||||
gateway: gateway,
|
||||
sessionId: 's',
|
||||
title: 'Presented',
|
||||
onBack: () {},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -105,6 +109,24 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
'a retained peek composer measures naturally in a tiny viewport',
|
||||
(tester) async {
|
||||
await _pump(tester, peek: true, reveal: 0, height: 60);
|
||||
expect(tester.takeException(), isNull);
|
||||
expect(
|
||||
find.byWidgetPredicate(
|
||||
(widget) => widget is EditableText && !widget.readOnly,
|
||||
),
|
||||
findsNothing,
|
||||
);
|
||||
expect(
|
||||
find.byKey(const ValueKey('chat-composer-s'), skipOffstage: false),
|
||||
findsOneWidget,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('without a presentation the bar is itself', (tester) async {
|
||||
final gateway = FakeChatGateway();
|
||||
addTearDown(gateway.close);
|
||||
|
||||
Reference in New Issue
Block a user