mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
Attempt another kind of fix for the encryption settings UI test
This commit is contained in:
@@ -32,10 +32,15 @@ class EncryptionSettingsUITests: XCTestCase {
|
||||
// Toggle key storage off.
|
||||
// app.switches[A11yIdentifiers.secureBackupScreen.keyStorage].tap()
|
||||
// Broken by https://github.com/element-hq/compound-ios/pull/140
|
||||
app.switches[A11yIdentifiers.secureBackupScreen.keyStorage].switches.firstMatch.tap()
|
||||
let keyStorageToggle = app.switches[A11yIdentifiers.secureBackupScreen.keyStorage].switches.firstMatch
|
||||
keyStorageToggle.tap()
|
||||
|
||||
// Has been failing often on CI, reasons unclear.
|
||||
try await app.assertScreenshot(step: Step.keyBackupScreen, delay: .seconds(1))
|
||||
// The tap is occasionally lost on CI, retry it once.
|
||||
if !app.buttons[A11yIdentifiers.secureBackupKeyBackupScreen.deleteKeyStorage].waitForExistence(timeout: 5) {
|
||||
keyStorageToggle.tap()
|
||||
}
|
||||
|
||||
try await app.assertScreenshot(step: Step.keyBackupScreen)
|
||||
|
||||
// Confirm deletion of keys.
|
||||
app.buttons[A11yIdentifiers.secureBackupKeyBackupScreen.deleteKeyStorage].tap()
|
||||
|
||||
Reference in New Issue
Block a user