mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Revert "Re-enable the disabled UI tests but delete the snapshotting steps that are conflicting with the secure pin keyboard"
This reverts commit cde1ae61f9aa3c6d3528d390c3bdb37a4301444b.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user