diff --git a/Testers/IntegrationTester/IntegrationTesterUITests/IntegrationTesterUITests.swift b/Testers/IntegrationTester/IntegrationTesterUITests/IntegrationTesterUITests.swift index 325a18e2721..578c0cab6c5 100644 --- a/Testers/IntegrationTester/IntegrationTesterUITests/IntegrationTesterUITests.swift +++ b/Testers/IntegrationTester/IntegrationTesterUITests/IntegrationTesterUITests.swift @@ -54,25 +54,25 @@ class IntegrationTesterUICardEntryTests: IntegrationTesterUITests { } class IntegrationTesterUICardTests: IntegrationTesterUITests { - + func testStandardCustomCard3DS2() throws { testOOBAuthentication(cardNumber: "4000000000003220") } - + let alwaysOobCard = "4000582600000094" func testOOB3DS2() throws { testOOBAuthentication(cardNumber: alwaysOobCard) } - + func testDeclinedCard() throws { testAuthentication(cardNumber: "4000000000000002", expectedResult: "declined") } - + let alwaysOtpCard = "4000582600000045" func testOtp3DS2() throws { testOtpAuthentication(cardNumber: alwaysOtpCard) } - + let alwaysSingleSelectCard = "4000582600000102" func testSingleSelect3DS2() throws { testSingleSelectAuthentication(cardNumber: alwaysSingleSelectCard) @@ -132,12 +132,12 @@ class IntegrationTesterUIPMTests: IntegrationTesterUITests { func testASWebAuthUsingPaypal() throws { testNoInputIntegrationMethod(.paypal, shouldConfirm: true) } - + // Exercise the app to app redirect flow, including Safari func testAppToAppRedirectUsingAlipay() throws { testAppToAppRedirect(.alipay) } - + // Test a standard payment method using SFSafariViewController func testSFSafariViewControllerUsingBancontact() throws { testNoInputIntegrationMethod(.bancontact, shouldConfirm: true) @@ -278,7 +278,7 @@ class IntegrationTesterUITests: XCTestCase { let postalField = app.textFields["ZIP"] postalField.typeText("12345") } - + func testAuthentication(cardNumber: String, expectedResult: String = "Payment complete!", confirmationBehavior: ConfirmationBehavior = .none) { print("Testing \(cardNumber)") self.popToMainMenu() @@ -309,7 +309,7 @@ class IntegrationTesterUITests: XCTestCase { XCTAssertTrue(statusView.waitForExistence(timeout: 10.0)) XCTAssertNotNil(statusView.label.range(of: expectedResult)) } - + func testOOBAuthentication(cardNumber: String) { print("Testing \(cardNumber)") self.popToMainMenu() @@ -326,7 +326,7 @@ class IntegrationTesterUITests: XCTestCase { let oobChallengeScreenPredicate = NSPredicate(format: "label CONTAINS[c] 'This is a test 3D Secure 2 authentication for a transaction, showing an out-of-band (OOB) flow. In live mode, customers may be asked to open their banking app installed on their phone to complete authentication.'") let challengeText = app.staticTexts.matching(oobChallengeScreenPredicate).element XCTAssertTrue(challengeText.waitForExistence(timeout: 10)) - + let completeAuth = app.scrollViews.otherElements.staticTexts["Complete Authentication"] XCTAssertTrue(completeAuth.waitForExistence(timeout: 60.0)) completeAuth.tap() @@ -335,7 +335,7 @@ class IntegrationTesterUITests: XCTestCase { XCTAssertTrue(statusView.waitForExistence(timeout: 10.0)) XCTAssertNotNil(statusView.label.range(of: "Payment complete!")) } - + func testOtpAuthentication(cardNumber: String) { print("Testing \(cardNumber)") self.popToMainMenu() @@ -357,7 +357,7 @@ class IntegrationTesterUITests: XCTestCase { XCTAssertTrue(verificationOTPTextView.waitForExistence(timeout: 10.0)) verificationOTPTextView.tap() verificationOTPTextView.typeText("424242") - + let completeAuth = app.scrollViews.otherElements.staticTexts["Submit"] XCTAssertTrue(completeAuth.waitForExistence(timeout: 60.0)) completeAuth.tap() @@ -366,7 +366,7 @@ class IntegrationTesterUITests: XCTestCase { XCTAssertTrue(statusView.waitForExistence(timeout: 10.0)) XCTAssertNotNil(statusView.label.range(of: "Payment complete!")) } - + func testSingleSelectAuthentication(cardNumber: String) { print("Testing \(cardNumber)") self.popToMainMenu() @@ -383,7 +383,7 @@ class IntegrationTesterUITests: XCTestCase { let challengeScreenPredicate = NSPredicate(format: "label CONTAINS[c] 'This is a test 3D Secure 2 authentication for a transaction, showing a sample single-select flow. In live mode, customers may be asked to select a phone number to receive a one-time password.'") let challengeText = app.staticTexts.matching(challengeScreenPredicate).element XCTAssertTrue(challengeText.waitForExistence(timeout: 10)) - + let completeAuth = app.scrollViews.otherElements.staticTexts["Submit"] XCTAssertTrue(completeAuth.waitForExistence(timeout: 60.0)) completeAuth.tap()