forked from eatvio/eatvio_app
feat(video_calls): call ended push, recall button for message
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:eatvio_app/features/video_calls/presentation/widgets/video_call_top_overlay.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('insertBanner shows message and can be removed manually', (
|
||||
@@ -67,4 +68,36 @@ void main() {
|
||||
await tester.pump();
|
||||
expect(find.text('Recording notice'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('showPoorConnectionIcon renders compact icon chip', (tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(home: Scaffold(body: SizedBox.shrink())),
|
||||
);
|
||||
|
||||
final context = tester.element(find.byType(SizedBox));
|
||||
VideoCallTopOverlay.showPoorConnectionIcon(context);
|
||||
|
||||
await tester.pump();
|
||||
expect(find.byType(SvgPicture), findsOneWidget);
|
||||
expect(find.text('Poor connection'), findsNothing);
|
||||
expect(VideoCallTopOverlay.isPoorConnectionIconVisible, isTrue);
|
||||
});
|
||||
|
||||
testWidgets('hidePoorConnectionIcon removes poor connection chip', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(home: Scaffold(body: SizedBox.shrink())),
|
||||
);
|
||||
|
||||
final context = tester.element(find.byType(SizedBox));
|
||||
VideoCallTopOverlay.showPoorConnectionIcon(context);
|
||||
await tester.pump();
|
||||
expect(VideoCallTopOverlay.isPoorConnectionIconVisible, isTrue);
|
||||
|
||||
VideoCallTopOverlay.hidePoorConnectionIcon();
|
||||
await tester.pump();
|
||||
expect(VideoCallTopOverlay.isPoorConnectionIconVisible, isFalse);
|
||||
expect(find.byType(SvgPicture), findsNothing);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user