---
id: TST-COM-FUL-077
title: Shipping tables table
kind: integration
product_area: commerce
module: fulfillment
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-commerce
files:
  - modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js
implements:
  - ATS-COM-FUL-010-01
  - ATS-COM-FUL-010-02
  - ATS-COM-FUL-010-03
  - ATS-COM-FUL-010-04
  - ATS-COM-FUL-012-04
  - ATS-COM-FUL-012-07
  - ATS-COM-FUL-013-01
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  Run-created workspace identifiers and fixture records in the prepared test database; concurrency
  cases own their extra connections.
evidence:
  - repository: services-commerce
    path: modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js
    test_titles:
      - holds the zone with its padded name trimmed by the text-normalization trigger (premise)
      - >-
        refuses a zone naming a country that is not two upper-case letters, by
        shipping_zones_country_codes_check
      - >-
        refuses a carrier outside the six and a markup above 100 %, by
        carrier_accounts_carrier_check and carrier_accounts_markup_check
      - >-
        refuses a strategy of a zone the tenant does not have (another tenant’s included), by
        shipping_strategies_zone_fk
      - >-
        holds a carrier strategy to naming its account and a flat one to naming none, by
        shipping_strategies_carrier_check
      - >-
        holds a pickup strategy to naming where the buyer collects and charging nothing, by
        shipping_strategies_pickup_check
      - >-
        refuses a pickup at a warehouse the tenant does not have, by
        shipping_strategies_pickup_warehouse_fk, and a warehouse delete while a pickup names it
        (RESTRICT)
      - >-
        refuses deleting an account a strategy rates through (RESTRICT), by
        shipping_strategies_carrier_account_fk, and cascades a zone’s strategies with the zone
      - >-
        writes a shipment of the order with a line of two units (premise), and refuses a second
        shipment with the same number, by shipments_number_uq
      - >-
        refuses a shipment of an order or a warehouse the tenant does not have, by
        shipments_order_fk and shipments_warehouse_fk
      - >-
        holds a shipment past the handoff to carrying the handoff instant, and one before it to
        none, by shipments_handed_off_check
      - >-
        holds a collected shipment to a pick-up naming who collected it, by
        shipments_collected_check and shipments_pickup_check
      - 'keeps a pick-up off the carrier’s states, by shipments_pickup_check'
      - >-
        refuses a line state outside the sixteen, by shipment_lines_state_check, and a unit range
        whose quantity disagrees, by shipment_lines_units_check
      - >-
        holds a fenced line to naming its fence, by shipment_lines_fence_check, and a shipped line
        to its whole quantity and instant, by shipment_lines_shipped_check
      - >-
        refuses a second range of one order line starting at the same unit on one shipment, by
        shipment_lines_unit_range_uq, and a line of another tenant’s order line, by
        shipment_lines_order_line_fk
      - >-
        writes a package (premise) and refuses a second with the same sequence, by
        packages_sequence_uq, and a second carrying the same tracking number, by
        packages_tracking_number_uq
      - >-
        refuses a package line of nothing, by package_lines_quantity_check, and one naming a line
        the tenant does not have, by package_lines_shipment_line_fk
      - >-
        writes a label intent once under its key (premise), refuses the same key twice, by
        carrier_labels_idempotency_key_uq, and holds a purchased label to its tracking number and
        instant, by carrier_labels_purchased_check
      - 'lets the application role insert an event and refuses it UPDATE, DELETE and TRUNCATE, 42501'
      - >-
        holds a picked line to its whole quantity and a short one to less, by
        pick_list_lines_picked_check, and a claimed list to its picker, by pick_lists_claimed_check
      - >-
        admits label_failed, void_failed and handoff_refused and refuses a kind outside the nine, by
        inventory_exceptions_kind_check
      - >-
        hides one tenant’s zones, shipments, lines and packages from the other, under the forced
        policies
      - 'refuses a row written into the other tenant, by the policy’s WITH CHECK (42501)'
    scenario_anchors:
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#refuses
        a zone naming a country that is not two upper-case letters, by
        shipping_zones_country_codes_check
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#refuses
        deleting an account a strategy rates through (RESTRICT), by
        shipping_strategies_carrier_account_fk, and cascades a zone’s strategies with the zone
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#holds
        a carrier strategy to naming its account and a flat one to naming none, by
        shipping_strategies_carrier_check
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#holds
        a pickup strategy to naming where the buyer collects and charging nothing, by
        shipping_strategies_pickup_check
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#refuses
        a pickup at a warehouse the tenant does not have, by
        shipping_strategies_pickup_warehouse_fk, and a warehouse delete while a pickup names it
        (RESTRICT)
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#refuses
        a carrier outside the six and a markup above 100 %, by carrier_accounts_carrier_check and
        carrier_accounts_markup_check
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#holds
        a picked line to its whole quantity and a short one to less, by
        pick_list_lines_picked_check, and a claimed list to its picker, by pick_lists_claimed_check
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#refuses
        a package line of nothing, by package_lines_quantity_check, and one naming a line the tenant
        does not have, by package_lines_shipment_line_fk
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#lets
        the application role insert an event and refuses it UPDATE, DELETE and TRUNCATE, 42501
      - >-
        services-commerce:modules/shipping/tests/integration/db/shipping-tables.table.integration.spec.js#writes
        a label intent once under its key (premise), refuses the same key twice, by
        carrier_labels_idempotency_key_uq, and holds a purchased label to its tracking number and
        instant, by carrier_labels_purchased_check
---

# Shipping tables table

## Verification Boundary

This suite checks shipping tables table against the prepared PostgreSQL database. Its entry points are the persistence and service functions used by the tests.

## What This Suite Proves

The bound scenarios identify the assertions this suite contributes. Source anchors retain the exact test cases; where a capability scenario has several contributing suites, a single binding does not imply that every branch runs here.

## What It Does Not Prove

Direct service and persistence calls do not establish the full HTTP permission contract, deployed scheduling or browser behavior. No execution result is claimed by this register.

## Real Dependencies and Test Doubles

The database and imported Commerce persistence services are real. Fixtures create the records owned by this run. Time-sensitive cases use a controlled clock where the source fixture supplies one.

## Must Not Be Doubled

Keep the database constraints, row visibility and persistence writes real when claiming this integration coverage. A canned repository response cannot replace the boundary being checked.
