-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously if WidgetsSDK is configured one time and then visitor has regular engagement, then CV engagement with screen sharing, if the operator ends CV engagement, bubble and screen sharing state is still displayed. It happened because EngagementViewModel called interator.endSession which set `isEngagementEndedByVisitor` to `true` even in case if engagement is ended by operator. Since CV engagement is started without additional `configure` call, interactor keeps `isEngagementEndedByVisitor` as `true`, which was broking CV flow. This commit fixes it. MOB-2731
- Loading branch information
Showing
6 changed files
with
101 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
GliaWidgetsTests/Sources/ChatViewModel/Mocks/Survey.Mock.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Foundation | ||
@testable import GliaWidgets | ||
|
||
extension CoreSdkClient.Survey { | ||
static func mock( | ||
id: String = "mock", | ||
description: String = "mock", | ||
name: String = "mock", | ||
title: String = "mock", | ||
type: String = "visitor", | ||
siteId: String = "mock" | ||
) throws -> Self { | ||
let data = try JSONSerialization.data(withJSONObject: [ | ||
"id": id, | ||
"description": description, | ||
"name": name, | ||
"title": title, | ||
"type": type, | ||
"siteId": siteId, | ||
"questions": [] | ||
]) | ||
return try JSONDecoder().decode(CoreSdkClient.Survey.self, from: data) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters