Session verification UI tests update (#5120)

session verification tests UI tests update
This commit is contained in:
Mauro
2026-02-18 10:57:04 +01:00
committed by GitHub
parent bd0198c4a5
commit 65a4be3df2
40 changed files with 62 additions and 111 deletions
+7 -28
View File
@@ -13,13 +13,10 @@ class SessionVerificationUITests: XCTestCase {
enum Step {
static let initialState = 0
static let waitingForOtherDevice = 1
static let useEmojiComparisonPrompt = 2
static let waitingForEmojis = 3
static let compareEmojis = 4
static let acceptingEmojis = 5
static let verificationComplete = 6
static let verificationCancelled = 7
static let compareEmojis = 2
static let acceptingEmojis = 3
static let verificationComplete = 4
static let verificationCancelled = 5
}
func testChallengeMatches() async throws {
@@ -29,13 +26,7 @@ class SessionVerificationUITests: XCTestCase {
app.buttons[A11yIdentifiers.sessionVerificationScreen.requestVerification].tap()
try await app.assertScreenshot(step: Step.waitingForOtherDevice)
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.startSasVerification].waitForExistence(timeout: 10.0))
try await app.assertScreenshot(step: Step.useEmojiComparisonPrompt)
app.buttons[A11yIdentifiers.sessionVerificationScreen.startSasVerification].tap()
try await app.assertScreenshot(step: Step.waitingForEmojis)
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].waitForExistence(timeout: 10.0))
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].waitForExistence(timeout: 20.0))
try await app.assertScreenshot(step: Step.compareEmojis)
app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].tap()
@@ -52,13 +43,7 @@ class SessionVerificationUITests: XCTestCase {
app.buttons[A11yIdentifiers.sessionVerificationScreen.requestVerification].tap()
try await app.assertScreenshot(step: Step.waitingForOtherDevice)
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.startSasVerification].waitForExistence(timeout: 10.0))
try await app.assertScreenshot(step: Step.useEmojiComparisonPrompt)
app.buttons[A11yIdentifiers.sessionVerificationScreen.startSasVerification].tap()
try await app.assertScreenshot(step: Step.waitingForEmojis)
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].waitForExistence(timeout: 10.0))
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].waitForExistence(timeout: 20.0))
try await app.assertScreenshot(step: Step.compareEmojis)
app.buttons[A11yIdentifiers.sessionVerificationScreen.declineChallenge].tap()
@@ -72,13 +57,7 @@ class SessionVerificationUITests: XCTestCase {
app.buttons[A11yIdentifiers.sessionVerificationScreen.requestVerification].tap()
try await app.assertScreenshot(step: Step.waitingForOtherDevice)
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.startSasVerification].waitForExistence(timeout: 10.0))
try await app.assertScreenshot(step: Step.useEmojiComparisonPrompt)
app.buttons[A11yIdentifiers.sessionVerificationScreen.startSasVerification].tap()
try await app.assertScreenshot(step: Step.waitingForEmojis)
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].waitForExistence(timeout: 10.0))
XCTAssert(app.buttons[A11yIdentifiers.sessionVerificationScreen.acceptChallenge].waitForExistence(timeout: 20.0))
try await app.assertScreenshot(step: Step.compareEmojis)
}
}