mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-11-15 08:12:23 +00:00
Restore the panic gesture setting in two wipe tests from main
Main added two tests that complete a wipe after this branch started, and both left panic.gestureMode armed. They now restore it like the others; the async one restores before its next await.
This commit is contained in:
parent
fae6bcebd6
commit
627baaa64d
@ -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)"
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user