Skip to content

Commit 89ad43d

Browse files
committed
use-mocked-card-present-payment for UI tests
Despite tests passing, the contents of the pos-payment screenshot was incorrect, as lands on the failure case for `checkOrderIsStillEligibleForPayment` when attempting to retrieve the order details, hence showing a “Error: unable to process payment. we could not fetch the latest order details” rather than the payment view. Despite passing the CPP mock in the POSTabCoordinator, we were never setting it in the test as a launch argument.
1 parent e03bd88 commit 89ad43d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WooCommerce/WooCommerceScreenshots/WooCommerceScreenshots.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class WooCommerceScreenshots: XCTestCase {
2424
let app = XCUIApplication()
2525
setupSnapshot(app)
2626
app.launchArguments.append("mocked-network-layer")
27+
app.launchArguments.append("use-mocked-card-present-payment")
2728
app.launchArguments.append("-simulate-stripe-card-reader")
2829
app.launchArguments.append("disable-animations")
2930
app.launchArguments.append("-mocks-push-notification")

0 commit comments

Comments
 (0)