---
id: TST-COM-ORD-104
title: Orders read
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/persistence/orders.queries.integration.spec.js
implements:
  - ATS-COM-ORD-006-11
  - ATS-COM-ORD-010-01
  - ATS-COM-ORD-010-02
  - ATS-COM-ORD-010-03
  - ATS-COM-ORD-010-09
  - ATS-COM-ORD-011-06
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/persistence/orders.queries.integration.spec.js
    test_cases:
      - 'answers the order whole: every column mapped, the system properties, the mirror absent until derived'
      - >-
        answers the line whole with its purchase, the invoice line id billing wrote, and the provenance of its
        price
      - answers the tenders in sequence order and the invoices
      - 'answers undefined for an order the tenant does not have, and never another tenant’s'
      - 'lists a buyer’s orders newest placed first, a page at a time'
      - 'lists the placed orders past their tender window, oldest first, and not the accepted one'
      - >-
        lists, across tenants, every placed order past its window as references, oldest window first, under
        the sweep policy alone
      - 'lists the orders whose billing is pending, oldest placed first, and not the billed one'
      - 'lists an order’s events, the tenant’s only'
      - 'lists every order of the tenant newest placed first, and none of another tenant’s'
      - 'answers each order with its buyer’s name, a contact’s or an organization’s, null when CRM has none'
      - pages with a limit and says whether another page follows
      - finds an order by its display number with or without the ORD- prefix
      - finds orders by part of a number
      - finds an order by part of its buyer’s name in any case
      - 'reads a search term literally: an underscore matches an underscore, not any character'
      - filters by status
      - filters the paid orders by the money mirror
      - 'filters the unpaid orders: owing or not yet billed, never a voided one'
      - filters by kind
      - 'filters by placed date, both days inclusive'
      - 'combines the filters: all of them must hold'
      - answers another tenant’s orders to that tenant alone
scenario_coverage:
  - scenario: ATS-COM-ORD-006-11
    test_cases:
      - >-
        answers the line whole with its purchase, the invoice line id billing wrote, and the provenance of its
        price
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-010-01
    test_cases:
      - 'lists every order of the tenant newest placed first, and none of another tenant’s'
      - 'answers each order with its buyer’s name, a contact’s or an organization’s, null when CRM has none'
      - pages with a limit and says whether another page follows
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-010-02
    test_cases:
      - finds an order by its display number with or without the ORD- prefix
      - finds orders by part of a number
      - finds an order by part of its buyer’s name in any case
      - 'reads a search term literally: an underscore matches an underscore, not any character'
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-010-03
    test_cases:
      - filters by status
      - filters the paid orders by the money mirror
      - 'filters the unpaid orders: owing or not yet billed, never a voided one'
      - filters by kind
      - 'filters by placed date, both days inclusive'
      - 'combines the filters: all of them must hold'
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-010-09
    test_cases:
      - 'answers the order whole: every column mapped, the system properties, the mirror absent until derived'
      - >-
        answers the line whole with its purchase, the invoice line id billing wrote, and the provenance of its
        price
      - answers the tenders in sequence order and the invoices
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-011-06
    test_cases:
      - >-
        lists, across tenants, every placed order past its window as references, oldest window first, under
        the sweep policy alone
    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/integration/services/persistence/orders.queries.integration.spec.js'
  declared_by_test: 'PostgreSQL, the persistence service, the execution context under `rhythm_commerce_app`. Doubled: nothing.'
---

# Orders read

## Verification Boundary

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

## What This Suite Proves

The registered cases check orders read 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.
