Skip to content

Commit

Permalink
fixup! Display Live Observation alert before normal engagement
Browse files Browse the repository at this point in the history
This PR displays Live Observation confirmation alert before normal engagement.
This alert can't be skipped and needs visitor's manual confirmation to
enqueue.

MOB-2678
  • Loading branch information
rasmustautsglia committed Oct 3, 2023
1 parent 84f13b5 commit 34fa20f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ extension ChatViewModelTests {
env.createFileUploadListModel = { _ in .mock() }
env.createSendMessagePayload = { _, _ in .mock() }
viewModel = .mock(interactor: interactorMock, environment: env)

viewModel.gvaOptionAction(for: option)()

viewModel.interactor.state = .enqueueing
XCTAssertEqual(interactorMock.state, .enqueueing)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class ChatViewModelTests: XCTestCase {
viewModelEnv.loadChatMessagesFromHistory = { true }
let viewModel = ChatViewModel.mock(interactor: interactor, environment: viewModelEnv)
viewModel.start()
viewModel.enqueue(mediaType: .audio)
XCTAssertEqual(calls, [.configureWithInteractor, .configureWithConfiguration])
}

Expand Down
3 changes: 2 additions & 1 deletion GliaWidgetsTests/Sources/InteractorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class InteractorTests: XCTestCase {
return
}
}

interactor.state = .enqueueing
interactor.enqueueForEngagement(
mediaType: .text,
success: {},
Expand Down Expand Up @@ -208,6 +208,7 @@ class InteractorTests: XCTestCase {
}
}

interactor.state = .enqueued(.mock)
interactor.enqueueForEngagement(
mediaType: .text,
success: {},
Expand Down

0 comments on commit 34fa20f

Please sign in to comment.