---
id: TST-COM-ORD-159
title: Purchasing persisted
kind: integration
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/purchasing/tests/integration/services/persistence/purchasing-reads.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/purchasing/tests/integration/services/persistence/purchasing-reads.integration.spec.js
    test_cases:
      - >-
        creates a vendor under the id its name suggests, lists by name, replaces at the version read (a stale
        one 409), refuses a locked one, and deletes a free one
      - >-
        refuses a taken id 400 and an e-mail address the database will not hold, and refuses deleting the
        vendor a purchase order names 409
      - 'numbers the draft, keeps its lines in line order, and replaces it whole at the version read'
      - >-
        issues the draft with its instant, refuses replacing it after, and cancels part of a line with the
        status still issued
      - 'cancels a draft with its instant, and lists by status and by vendor newest first'
      - >-
        answers a SKU’s open order lines soonest first (the backorder’s expected replenishment), cancelled and
        received quantity taken off
      - >-
        lists a receipt by its order and an order line’s receipt lines, the layers by SKU and openness, the
        facts by kind and the relief by item, nothing of another tenant
scenario_coverage: []
dependency_evidence:
  provenance: test
  source: >-
    services-commerce:modules/purchasing/tests/integration/services/persistence/purchasing-reads.integration.spec.js
  declared_by_test: 'PostgreSQL and the persistence services. Doubled: nothing.'
---

# Purchasing persisted

## Verification Boundary

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

## What This Suite Proves

The registered cases check purchasing persisted 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.
