fix tests

This commit is contained in:
Salvatore Giordano
2022-03-08 10:29:49 +01:00
parent 0c1fb24150
commit 357357cdff
2 changed files with 9 additions and 3 deletions
@@ -1,3 +1,5 @@
import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/src/extension.dart';
@@ -188,7 +190,7 @@ class MessageInputThemeData with Diagnosticable {
linkHighlightColor:
Color.lerp(a.linkHighlightColor, b.linkHighlightColor, t),
enableSafeArea: a.enableSafeArea,
elevation: Tween(begin: a.elevation, end: b.elevation).transform(t),
elevation: lerpDouble(a.elevation, b.elevation, t),
shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
);
@@ -63,19 +63,23 @@ void main() {
Event(type: EventType.typingStart),
}));
const typingKey = Key('typing');
await tester.pumpWidget(MaterialApp(
home: StreamChat(
client: client,
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: TypingIndicator(),
body: TypingIndicator(
key: typingKey,
),
),
),
),
));
expect(find.byKey(const Key('typings')), findsOneWidget);
expect(find.byKey(typingKey), findsOneWidget);
},
);
}