Skip to content

ATS-COM-FUL-014Record goods leaving with a carrier or collector: Acceptance Test Set

Markdown

ATS-COM-FUL-014

Record goods leaving with a carrier or collector: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-COM-FUL-014

KindAcceptance test setProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision1

Read atservices-commerce c8b66a98

Test Scenarios

5 scenarios proving CAP-COM-FUL-014; 5 bound to an existing test.

01 Departure changes stock and delivery records atomicallyapitest
Proves
BR-CAP-COM-FUL-014-01
Preconditions
Three units belong to a manifested shipment.
Steps
Confirm carrier handoff.
Expected
All units ship, one minus-three stock movement is retained, obligations complete, cost facts are emitted and order quantities update.
Data
Fixtures for departure changes stock and delivery records atomically.
Bound to
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#hands off: the line handed to the carrier with its whole quantity shipped, the units shipped in the ledger, one shipment movement of minus three on the item, three fewer on hand
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#completes every unit’s obligation through the register (the allocation as the record), and emits one deferred cost relief fact per item
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#writes the shipped quantity on the order line, the order’s shipping_summary complete, and the order’s history
Source
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#hands off: the line handed to the carrier with its whole quantity shipped, the units shipped in the ledger, one shipment movement of minus three on the item, three fewer on hand
02 Unauthorized or repeated departure cannot move stockapinegativetest
Proves
BR-CAP-COM-FUL-014-02 BR-CAP-COM-FUL-014-03
Preconditions
One shipment lacks obligation authorization and another already left.
Steps
Attempt handoff on both.
Expected
Both fail without movement and their refusals are recorded.
Data
Fixtures for unauthorized or repeated departure cannot move stock.
Bound to
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses units_not_authorized, naming the obligation still pending, and moves nothing: the unit committed, nothing shipped, the shipment still manifested
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#raises the handoff_refused finding and writes the refusal on the shipment’s history
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses a second handoff of the same shipment (not manifested any more) and records the refusal
Source
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses units_not_authorized, naming the obligation still pending, and moves nothing: the unit committed, nothing shipped, the shipment still manifested
03 Cancellation fencing resolves contention with departureapinegativetest
Proves
BR-CAP-COM-FUL-014-04 BR-CAP-COM-FUL-014-05
Preconditions
A manifested shipment contains a unit selected for cancellation.
Steps
Fence before handoff and separately race cancellation against departure.
Expected
The fence blocks shipment; the race has one successful action and departed goods require return.
Data
Fixtures for cancellation fencing resolves contention with departure.
Bound to
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#fences the whole range the unit is in (cancellation_pending under cancellation:<id>), nothing refused
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses the handoff shipment_cancelled_pull_package, naming the fenced line, and moves nothing
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#lets the handoff commit, and the cancellation that waited finds the line already handed off: refused, nothing fenced
services-commerce:modules/shipping/tests/e2e/post-purchase-shipping.e2e.spec.js#refuses the cancellation of the shipped shirts: rejected, must_return with shipment_handed_off (B9)
Source
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#fences the whole range the unit is in (cancellation_pending under cancellation:<id>), nothing refused
04 Retained units use a new shipment after fenced cancellationapitest
Proves
BR-CAP-COM-FUL-014-06
Preconditions
A three-unit line is fenced for cancellation of one unit.
Steps
Apply cancellation and create shipment work for the retained quantity.
Expected
The old line and parcel are pulled with label voiding, and the two retained units ship separately.
Data
Fixtures for retained units use a new shipment after fenced cancellation.
Bound to
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#cancels the fenced line at the cancel step: the units unstamped (still the order’s, picked), the label voided and the package pulled, the shipment cancelled
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#leaves the order’s units free for a new shipment: a second shipment carries both again
services-commerce:modules/shipping/tests/e2e/post-purchase-shipping.e2e.spec.js#fences and cancels the shipment line, pulls the package and voids the counter label, and refuses the handoff asked after (409)
Source
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#cancels the fenced line at the cancel step: the units unstamped (still the order’s, picked), the label voided and the package pulled, the shipment cancelled
05 Collection requires collector and authorized staffapinegativetest
Proves
BR-CAP-COM-FUL-014-07 BR-CAP-COM-FUL-014-08 BR-CAP-COM-FUL-014-09
Preconditions
A packed pickup, a carrier shipment and a fenced pickup exist.
Steps
Try reader handover, missing collector, valid handover, repetition and incompatible fixtures.
Expected
Only valid first collection succeeds with its stock, delivery and cost effects.
Data
Fixtures for collection requires collector and authorized staff.
Bound to
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#hands it over: the lines, the package and the shipment collected with who collected it, the whole quantity shipped
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#moves the stock as the handoff does: the units shipped, one shipment movement of minus two (reason handover), two fewer on hand
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#completes the obligations through the register, emits the cost relief fact and writes the order’s shipped quantities
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses a second handover (not packed any more) and the cancellation of a collected shipment
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#refuses the handover of a pick-up whose line the cancellation fenced, shipment_cancelled_pull_package, and moves nothing
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#refuses the handover to a reader 403 permission_missing, and one naming nobody who collected 400
Source
services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#hands it over: the lines, the package and the shipment collected with who collected it, the whole quantity shipped

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.