---
id: TST-COM-ORD-077
title: 'An extension’s line adjustment in the unit price, and the order fee refused'
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/extension-line-adjustments.e2e.spec.js
implements:
  - ATS-COM-ORD-003-09
  - ATS-COM-ORD-006-07
  - ATS-COM-ORD-006-12
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/extension-line-adjustments.e2e.spec.js'
    test_cases:
      - >-
        makes the unit price the adjusted $95.00, the line $95.00, its tax on that $7.60, keeping the price
        row’s $100.00
      - requests an invoice line whose unit price times its quantity less its discount is the line total
      - 'takes the 10 % from the adjusted price: $9.50 off, the line $85.50, its tax on the net $6.84'
      - requests the promoted invoice line with its identity holding
      - 'refunds the one line its net and its tax: $95.00 + $7.60 and $85.50 + $6.84'
      - >-
        makes the unit price the adjusted $103.00, the line $103.00, its tax on that $8.24, keeping the price
        row’s $100.00
      - requests an invoice line whose identity holds
      - 'takes the 10 % from the adjusted price: $10.30 off, the line $92.70, its tax on the net $7.42'
      - 'refunds the one line its net and its tax: $103.00 + $8.24 and $92.70 + $7.42'
      - 'refuses the preview 409 order_fee_unsupported, with the sentence'
      - refuses the placement the same way
      - writes no order and leaves the checkout open
      - 'previews the fee in the totals: $3.00 fee beside the line, nothing refused'
      - writes the fee line on the order fee product with the description the pricing code gave
      - 'taxes the fee by the product’s class: 8 % of $3.00 is $0.24, in the order’s tax and total'
      - 'never discounts the fee: TEN takes $10.00 from the item and nothing from the fee line'
      - 'requests the invoice with the fee as a line of the product, undiscounted'
scenario_coverage:
  - scenario: ATS-COM-ORD-003-09
    test_cases:
      - 'previews the fee in the totals: $3.00 fee beside the line, nothing refused'
      - 'taxes the fee by the product’s class: 8 % of $3.00 is $0.24, in the order’s tax and total'
      - 'never discounts the fee: TEN takes $10.00 from the item and nothing from the fee line'
      - 'refuses the preview 409 order_fee_unsupported, with the sentence'
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-006-07
    test_cases:
      - requests an invoice line whose unit price times its quantity less its discount is the line total
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-006-12
    test_cases:
      - 'requests the invoice with the fee as a line of the product, undiscounted'
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
dependency_evidence:
  provenance: test
  source: 'services-commerce:modules/orders/tests/e2e/extension-line-adjustments.e2e.spec.js'
  declared_by_test: >-
    the composed handler, the routes, the workflows, the pricing engine and its extension steps, the
    promotions library and persistence, 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 extensions (the reference fixtures).
---

# An extension’s line adjustment in the unit price, and the order fee refused

## Verification Boundary

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

## What This Suite Proves

The registered cases check an extension’s line adjustment in the unit price, and the order fee refused 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.
