From a74119dabd9673cf32726c8886e8120177514b4e Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Mon, 16 Nov 2026 16:46:02 +0300 Subject: [PATCH 1/2] fix(chat): replace video call icon with white phone on blue circle related to: #1057 --- .../chat/presentation/pages/chat_screen.dart | 7 +++---- .../pages/chat_screen_loaded_smoke_test.dart | 12 ++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/features/chat/presentation/pages/chat_screen.dart b/lib/features/chat/presentation/pages/chat_screen.dart index 5c8db98c..a1d33700 100644 --- a/lib/features/chat/presentation/pages/chat_screen.dart +++ b/lib/features/chat/presentation/pages/chat_screen.dart @@ -1050,10 +1050,9 @@ class _ChatHeaderVideoCallButton extends StatelessWidget { @override Widget build(BuildContext context) { - final theme = Theme.of(context); final tooltipMessage = S.maybeOf(context)?.video_call; final button = Material( - color: theme.colorScheme.onPrimary, + color: appTheme.blueA400, borderRadius: BorderRadius.circular(20), elevation: 0, child: InkWell( @@ -1064,8 +1063,8 @@ class _ChatHeaderVideoCallButton extends StatelessWidget { height: 40, child: Center( child: Icon( - Icons.videocam_rounded, - color: appTheme.blueA400, + Icons.call_rounded, + color: appTheme.whiteA700, size: 18, ), ), diff --git a/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart b/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart index c3031f4b..ae9ea5bc 100644 --- a/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart +++ b/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart @@ -197,6 +197,18 @@ void main() { expect(find.byType(ChatScreen), findsOneWidget); expect(find.byType(RefreshIndicator), findsOneWidget); expect(find.text('User Two'), findsOneWidget); + + final callIconFinder = find.byIcon(Icons.call_rounded); + expect(callIconFinder, findsOneWidget); + expect(find.byIcon(Icons.videocam_rounded), findsNothing); + final callIcon = tester.widget(callIconFinder); + expect(callIcon.color, appTheme.whiteA700); + final buttonMaterial = tester.widget( + find + .ancestor(of: callIconFinder, matching: find.byType(Material)) + .first, + ); + expect(buttonMaterial.color, appTheme.blueA400); expect(find.text('hello'), findsOneWidget); expect(find.text('hi'), findsOneWidget); expect(find.text('sending...'), findsOneWidget); From 51440496f14f88ddf8d6a15137c7f92e10bc12e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B0=D1=82=D0=BE=D0=BB=D0=B8=D0=B9=20=D0=9F?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=B7?= Date: Mon, 23 Nov 2026 23:31:50 +0300 Subject: [PATCH 2/2] test(chat): align call button tests with conditional visibility from main --- .../pages/chat_screen_loaded_smoke_test.dart | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart b/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart index 4075bdfe..0a7ce3a6 100644 --- a/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart +++ b/test/features/chat/presentation/pages/chat_screen_loaded_smoke_test.dart @@ -248,23 +248,15 @@ void main() { expect(find.byType(RefreshIndicator), findsOneWidget); expect(find.text('User Two'), findsOneWidget); - final callIconFinder = find.byIcon(Icons.call_rounded); - expect(callIconFinder, findsOneWidget); + // Кнопка звонка скрыта, когда план не выбран (chosenPlan == null). + expect(find.byIcon(Icons.call_rounded), findsNothing); expect(find.byIcon(Icons.videocam_rounded), findsNothing); - final callIcon = tester.widget(callIconFinder); - expect(callIcon.color, appTheme.whiteA700); - final buttonMaterial = tester.widget( - find - .ancestor(of: callIconFinder, matching: find.byType(Material)) - .first, - ); - expect(buttonMaterial.color, appTheme.blueA400); expect(find.text('hello'), findsOneWidget); expect(find.text('hi'), findsOneWidget); expect(find.text('sending...'), findsOneWidget); expect(find.text('tap to retry'), findsOneWidget); expect(find.text('file.pdf'), findsOneWidget); - expect(find.byIcon(Icons.videocam_rounded), findsNothing); + expect(find.byIcon(Icons.call_rounded), findsNothing); VisibilityDetectorController.instance.notifyNow(); await tester.pump(); }); @@ -363,7 +355,18 @@ void main() { messages: [incomingCallMessage()], ); - expect(find.byIcon(Icons.videocam_rounded), findsOneWidget); + // Белый значок звонка на синем фоне (см. PR 1137). + final callIconFinder = find.byIcon(Icons.call_rounded); + expect(callIconFinder, findsOneWidget); + final callIcon = tester.widget(callIconFinder); + expect(callIcon.color, appTheme.whiteA700); + final buttonMaterial = tester.widget( + find + .ancestor(of: callIconFinder, matching: find.byType(Material)) + .first, + ); + expect(buttonMaterial.color, appTheme.blueA400); + expect(find.byIcon(Icons.videocam_rounded), findsNothing); expect(find.byType(VideoCallChatMessageWidget), findsOneWidget); }); @@ -376,7 +379,7 @@ void main() { messages: [incomingCallMessage()], ); - expect(find.byIcon(Icons.videocam_rounded), findsNothing); + expect(find.byIcon(Icons.call_rounded), findsNothing); expect(find.byType(VideoCallChatMessageWidget), findsNothing); expect(find.text('Видеозвонок'), findsOneWidget); }); @@ -389,7 +392,7 @@ void main() { plan: chosenPlan(ChosenPlanStateEnum.stateCanceledByTheInitiator), ); - expect(find.byIcon(Icons.videocam_rounded), findsNothing); + expect(find.byIcon(Icons.call_rounded), findsNothing); }); }); }