forked from eatvio/eatvio_app
feat(video_calls): ios mic fix, android call fix. feat(dev_tools): base url caching
This commit is contained in:
@@ -124,6 +124,36 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
test('force end from the other participant closes the call', () async {
|
||||
when(mockManager.callEndedNotified).thenReturn(false);
|
||||
when(mockManager.endCall()).thenAnswer((_) async {});
|
||||
cubit.emit(
|
||||
const VideoCallSessionState(
|
||||
conversationUuid: 'uuid',
|
||||
connectPhase: VideoCallConnectPhase.connected,
|
||||
callStageEntered: true,
|
||||
uiMode: VideoCallUiMode.fullscreen,
|
||||
),
|
||||
);
|
||||
|
||||
managerListener(
|
||||
const VideoCallManagerSnapshot(
|
||||
conversationUuid: 'uuid',
|
||||
micEnabled: true,
|
||||
videoEnabled: true,
|
||||
connectPhase: VideoCallConnectPhase.connected,
|
||||
linkIssue: VideoCallLinkIssue.none,
|
||||
forceEndCall: true,
|
||||
),
|
||||
);
|
||||
await Future<void>.delayed(Duration.zero);
|
||||
|
||||
verify(mockManager.endCall()).called(1);
|
||||
expect(cubit.state.connectPhase, VideoCallConnectPhase.idle);
|
||||
expect(cubit.state.callStageEntered, isFalse);
|
||||
expect(cubit.state.uiMode, VideoCallUiMode.hidden);
|
||||
});
|
||||
|
||||
test('isMicActiveForUi mirrors micEnabled', () {
|
||||
const state = VideoCallSessionState(micEnabled: true);
|
||||
expect(state.isMicActiveForUi, isTrue);
|
||||
|
||||
Reference in New Issue
Block a user