mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Make LinkNewDeviceScreen fall back to the App Lock PIN code when there's no passcode. (#5794)
* Fall back to the AppLock PIN code when there's no passcode. * Add extra tests on the LinkNewDeviceFlowCoordinator. * Misc tweaks for clarification. * Regenerate snapshots.
This commit is contained in:
@@ -43,6 +43,19 @@ final class AppLockScreenViewModelTests {
|
||||
#expect(result == .appUnlocked)
|
||||
}
|
||||
|
||||
@Test
|
||||
func cancelVerifyDeviceOwner() async throws {
|
||||
// Given a screen shown to verify the device owner.
|
||||
viewModel = AppLockScreenViewModel(appLockService: appLockService, mode: .verifyDeviceOwner)
|
||||
|
||||
// When the user cancels.
|
||||
let deferred = deferFulfillment(viewModel.actions) { $0 == .cancelVerifyDeviceOwner }
|
||||
viewModel.context.send(viewAction: .cancelVerifyDeviceOwner)
|
||||
|
||||
// Then the cancellation should be reported.
|
||||
try await deferred.fulfill()
|
||||
}
|
||||
|
||||
@Test
|
||||
func forgotPIN() async throws {
|
||||
// Given a fresh launch of the app.
|
||||
|
||||
Reference in New Issue
Block a user