Skip to content

ATS-COM-FUL-011Quote shipping and pickup choices for a cart: Capability Test Specification

Markdown

ATS-COM-FUL-011

Quote shipping and pickup choices for a cart: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaCommerceModuleFulfillment, Shipping and InventoryRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-COM-FUL-011; 10 bound to an existing test.

01 Digital-only carts bypass shippingedgeapitest
Proves
BR-CAP-COM-FUL-011-01
Preconditions
Fixtures contain an e-book-only cart and shippable merchandise.
Steps
Preview each cart.
Expected
The digital cart needs no shipping and the merchandise cart does.
Data
Fixtures for digital-only carts bypass shipping.
Bound to
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#answers shipping_required false, no option and no charge for a cart of an e-book
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#requires no shipping for a checkout of an e-book alone: no option, zero, no zone consulted
Source
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#answers shipping_required false, no option and no charge for a cart of an e-book
02 Destination matching respects specificity and activationruleunittest
Proves
BR-CAP-COM-FUL-011-02
Preconditions
Prefix, region, country and unrestricted zones include an inactive fixture.
Steps
Match representative addresses and an absent address.
Expected
The most specific active match wins with priority, name and identity as tie-breakers.
Data
Fixtures for destination matching respects specificity and activation.
Bound to
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#matches a zone naming nothing to every address, and to no address at all
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#matches a country zone to its countries alone, case-insensitively on the address
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#matches a region zone within its country without case, and a prefix zone on the postal code without case or spaces
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#ranks a prefix over a region over a country over anywhere
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#picks the most specific matching zone, and the first of equals in the order given (priority, name, id)
Source
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#matches a zone naming nothing to every address, and to no address at all
03 Charging methods produce their defined unit and weight resultsboundaryunittest
Proves
BR-CAP-COM-FUL-011-03 BR-CAP-COM-FUL-011-04
Preconditions
Flat, per-unit, banded, free-threshold and foreign-currency strategies exist.
Steps
Rate five physical units and exercise excess weight.
Expected
Applicable methods return their charges while excess-weight and currency-mismatched options are excluded.
Data
Fixtures for charging methods produce their defined unit and weight results.
Bound to
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#charges a per-unit strategy per UNIT shipped, never per line, plus its base once
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#charges a weight-band strategy the first band the weight fits, the open-ended band taking the rest
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#leaves a weight past every closed band unrated, by name
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#makes an option free at or above free_above_minor, measured against the merchandise subtotal
Source
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#charges a flat strategy once, whatever the units
04 Missing coverage produces a zero-charge warningfailureapitest
Proves
BR-CAP-COM-FUL-011-05
Preconditions
The unrestricted zone is inactive.
Steps
Rate an unmatched address and a matched zone lacking the cart currency.
Expected
Both results retain zero shipping charge with a warning.
Data
Fixtures for missing coverage produces a zero-charge warning.
Bound to
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#charges nothing with a warning when no zone matches (the worldwide zone inactive) and when the zone offers no option in the currency
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#rates an address nowhere else, and no address at all, by the worldwide zone, with the warning when the address is unknown
Source
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#charges nothing with a warning when no zone matches (the worldwide zone inactive) and when the zone offers no option in the currency
05 Carrier quotes apply markup and retain soft failurefailureunittest
Proves
BR-CAP-COM-FUL-011-06
Preconditions
A UPS account has configured markup.
Steps
Rate a successful quote and then a failed quote.
Expected
The successful option includes markup and failure returns a warning without an option.
Data
Fixtures for carrier quotes apply markup and retain soft failure.
Bound to
services-commerce:modules/shipping/tests/unit/carriers/carrier-adapters.spec.js#applies the markup in basis points, rounding half away from zero
services-commerce:modules/shipping/tests/unit/carriers/carrier-adapters.spec.js#answers the quoted options with the account’s markup on each, the carrier the account’s
services-commerce:modules/shipping/tests/unit/carriers/carrier-adapters.spec.js#answers a failed quote as no option with the contract’s code in a warning, never a throw
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#rates UPS Ground at the preview through shipping.rate.quote on the account’s connection, as commerce
Source
services-commerce:modules/shipping/tests/unit/carriers/carrier-adapters.spec.js#applies the markup in basis points, rounding half away from zero
06 Option selection can change or return to the defaulttransitionapinegativetest
Proves
BR-CAP-COM-FUL-011-07
Preconditions
A destination has two offered shipping choices.
Steps
Select per-unit charging, request an unavailable choice and clear selection.
Expected
The valid choice rerates, the absent choice fails and clearing restores the first option.
Data
Fixtures for option selection can change or return to the default.
Bound to
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#re-rates with the buyer’s choice (five units at 150), and refuses a strategy the zone does not offer 400 shipping_option_unavailable
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#clears the choice on PUT shipping_strategy_id null: nothing stored, the preview back on the first option and its charge (DEF-COM-0868)
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#honours the buyer’s choice when the zone offers it, and replaces a choice the zone does not offer with the first option, saying so
Source
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#re-rates with the buyer’s choice (five units at 150), and refuses a strategy the zone does not offer 400 shipping_option_unavailable
07 Pickup appears only at an active collection warehouseedgeapitest
Proves
BR-CAP-COM-FUL-011-08
Preconditions
Pickup strategies reference active and inactive warehouses.
Steps
Rate the cart and select the active pickup.
Expected
The active choice identifies collection at zero charge and the inactive choice is excluded.
Data
Fixtures for pickup appears only at an active collection warehouse.
Bound to
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#offers each pick-up at zero beside the zone’s shipped options, kind pickup, with where the buyer collects
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#offers the pick-up at zero beside UPS Ground for the shirts, with the warehouse it is collected from
services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#rates a pickup strategy at zero, whatever the units, the weight or the subtotal
Source
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#offers each pick-up at zero beside the zone’s shipped options, kind pickup, with where the buyer collects
08 Placement requires the profile's shipping productvalidationapinegativetest
Proves
BR-CAP-COM-FUL-011-09
Preconditions
One profile has a shipping product and another lacks it.
Steps
Place merchandise orders under each profile.
Expected
Configured placement freezes destination and appends shipping after items; missing setup rejects placement and retains checkout.
Data
Fixtures for placement requires the profile's shipping product.
Bound to
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#places the order with the charge, the shipping line on the shipping product after the item line, the ship-to address frozen and the choice in the snapshot
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#refuses the placement 409 placement_refused with the problem shipping_product_required, naming the profile
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#leaves the checkout open, with nothing placed
Source
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#places the order with the charge, the shipping line on the shipping product after the item line, the ship-to address frozen and the choice in the snapshot
09 Rating cannot consume another workspace's configurationboundaryapinegativetest
Proves
BR-CAP-COM-FUL-011-10
Preconditions
Two workspaces have separate zones.
Steps
Change the first workspace and rate in the second.
Expected
The second result uses only its own zones.
Data
Fixtures for rating cannot consume another workspace's configuration.
Bound to
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#never reads another tenant’s zones: the other tenant’s rating sees its own domestic zone, not this tenant’s changes
Source
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#never reads another tenant’s zones: the other tenant’s rating sees its own domestic zone, not this tenant’s changes
10 Changing an active zone changes the buyer optionsinteractionapiproposed
Proves
BR-CAP-COM-FUL-010-10 BR-CAP-COM-FUL-011-02
Preconditions
A physical cart address matches a configured shipping zone.
Steps
Preview, deactivate the matching zone, preview again, then restore it.
Expected
The offered options follow the configuration changes and the absent match carries the no-coverage warning.
Data
An isolated workspace with the products, records, authority and quantities described in the preconditions.
Source
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#writes the zone under the id its name suggests, the countries upper-cased, at version 1,services-commerce:modules/shipping/tests/unit/rating/zone-strategy-rating.spec.js#matches a zone naming nothing to every address, and to no address at all
11 The selected buyer option becomes warehouse shipment workinteractionapitest
Proves
BR-CAP-COM-FUL-011-08 BR-CAP-COM-FUL-012-03
Preconditions
An active collection warehouse offers pickup beside carrier delivery.
Steps
Select pickup, place and pay the order, dispatch its goods and create a shipment.
Expected
The shipment uses the selected collection warehouse, without a carrier charge.
Data
An isolated workspace with the products, records, authority and quantities described in the preconditions.
Bound to
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#offers the pick-up at zero beside UPS Ground for the shirts, with the warehouse it is collected from
services-commerce:modules/shipping/tests/e2e/shipping.e2e.spec.js#makes a pickup shipment of the paid order, on no carrier, and refuses its label 409 operation_not_supported
Source
services-commerce:modules/shipping/tests/integration/services/persistence/shipping-configuration.integration.spec.js#offers each pick-up at zero beside the zone’s shipped options, kind pickup, with where the buyer collects,services-commerce:modules/shipping/tests/integration/services/fulfillment/shipping-flow.integration.spec.js#makes a pickup shipment of the order at the pick-up warehouse, on no carrier, charged nothing

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.