feat(vide_calls): gms calls handling

This commit is contained in:
misha
2026-05-25 08:07:20 +03:00
parent 1acb158f36
commit 73cec1a01e
35 changed files with 2288 additions and 618 deletions

View File

@@ -25,7 +25,9 @@ void main() {
);
}
testWidgets('shows error text when connectError is provided', (tester) async {
testWidgets('hides connectError text when room is connected without remote video', (
tester,
) async {
final room = buildRoom(state: lk.ConnectionState.connected);
await tester.pumpWidget(
@@ -37,10 +39,27 @@ void main() {
),
);
expect(find.text('Connection failed'), findsOneWidget);
expect(find.text('Connection failed'), findsNothing);
expect(find.byType(CircularProgressIndicator), findsNothing);
});
testWidgets('shows error text when connectError and room is not connected', (
tester,
) async {
final room = buildRoom(state: lk.ConnectionState.disconnected);
await tester.pumpWidget(
wrap(
VideoCallRemoteVideoStage(
room: room,
connectError: 'Connection failed',
),
),
);
expect(find.text('Connection failed'), findsOneWidget);
});
testWidgets('shows progress indicator when not connected and no error', (tester) async {
final room = buildRoom(state: lk.ConnectionState.disconnected);

View File

@@ -113,7 +113,7 @@ void main() {
expect(shrinkPressed, greaterThanOrEqualTo(0));
});
testWidgets('split layout shows connectError on remote pane and uses bottomInset', (tester) async {
testWidgets('split layout hides connectError on remote pane when connected', (tester) async {
final room = buildRoom();
await tester.pumpWidget(
@@ -145,7 +145,7 @@ void main() {
),
);
expect(find.text('No connection'), findsOneWidget);
expect(find.text('No connection'), findsNothing);
expect(find.text('Doctor'), findsOneWidget);
});