Repository navigation
Add order calculations JSON fixture for WooCommerce - #1601
reparateur24 wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA. Thank you. |
|
I have read the CLA document and i hereby sign the CLA |
sridharkalaibala
left a comment
There was a problem hiding this comment.
Thanks for the synthetic fixture and clear integer-cent representation. I fetched 593aae8 and independently checked the arithmetic: all four cases are internally consistent. Before this can close #134, please add (1) distinct line-discount and order-discount coverage, (2) an explicitly tax-inclusive price case, (3) a rejected fixture whose supplied order total does not reconcile (the excessive-discount case is useful but different), and (4) committed automated tests plus a short README documenting calculation order, expected Posnic sale totals and unsupported assumptions. The current JSON alone has no executable regression checks, and all valid examples add tax on top. Please keep the update synthetic/offline and include the exact test command/results.
What does this PR do?
Closes #134
Adds synthetic test fixtures under
tests/fixtures/woocommerce/order-calculations.jsonto validate WooCommerce order total calculations:SYNTH-WC-ORD-2001)SYNTH-WC-ORD-2002)HALF_UPand integer/cent arithmetic (SYNTH-WC-ORD-2003)SYNTH-WC-ORD-2004-INVALID)All data is synthetic and intended solely for test fixtures, with no claim of tax or fiscal compliance.
Acceptance criteria covered
developHow was it tested?
SYNTH-WC-ORD-2001toSYNTH-WC-ORD-2004-INVALID)