forked from eatvio/eatvio_app
feat(vide_calls): gms calls handling
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user