Skip to content

ATS-COM-ORD-009Purchase with a deposit and scheduled payments: Capability Test Specification

Markdown

ATS-COM-ORD-009

Purchase with a deposit and scheduled payments: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-COM-ORD-009

Design

Executed by
TST-COM-ORD-079

KindAcceptance test setProduct areaCommerceModuleCustomer purchases, purchased benefits and vendor stockRevision2

Read atservices-commerce c8b66a98macroservice-libraries 54536a44react-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission gap: FND-COM-ORD-066
  • Edge gap: FND-COM-ORD-066
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-COM-ORD-066
  • Invariant gap: FND-COM-ORD-066
  • Interaction covered

Test Scenarios

9 scenarios proving CAP-COM-ORD-009; 6 bound to an existing test.

01 Only deposit policies permit their offered plansvalidationapinegativetest
Proves
BR-CAP-COM-ORD-009-01
Preconditions
A deposit policy offers one plan and another policy requires immediate payment.
Steps
[ { "do": "Choose an unoffered plan, use the pay-now policy and clear a valid selection.", "provenance": "test", "source": "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses a plan the order type does not offer, 400 installment_plan_not_offered naming what is offered" } ]
Expected
The invalid choices are refused and clearing removes the quote.
Data
Use the controlled records and transports established by the cited tests.
Bound to
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses a plan the order type does not offer, 400 installment_plan_not_offered naming what is offered
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses a plan under a pay-now ordering profile, 400 ordering_profile_not_deposit, whatever plans it lists
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#clears the choice with null: the preview quotes nothing
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses a plan the order type does not offer, 400 installment_plan_not_offered naming what is offered
02 A cart displays the quoted deposit scheduleruleapitest
Proves
BR-CAP-COM-ORD-009-02
Preconditions
The cart totals sixty-two dollars under a four-part arrangement.
Steps
[ { "do": "Request its installment preview.", "provenance": "test", "source": "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#answers the preview with the schedule Accounting quotes: 1550 up front of 6200, three installments of 1550, each line split" } ]
Expected
The result shows 15.50 up front and three installments of 15.50 with line allocation.
Data
Use the controlled records and transports established by the cited tests.
Bound to
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#answers the preview with the schedule Accounting quotes: 1550 up front of 6200, three installments of 1550, each line split
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#answers the preview with the schedule Accounting quotes: 1550 up front of 6200, three installments of 1550, each line split
03 Deposit payment accepts the frozen plan saletransitionapitest
Proves
BR-CAP-COM-ORD-009-03
Preconditions
A cart has a quoted deposit arrangement.
Steps
[ { "do": "Place and pay the required up-front portion by card.", "provenance": "test", "source": "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#froze the plan and the quoted schedule on the order, and billed the DEPOSIT pro forma: each line at its up-front part" } ]
Expected
Deposit invoice lines retain their parts and payment accepts the order while requesting vaulting.
Data
Use the controlled records and transports established by the cited tests.
Bound to
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#froze the plan and the quoted schedule on the order, and billed the DEPOSIT pro forma: each line at its up-front part
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#accepted the order on the deposit of 1550 (what it owes now, not its total), the card sent with vault: true
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#froze the plan and the quoted schedule on the order, and billed the DEPOSIT pro forma: each line at its up-front part
04 The schedule is linked after acceptancetransitionapitest
Proves
BR-CAP-COM-ORD-009-04
Preconditions
A deposit order has met its payment requirement.
Steps
[ { "do": "Inspect schedule creation and the order’s schedule response.", "provenance": "test", "source": "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#created the schedule under the order’s key after the acceptance, wrote it on the order and reflected it on the mirror" } ]
Expected
The stable-key schedule is recorded on the order and reflected as scheduled in its money summary.
Data
Use the controlled records and transports established by the cited tests.
Bound to
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#created the schedule under the order’s key after the acceptance, wrote it on the order and reflected it on the mirror
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#answers the schedule route: the plan, the frozen quote, the schedule as Accounting holds it, scheduled
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#created the schedule under the order’s key after the acceptance, wrote it on the order and reflected it on the mirror
05 Installment payment requires a payable installmentboundaryapinegativetest
Proves
BR-CAP-COM-ORD-009-05
Preconditions
Fixtures provide a scheduled installment and an order without a schedule.
Steps
[ { "do": "Attempt early payment, due payment, repeat payment and payment without a schedule.", "provenance": "test", "source": "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses an installment before Accounting invoices it, 409 installment_not_due, charging nothing" } ]
Expected
Only the due unpaid case succeeds; the others identify not-due, already-paid or missing-schedule reasons.
Data
Use the controlled records and transports established by the cited tests.
Bound to
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses an installment before Accounting invoices it, 409 installment_not_due, charging nothing
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#answers succeeded: an installment attempt of 1550 with Accounting’s payment, the order still accepted
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses paying it again, 409 installment_already_paid, and an installment that is not on the schedule, 400 installment_not_found
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses an installment tender on an order with no schedule (a pay-now order), 409 no_installment_schedule, and answers its schedule route no_plan
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#refuses an installment before Accounting invoices it, 409 installment_not_due, charging nothing
06 Cancellation reduces future collectioninteractionapitest
Proves
BR-CAP-COM-ORD-009-06
Preconditions
A two-item plan has one installment already paid.
Steps
[ { "do": "Cancel the mug and then the remaining shirt.", "provenance": "test", "source": "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#credits the mug’s up-front part alone (the memo 300, the refund 300), never its financed part" } ]
Expected
The mug’s deposit part and future shares are removed without rewriting the paid installment; complete cancellation ends the schedule.
Data
Use the controlled records and transports established by the cited tests.
Bound to
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#credits the mug’s up-front part alone (the memo 300, the refund 300), never its financed part
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#reduced the remaining installments: the mug’s part gone from the two scheduled ones, the paid one untouched, on the history
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#cancels the schedule whole once every item line is cancelled, the T-shirt’s deposit refunded
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#credits the mug’s up-front part alone (the memo 300, the refund 300), never its financed part
07 Schedule reads can reconcile deferred workfailureapiproposed
Proves
BR-CAP-COM-ORD-009-08
Preconditions
An accepted plan order lacks a completed schedule link or has changed Accounting installments.
Steps
[ { "do": "Read its schedule twice using a controlled transport.", "provenance": "proposed", "source": "services-commerce:modules/orders/services/installments/installment-schedule.ts:readOrderInstallmentSchedule" } ]
Expected
The recovered schedule uses the original key and current invoice links and money figures appear without duplicate schedule creation.
Data
A controlled workspace with the parties, commercial setup and application responses described above.
Source
services-commerce:modules/orders/services/installments/installment-schedule.ts:readOrderInstallmentSchedule
08 Plan cancellation updates both future collection and current moneyinteractionapiproposed
Proves
BR-CAP-COM-ORD-009-06 BR-CAP-COM-ORD-014-13
Preconditions
A deposit sale has a paid installment and future unpaid shares.
Steps
[ { "do": "Cancel one line and inspect the schedule and order money.", "provenance": "proposed", "source": [ "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#reduced the remaining installments: the mug’s part gone from the two scheduled ones, the paid one untouched, on the history", "services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#shows the cancellation’s credit on the order’s money mirror at once, read right after the cancel" ] } ]
Expected
The paid installment is unchanged, future shares shrink and the cancellation credit appears on the order.
Data
Use an isolated workspace with the records and responses named in the preconditions.
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js#reduced the remaining installments: the mug’s part gone from the two scheduled ones, the paid one untouched, on the history,services-commerce:modules/orders/tests/e2e/cancellations.e2e.spec.js#shows the cancellation’s credit on the order’s money mirror at once, read right after the cancel
09 Deposit acceptance and later cancellation meet at the scheduleinteractionapiproposed
Proves
BR-CAP-COM-ORD-009-01 BR-CAP-COM-ORD-007-01 BR-CAP-COM-ORD-014-01
Preconditions
A plan purchase has an accepted deposit and a future unpaid installment.
Steps
[ { "do": "Create the schedule, cancel one line and read current and future money.", "provenance": "proposed", "source": [ "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js", "services-commerce:modules/orders/services/placement/place-order.ts:installmentsOfPlacement", "services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js", "services-commerce:modules/orders/services/installments/installment-schedule.ts:ensureInstallmentSchedule", "services-commerce:modules/orders/services/installments/installment-schedule.ts:readOrderInstallmentSchedule", "services-commerce:modules/orders/services/installments/installment-tender.ts", "services-commerce:modules/orders/services/installments/installment-cancellation.ts" ] } ]
Expected
Acceptance stands, the cancellation credit is visible and future collection excludes the cancelled share.
Data
Use an isolated workspace with the records and responses named in the preconditions.
Source
services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js,services-commerce:modules/orders/services/placement/place-order.ts:installmentsOfPlacement,services-commerce:modules/orders/tests/e2e/installments.e2e.spec.js,services-commerce:modules/orders/services/installments/installment-schedule.ts:ensureInstallmentSchedule,services-commerce:modules/orders/services/installments/installment-schedule.ts:readOrderInstallmentSchedule,services-commerce:modules/orders/services/installments/installment-tender.ts,services-commerce:modules/orders/services/installments/installment-cancellation.ts

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.