Skip to content

Commit

Permalink
Small changes to ui tests (#4214)
Browse files Browse the repository at this point in the history
## Summary
<!-- Simple summary of what was changed. -->


## Motivation
<!-- Why are you making this change? If it's for fixing a bug, if
possible, please include a code snippet or example project that
demonstrates the issue. -->
Attempt to mitigate tests testCVCRecollectionComplete_deferredCSC and
testPaymentSheetSwiftUI that failed initially but passed on retry in the
CI

## Testing
<!-- How was the code tested? Be as specific as possible. -->

## Changelog
<!-- Is this a notable change that affects users? If so, add a line to
`CHANGELOG.md` and prefix the line with one of the following:
    - [Added] for new features.
    - [Changed] for changes in existing functionality.
    - [Deprecated] for soon-to-be removed features.
    - [Removed] for now removed features.
    - [Fixed] for any bug fixes.
    - [Security] in case of vulnerabilities.
-->
  • Loading branch information
joyceqin-stripe authored Nov 4, 2024
1 parent cef7a41 commit 0c41d1c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ class PaymentSheetStandardUITests: PaymentSheetUITestCase {
buyButton.forceTapElement()

try! fillCardData(app)
app.buttons["Pay €9.73"].tap()
app.buttons["Done"].waitForExistenceAndTap(timeout: 3.0)
app.buttons["Pay €9.73"].waitForExistenceAndTap(timeout: 3.0)
let successText = app.staticTexts["Payment status view"]
XCTAssertTrue(successText.waitForExistence(timeout: 10.0))
XCTAssertNotNil(successText.label.range(of: "Success!"))
Expand Down Expand Up @@ -1634,9 +1635,7 @@ class PaymentSheetCVCRecollectionUITests: PaymentSheetUITestCase {
saveThisCardToggle.tap()
XCTAssertTrue(saveThisCardToggle.isSelected)

let payButton = app.buttons["Pay $50.99"]
XCTAssert(payButton.isEnabled)
payButton.tap()
app.buttons["Pay $50.99"].waitForExistenceAndTap(timeout: 5.0)

let successText = app.staticTexts["Success!"]
XCTAssertTrue(successText.waitForExistence(timeout: 10.0))
Expand Down

0 comments on commit 0c41d1c

Please sign in to comment.