feat(video_calls): call ended push, recall button for message

This commit is contained in:
misha
2026-06-30 16:11:18 +03:00
parent c0c7e2e658
commit f493e07f9f
30 changed files with 671 additions and 83 deletions

View File

@@ -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);
});
}