Skip to content

Conversation

@staskus
Copy link
Contributor

@staskus staskus commented Oct 6, 2025

Description

I checked the POS tests that we use timeouts, and noticed two in PointOfSaleAggregateModelTests.

As far as I understand, the complexity in these tests is related to the fact that we want to verify that collectPaymentWasCalled not when checkOut was called, but when the reader was connected.

I combined onCollectPaymentCalled callback and withCheckedContinuation to keep the same test logic but remove the timeouts.

Similar PR: #16210

Steps to reproduce

  • CI should succeed

Screenshots


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@staskus staskus added this to the 23.5 milestone Oct 6, 2025
@staskus staskus requested a review from joshheald October 6, 2025 12:56
@staskus staskus added category: unit tests Related to unit testing. feature: POS labels Oct 6, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 6, 2025

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16212-9ee2c4d
Version23.4
Bundle IDcom.automattic.alpha.woocommerce
Commit9ee2c4d
Installation URL5a3292viojefg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@joshheald joshheald self-assigned this Oct 6, 2025
Copy link
Contributor

@joshheald joshheald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, thanks for the fix. I've checked that the final expectations are hit, and suggested some comment updates to keep the Given/When/Then syntax.

Thanks for sorting this

@staskus staskus merged commit dd32ad1 into trunk Oct 6, 2025
13 checks passed
@staskus staskus deleted the task/remove-timeouts-from-pos-tests branch October 6, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: unit tests Related to unit testing. feature: POS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants