Expand coverage for relay, identity, and location flows (#1055)

* Expand coverage for relay, identity, and location flows

* Fix macOS SwiftPM CI failures

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2026-03-12 12:50:46 -10:00
committed by GitHub
co-authored by jack
parent c043cf6354
commit a136b5b7e9
22 changed files with 2926 additions and 164 deletions
@@ -125,26 +125,20 @@ struct ChatViewModelRefactoringTests {
let (viewModel, _, _) = makePinnedViewModel()
let senderID = PeerID(str: "sender_2")
// Setup
let message = BitchatMessage(
id: "msg_2",
sender: "charlie",
// Action
viewModel.didReceivePublicMessage(
from: senderID,
nickname: "charlie",
content: "Public Hi",
timestamp: Date(),
isRelay: false,
originalSender: nil,
isPrivate: false,
recipientNickname: nil,
senderPeerID: senderID,
mentions: nil
messageID: "msg_2"
)
// Action
viewModel.didReceiveMessage(message)
// Wait for async processing with proper timeout
let found = await TestHelpers.waitUntil(
{ viewModel.messages.contains(where: { $0.content == "Public Hi" }) },
{
viewModel.timelineStore.messages(for: .mesh).contains(where: { $0.content == "Public Hi" })
},
timeout: TestConstants.defaultTimeout
)