mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add support for manually starting SaS verification flows and accepting remotely started ones
This commit is contained in:
committed by
Stefan Ceriu
parent
7888736a4d
commit
956e92a9ac
@@ -22,16 +22,22 @@ class SessionVerificationUITests: XCTestCase {
|
||||
let app = Application.launch()
|
||||
app.goToScreenWithIdentifier(.sessionVerification)
|
||||
|
||||
XCTAssert(app.buttons["startButton"].exists)
|
||||
XCTAssert(app.buttons["requestVerificationButton"].exists)
|
||||
XCTAssert(app.buttons["closeButton"].exists)
|
||||
XCTAssert(app.staticTexts["titleLabel"].exists)
|
||||
|
||||
app.assertScreenshot(.sessionVerification)
|
||||
|
||||
app.buttons["startButton"].tap()
|
||||
app.buttons["requestVerificationButton"].tap()
|
||||
|
||||
XCTAssert(app.activityIndicators["requestingVerificationProgressView"].exists)
|
||||
|
||||
XCTAssert(app.buttons["sasVerificationStartButton"].waitForExistence(timeout: 5.0))
|
||||
app.buttons["sasVerificationStartButton"].tap()
|
||||
|
||||
XCTAssert(app.activityIndicators["startingSasVerification"].waitForExistence(timeout: 5.0))
|
||||
XCTAssert(app.activityIndicators["startedSasVerification"].waitForExistence(timeout: 5.0))
|
||||
|
||||
XCTAssert(app.buttons["challengeAcceptButton"].waitForExistence(timeout: 5.0))
|
||||
XCTAssert(app.buttons["challengeDeclineButton"].waitForExistence(timeout: 5.0))
|
||||
|
||||
@@ -50,14 +56,20 @@ class SessionVerificationUITests: XCTestCase {
|
||||
let app = Application.launch()
|
||||
app.goToScreenWithIdentifier(.sessionVerification)
|
||||
|
||||
XCTAssert(app.buttons["startButton"].exists)
|
||||
XCTAssert(app.buttons["requestVerificationButton"].exists)
|
||||
XCTAssert(app.buttons["closeButton"].exists)
|
||||
XCTAssert(app.staticTexts["titleLabel"].exists)
|
||||
|
||||
app.buttons["startButton"].tap()
|
||||
app.buttons["requestVerificationButton"].tap()
|
||||
|
||||
XCTAssert(app.activityIndicators["requestingVerificationProgressView"].exists)
|
||||
|
||||
XCTAssert(app.buttons["sasVerificationStartButton"].waitForExistence(timeout: 5.0))
|
||||
app.buttons["sasVerificationStartButton"].tap()
|
||||
|
||||
XCTAssert(app.activityIndicators["startingSasVerification"].waitForExistence(timeout: 5.0))
|
||||
XCTAssert(app.activityIndicators["startedSasVerification"].waitForExistence(timeout: 5.0))
|
||||
|
||||
XCTAssert(app.buttons["challengeAcceptButton"].waitForExistence(timeout: 5.0))
|
||||
XCTAssert(app.buttons["challengeDeclineButton"].waitForExistence(timeout: 5.0))
|
||||
|
||||
@@ -74,14 +86,20 @@ class SessionVerificationUITests: XCTestCase {
|
||||
let app = Application.launch()
|
||||
app.goToScreenWithIdentifier(.sessionVerification)
|
||||
|
||||
XCTAssert(app.buttons["startButton"].exists)
|
||||
XCTAssert(app.buttons["requestVerificationButton"].exists)
|
||||
XCTAssert(app.buttons["closeButton"].exists)
|
||||
XCTAssert(app.staticTexts["titleLabel"].exists)
|
||||
|
||||
app.buttons["startButton"].tap()
|
||||
app.buttons["requestVerificationButton"].tap()
|
||||
|
||||
XCTAssert(app.activityIndicators["requestingVerificationProgressView"].waitForExistence(timeout: 1))
|
||||
|
||||
XCTAssert(app.buttons["sasVerificationStartButton"].waitForExistence(timeout: 5.0))
|
||||
app.buttons["sasVerificationStartButton"].tap()
|
||||
|
||||
XCTAssert(app.activityIndicators["startingSasVerification"].waitForExistence(timeout: 5.0))
|
||||
XCTAssert(app.activityIndicators["startedSasVerification"].waitForExistence(timeout: 5.0))
|
||||
|
||||
app.buttons["closeButton"].tap()
|
||||
|
||||
XCTAssert(app.images["sessionVerificationFailedIcon"].waitForExistence(timeout: 1))
|
||||
|
||||
Reference in New Issue
Block a user