Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ final public class MessageViewModel: ObservableObject {
self.task = Task {
let text = inputMessage
inputMessage = ""
await sendMessageStream(text: text)
await send(text: text)
// await sendMessageStream(text: text)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final public class MockMessageRepository: MessageRepository {
configuration.yield(
StreamMessage.init(
role: "assistant",
contents: "How can i help you today "
contents: "How can i help you today"
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ final class MessageTests: XCTestCase {
// Given
await sut.sendTapped()

try await Task.sleep(for: .seconds(2))

if let firtSentence = self.sut.messages.first?.responseText, let secondSentence = self.sut.messages.first?.responseText {
XCTAssertEqual(firtSentence, "Hello my friend") // Then
XCTAssertEqual(secondSentence, "How can i help you today") // Then
Expand Down
6 changes: 5 additions & 1 deletion ScanApp/TestPlan/ScanApp.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
},
"testTargets" : [
{
"parallelizable" : true,
"enabled" : false,
"selectedTests" : [
"ScanAppTests\/testExample()",
"ScanAppTests\/testPerformanceExample()"
],
"target" : {
"containerPath" : "container:ScanApp.xcodeproj",
"identifier" : "0A629BAA2BCE5D55007DDE57",
Expand Down