feat(video_calls): fixed recinnecting logic, added consultant bage

This commit is contained in:
misha
2026-06-26 08:56:57 +03:00
parent 59f42c9b1e
commit bde4eea7d1
22 changed files with 272 additions and 57 deletions

View File

@@ -1,5 +1,7 @@
import 'package:eatvio_app/features/video_calls/presentation/widgets/video_call_name_chips.dart';
import 'package:eatvio_app/generated/l10n.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
@@ -18,4 +20,30 @@ void main() {
expect(find.text('Alex'), findsOneWidget);
});
testWidgets('VideoCallParticipantNameLabel renders consultant role above name', (tester) async {
await tester.pumpWidget(
MaterialApp(
localizationsDelegates: const [
S.delegate,
...GlobalMaterialLocalizations.delegates,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: S.delegate.supportedLocales,
home: const Scaffold(
body: Stack(
children: [
VideoCallParticipantNameLabel(
name: 'Alex',
isConsultant: true,
),
],
),
),
),
);
expect(find.text('Alex'), findsOneWidget);
expect(find.text('Eatvio consultant'), findsOneWidget);
});
}