diff --git a/bitchatTests/ChatViewModelTests.swift b/bitchatTests/ChatViewModelTests.swift index 5d45d980..34377fff 100644 --- a/bitchatTests/ChatViewModelTests.swift +++ b/bitchatTests/ChatViewModelTests.swift @@ -2455,6 +2455,8 @@ struct ChatViewModelPanicTests { @Test @MainActor func panicClearAllData_wipesTheLocationStateOfItsOwnManager() throws { + let gestureMode = PanicGestureModeSnapshot() + defer { gestureMode.restore() } // Where the device has been, persisted the way the location manager // writes it: a teleport and a bookmark. let suiteName = "ChatViewModelPanicTests.\(UUID().uuidString)" diff --git a/bitchatTests/ConversationUIModelTests.swift b/bitchatTests/ConversationUIModelTests.swift index a4f90e6c..23bd37ef 100644 --- a/bitchatTests/ConversationUIModelTests.swift +++ b/bitchatTests/ConversationUIModelTests.swift @@ -334,7 +334,10 @@ struct ConversationUIModelTests { // The wipe reseeds every geohash identity and returns to the mesh, // which takes the retired key out of the memo too. + let gestureMode = PanicGestureModeSnapshot() viewModel.panicClearAllData() + // Before the next `await`, so no other test can save the armed value. + gestureMode.restore() #expect(await TestHelpers.waitUntil({ uiModel.ownGeoChatSender == nil }, timeout: TestConstants.settleTimeout)) Self.show(geohash: Self.geohash, in: viewModel) let newHex = try Self.myGeoHex(viewModel)