Фикс: upload ring progress доходит до 100% + completion notification через userInfo
This commit is contained in:
@@ -105,15 +105,17 @@ struct ForegroundNotificationTests {
|
||||
@Test("Muted chat is suppressed")
|
||||
func mutedChatSuppressed() {
|
||||
clearActiveDialogs()
|
||||
// Set up muted chat in App Group
|
||||
let shared = UserDefaults(suiteName: "group.com.rosetta.dev")
|
||||
let originalMuted = shared?.stringArray(forKey: "muted_chats_keys")
|
||||
shared?.set(["02muted"], forKey: "muted_chats_keys")
|
||||
// Production checks DialogRepository (in-memory), not UserDefaults.
|
||||
DialogRepository.shared.ensureDialog(
|
||||
opponentKey: "02muted", title: "", username: "", myPublicKey: "me"
|
||||
)
|
||||
DialogRepository.shared.toggleMute(opponentKey: "02muted")
|
||||
|
||||
#expect(InAppNotificationManager.shouldSuppress(senderKey: "02muted") == true)
|
||||
|
||||
// Restore
|
||||
shared?.set(originalMuted, forKey: "muted_chats_keys")
|
||||
// Restore — toggleMute back to unmuted, then remove via ensureDialog pattern isn't needed
|
||||
// since dialogs dict is in-memory and won't persist in test.
|
||||
DialogRepository.shared.toggleMute(opponentKey: "02muted")
|
||||
}
|
||||
|
||||
@Test("Non-muted chat is NOT suppressed")
|
||||
|
||||
Reference in New Issue
Block a user