---
id: TST-COM-ORD-109
title: TX-P with promotion parts and shipping offers
kind: integration
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/orders/tests/integration/services/placement/promotion-parts-placement.integration.spec.js
implements: []
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 2
isolation: The suite creates its own test workspace records and removes them using the fixture cleanup.
evidence:
  - provenance: test
    source: >-
      services-commerce:modules/orders/tests/integration/services/placement/promotion-parts-placement.integration.spec.js
    test_cases:
      - 'asks the provider once for the preview, in preview mode, and once for the placement, in placement mode'
      - >-
        sends the provider both parts with their criteria, the item lines with their priced amounts and the
        bill-to
      - 'discounts the Workshop by part 1 alone, the T-shirt by part 1 and the Mug by part 2'
      - 'writes the order under the identity and the tax on each line’s net: 13700 less 1550, plus 8 % of 12150'
      - 'records one redemption with one allocation per discounted line, each with the provider’s answer frozen'
      - counts one use on the code and the promotion
      - >-
        shows the preview without the promotion, one warning among its problems and the rest of the preview
        intact
      - refuses the placement 503 promotion_check_unavailable with the same sentence
      - 'writes nothing: no order, no redemption, no use, the checkout still open'
      - 'previews free shipping: the gross charge, the discount, the net and the offer applied once'
      - 'writes the shipping line at its gross price with its own discount, a net of zero and no tax'
      - >-
        keeps the order’s shipping the net charge and its discount the item lines’: 12500 + 0 + the items’ tax
        1000
      - records the redemption with one allocation on the shipping line and no part answer
      - 'takes $5.00 off the charge with amount_off_shipping: 700 shipped, taxed on the net at 8 % (56)'
      - >-
        bills the placed order: a request Accounting’s contract accepts, the discounted shipping line at its
        gross price
      - leaves the invoice total the order’s net of the shipping offer
scenario_coverage: []
dependency_evidence:
  provenance: test
  source: >-
    services-commerce:modules/orders/tests/integration/services/placement/promotion-parts-placement.integration.spec.js
  declared_by_test: >-
    `previewCheckout` and `placeOrder` with the running macroservice's dependencies, the pricing engine, the
    promotions library and persistence, the zone tax table, billing's request, PostgreSQL. Doubled: the area
    provider (counting fake), the shipping rating port (a literal quote), the signing key pair and the other
    services' tables (local stand-ins).
---

# TX-P with promotion parts and shipping offers

## Verification Boundary

The suite exercises persistence or workflow operations against the local integration database.

## What This Suite Proves

The registered cases check tX-P with promotion parts and shipping offers with their fixture records and assertions. Scenario bindings name only the examples those cases exercise.

## What It Does Not Prove

A registered file supplies no run result or verified conformance by itself. Local fixtures do not establish deployed cross-service behavior or complete browser journeys.

## Real Dependencies and Test Doubles

PostgreSQL and the exercised Commerce persistence or workflow code are real. Remote service records, clocks and transports follow the suite’s fixtures.

## Must Not Be Doubled

The database constraints, role restrictions, locks and transactions exercised by this suite must use PostgreSQL.
