mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Session verification UI tests update (#5120)
session verification tests UI tests update
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user