From 6f709bd12dfa866e976303732774f683158913b7 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 28 Apr 2026 10:00:43 +0300 Subject: [PATCH] Revert "Re-enable the disabled UI tests but delete the snapshotting steps that are conflicting with the secure pin keyboard" This reverts commit cde1ae61f9aa3c6d3528d390c3bdb37a4301444b. --- UITests/Sources/AppLockSetupTests.swift | 33 ++++++++++++++++--- .../appLockSetup.testCancel-iPad-en-GB.png | 3 ++ .../appLockSetup.testCancel-iPhone-en-GB.png | 3 ++ ...pLockSetup.testCreateFlow-iPad-en-GB-0.png | 3 ++ ...pLockSetup.testCreateFlow-iPad-en-GB-1.png | 3 ++ ...pLockSetup.testCreateFlow-iPad-en-GB-4.png | 3 ++ ...pLockSetup.testCreateFlow-iPad-en-GB-5.png | 3 ++ ...ockSetup.testCreateFlow-iPhone-en-GB-0.png | 3 ++ ...ockSetup.testCreateFlow-iPhone-en-GB-1.png | 3 ++ ...p.testMandatoryCreateFlow-iPad-en-GB-0.png | 3 ++ ...p.testMandatoryCreateFlow-iPad-en-GB-1.png | 3 ++ ...testMandatoryCreateFlow-iPhone-en-GB-0.png | 3 ++ ...testMandatoryCreateFlow-iPhone-en-GB-1.png | 3 ++ ...appLockSetup.testUnlockFlow-iPad-en-GB.png | 3 ++ ...pLockSetup.testUnlockFlow-iPhone-en-GB.png | 3 ++ 15 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPad-en-GB.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPhone-en-GB.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-0.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-1.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-4.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-5.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-0.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-1.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-0.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-1.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-0.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-1.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPad-en-GB.png create mode 100644 UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPhone-en-GB.png diff --git a/UITests/Sources/AppLockSetupTests.swift b/UITests/Sources/AppLockSetupTests.swift index 5ee237285..c4aa6fde4 100644 --- a/UITests/Sources/AppLockSetupTests.swift +++ b/UITests/Sources/AppLockSetupTests.swift @@ -13,9 +13,16 @@ class AppLockSetupUITests: XCTestCase { var app: XCUIApplication! @MainActor enum Step { + static let createPIN = 0 + static let confirmPIN = 1 static let setupBiometrics = 2 static let settings = 3 - + + /// iPad shows the settings screen behind the modal, iPhone doesn't. + static let changePIN = isPhone ? createPIN : 4 + /// iPad shows the settings screen behind the modal, iPhone doesn't. + static let confirmChangePIN = isPhone ? confirmPIN : 5 + /// Not part of the flow, only to verify the stack is cleared. static let clearedStack = 99 @@ -24,16 +31,20 @@ class AppLockSetupUITests: XCTestCase { } } - func testCreateFlow() async throws { + func disabled_testCreateFlow() async throws { app = Application.launch(.appLockSetupFlow) // Wait for the keyboard to push the sheet up before snapshotting try await Task.sleep(for: .seconds(0.5)) // Create PIN screen. + try await app.assertScreenshot(step: Step.createPIN) + enterPIN() // Confirm PIN screen. + try await app.assertScreenshot(step: Step.confirmPIN) + enterPIN() // Setup biometrics screen. @@ -47,9 +58,13 @@ class AppLockSetupUITests: XCTestCase { app.buttons[A11yIdentifiers.appLockSetupSettingsScreen.changePIN].tap() // Change PIN (create). + try await app.assertScreenshot(step: Step.changePIN) + enterDifferentPIN() // Change PIN (confirm). + try await app.assertScreenshot(step: Step.confirmChangePIN) + enterDifferentPIN() // Settings screen. @@ -66,9 +81,13 @@ class AppLockSetupUITests: XCTestCase { app = Application.launch(.appLockSetupFlowMandatory) // Create PIN screen (non-modal and no cancellation button). + try await app.assertScreenshot(step: Step.createPIN) + enterPIN() // Confirm PIN screen (non-modal and no cancellation button). + try await app.assertScreenshot(step: Step.confirmPIN) + enterPIN() // Setup biometrics screen (non-modal). @@ -82,10 +101,12 @@ class AppLockSetupUITests: XCTestCase { try await app.assertScreenshot(step: Step.setupBiometrics) } - func testUnlockFlow() async throws { + func disabled_testUnlockFlow() async throws { app = Application.launch(.appLockSetupFlowUnlock) // Create PIN screen. + try await app.assertScreenshot() + enterPIN() // Settings screen. @@ -98,10 +119,14 @@ class AppLockSetupUITests: XCTestCase { try await app.assertScreenshot(step: Step.clearedStack) } - func testCancel() async throws { + func disabled_testCancel() async throws { app = Application.launch(.appLockSetupFlowUnlock) + app.showKeyboardIfNeeded() // The secure text field is focussed automatically + // Create PIN screen. + try await app.assertScreenshot() + app.buttons[A11yIdentifiers.appLockSetupPINScreen.cancel].tap() // Return to whatever was last presented. diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPad-en-GB.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPad-en-GB.png new file mode 100644 index 000000000..958db93f2 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPad-en-GB.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f08ddfb99318479d17d7e593705dc6d7c4eaa394b09461df94d0f82df15976f5 +size 148620 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPhone-en-GB.png new file mode 100644 index 000000000..8dbfe9746 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCancel-iPhone-en-GB.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:139152b701bc553f70ee50c3b1ba37d5bc329c926ca74cc9c9e32352cf253d60 +size 97672 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-0.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-0.png new file mode 100644 index 000000000..40d170505 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d32f8380c8bea0bc6d563d76f0c78cabd1f9886da8c1a33580333d8e104d4c54 +size 160119 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-1.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-1.png new file mode 100644 index 000000000..2fa23fa07 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c57a84f71dcdc548b2f45c5986fb15f810a0aad84c3268cf58e873319a10453 +size 159700 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-4.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-4.png new file mode 100644 index 000000000..63ab71190 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a44ebe8b40cfdff788857acf497e1055c88480b1629c1ed716c8532dcad5a312 +size 180542 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-5.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-5.png new file mode 100644 index 000000000..13c6b13fe --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPad-en-GB-5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de5fc0d78df2d5a60f2f7bfc12ce86789d2b12736be1439db83ce4d7e15d6598 +size 180188 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-0.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-0.png new file mode 100644 index 000000000..95140dbba --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6d0ee1f8ca41b2c12fdd1ce304fbc3813f27310d9f9857d2098b08bdbddaf45 +size 113262 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-1.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-1.png new file mode 100644 index 000000000..2189863bf --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testCreateFlow-iPhone-en-GB-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac93a3a3e8c8e91dec1e0147c60018a49f3b75bfca5fc20c0fc640acb339656f +size 112956 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-0.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-0.png new file mode 100644 index 000000000..d0bf14bcf --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53bb40cef3abba21a75532115603eb338251b9a6a8437c3118c617c7714c503c +size 90138 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-1.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-1.png new file mode 100644 index 000000000..2d5ab314d --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPad-en-GB-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e43242709b27c637acf9de7bdfed193cff787947fcbae64ced66ee8dff35b51 +size 89751 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-0.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-0.png new file mode 100644 index 000000000..94fab79cb --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa0633a0de8988b6b55e80192b77b9e29cac43a7651387d700a494fce05ebc47 +size 96074 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-1.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-1.png new file mode 100644 index 000000000..615023a89 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testMandatoryCreateFlow-iPhone-en-GB-1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c172d4a729e4c4e63102be70ec7568c89d00716e3f4b4efba4a9382cb87c9f57 +size 95723 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPad-en-GB.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPad-en-GB.png new file mode 100644 index 000000000..958db93f2 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPad-en-GB.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f08ddfb99318479d17d7e593705dc6d7c4eaa394b09461df94d0f82df15976f5 +size 148620 diff --git a/UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPhone-en-GB.png new file mode 100644 index 000000000..8dbfe9746 --- /dev/null +++ b/UITests/Sources/__Snapshots__/Application/appLockSetup.testUnlockFlow-iPhone-en-GB.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:139152b701bc553f70ee50c3b1ba37d5bc329c926ca74cc9c9e32352cf253d60 +size 97672