refactor!: rename ChannelImage -> ChannelAvatar, GroupImage -> GroupAvatar

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-16 13:59:28 +05:30
committed by xsahil03x
parent d2402ba3d0
commit 8dcd5cde64
9 changed files with 23 additions and 23 deletions
@@ -65,7 +65,7 @@ void main() {
));
expect(find.text('test'), findsOneWidget);
expect(find.byType(ChannelImage), findsOneWidget);
expect(find.byType(ChannelAvatar), findsOneWidget);
expect(find.byType(StreamBackButton), findsOneWidget);
expect(find.byType(ChannelInfo), findsOneWidget);
},
@@ -271,7 +271,7 @@ void main() {
expect(find.text('test'), findsNothing);
expect(find.byType(StreamBackButton), findsNothing);
expect(find.byType(ChannelImage), findsNothing);
expect(find.byType(ChannelAvatar), findsNothing);
expect(find.byType(ChannelInfo), findsNothing);
expect(find.text('leading'), findsOneWidget);
expect(find.text('title'), findsOneWidget);
@@ -415,7 +415,7 @@ void main() {
));
await tester.tap(find.byType(StreamBackButton));
await tester.tap(find.byType(ChannelImage));
await tester.tap(find.byType(ChannelAvatar));
await tester.tap(find.byType(ChannelName));
expect(backPressed, true);
@@ -2,7 +2,7 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';
import 'package:stream_chat_flutter/src/group_image.dart';
import 'package:stream_chat_flutter/src/group_avatar.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'mocks.dart';
@@ -35,7 +35,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelImage(),
body: ChannelAvatar(),
),
),
),
@@ -113,7 +113,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelImage(),
body: ChannelAvatar(),
),
),
),
@@ -183,13 +183,13 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelImage(),
body: ChannelAvatar(),
),
),
),
));
final image = tester.widget<GroupImage>(find.byType(GroupImage));
final image = tester.widget<GroupAvatar>(find.byType(GroupAvatar));
final otherMembers = members.where((it) => it.userId != currentUser.id);
expect(
image.members.map((it) => it.user?.id),
@@ -225,7 +225,7 @@ void main() {
child: StreamChannel(
channel: channel,
child: const Scaffold(
body: ChannelImage(
body: ChannelAvatar(
selected: true,
),
),
@@ -80,7 +80,7 @@ void main() {
expect(find.text('test name'), findsOneWidget);
expect(find.text('1'), findsOneWidget);
expect(find.text('hello'), findsOneWidget);
expect(find.byType(ChannelImage), findsOneWidget);
expect(find.byType(ChannelAvatar), findsOneWidget);
},
);
}