Skip to content

Commit

Permalink
Adds a browser fallback test
Browse files Browse the repository at this point in the history
  • Loading branch information
Twigz committed Feb 4, 2025
1 parent 90cd490 commit b08d2ae
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ class IntegrationTesterUICardTests: IntegrationTesterUITests {
func testHSBCHTMLIssue() throws {
testHSBCWebViewLinksTrigger(cardNumber: hsbcCard)
}

let browserFallbackCard = "4000582600000060"
func testBrowserFallback() throws {
testBrowserFallbackAuthentication(cardNumber: browserFallbackCard)
}
}

class IntegrationTesterUIPMTests: IntegrationTesterUITests {
Expand Down Expand Up @@ -474,6 +479,28 @@ class IntegrationTesterUITests: XCTestCase {
XCTAssertTrue(statusView.waitForExistence(timeout: 10.0))
XCTAssertNotNil(statusView.label.range(of: "Payment complete!"))
}

func testBrowserFallbackAuthentication(cardNumber: String) {
print("Testing \(cardNumber)")
self.popToMainMenu()
let tablesQuery = app.collectionViews

let cardExampleElement = tablesQuery.cells.buttons["Card"]
cardExampleElement.tap()
try! fillCardData(app, number: cardNumber)

let buyButton = app.buttons["Buy"]
XCTAssertTrue(buyButton.waitForExistence(timeout: 30.0))
buyButton.forceTapElement()

let completeButton = app.buttons["COMPLETE"]
XCTAssertTrue(completeButton.waitForExistence(timeout: 30.0))
completeButton.forceTapElement()

let statusView = app.staticTexts["Payment status view"]
XCTAssertTrue(statusView.waitForExistence(timeout: 10.0))
XCTAssertNotNil(statusView.label.range(of: "Payment complete!"))
}

func testNoInputIntegrationMethod(_ integrationMethod: IntegrationMethod, shouldConfirm: Bool) {
self.popToMainMenu()
Expand Down

0 comments on commit b08d2ae

Please sign in to comment.