---
id: TST-COM-ORD-081
title: The store’s order-level discount shared over the lines
kind: api-lifecycle
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/orders/tests/e2e/order-extension-discount.e2e.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/e2e/order-extension-discount.e2e.spec.js'
    test_cases:
      - 'shares the $10.00 credit over the lines as $5.71, $2.86 and $1.43, the nets $94.29, $47.14 and $23.57'
      - 'taxes each placed line on its own net at 8 %: $7.54, $3.77 and $1.89'
      - >-
        makes the order’s tax the lines’ sum, $13.20, its discount the shares’ sum $10.00 and its total
        $178.20
      - >-
        requests an invoice whose lines carry their shares as discounts, with the reason, and no unallocated
        order discount
      - 'credits the cancelled $50.00 Book its net $47.14 and its tax $3.77: $50.91'
      - 'places the order, which the deferred sums check refused as RHC07 while a line held a share'
      - >-
        gives every line the promotion’s allocation and its share of the credit, the two adding to the line’s
        discount
      - writes the redemption at $5.00 with its allocations adding to it
scenario_coverage: []
dependency_evidence:
  provenance: test
  source: 'services-commerce:modules/orders/tests/e2e/order-extension-discount.e2e.spec.js'
  declared_by_test: >-
    the composed handler, the routes, the workflows, the pricing engine and its order extension, the zone tax
    table, the invoice request, the cancellation workflow, PostgreSQL. Doubled: the signing key pair, the
    other services' tables and Accounting (local stand-ins), the extension (the reference fixture).
---

# The store’s order-level discount shared over the lines

## Verification Boundary

The suite drives the composed local API dispatcher and its registered routes.

## What This Suite Proves

The registered cases check the store’s order-level discount shared over the lines 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.
