Expose draft updates to iOS bridge
This commit is contained in:
@@ -100,6 +100,16 @@ struct TeleTuiIOSSmokeTests {
|
||||
await viewModel.copyPayload(for: viewModel.messages[0])
|
||||
precondition(viewModel.copiedPayload == "Edited text")
|
||||
|
||||
viewModel.composeText = "Draft text"
|
||||
await viewModel.saveDraft()
|
||||
let draftEvents = try await bridge.pollEvents()
|
||||
precondition(draftEvents.contains { event in
|
||||
if case let .draftChanged(draft) = event {
|
||||
return draft.chatId == chat.id && draft.text == "Draft text"
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
let photo = try await bridge.downloadPhoto(fileId: 100)
|
||||
let voice = try await bridge.downloadVoice(fileId: 200)
|
||||
precondition(photo.path == "/tmp/fake-photo-100.jpg")
|
||||
|
||||
Reference in New Issue
Block a user