---
id: ATS-COM-CAT-001
scope: CAP-COM-CAT-001
product_area: commerce
module: catalog
revision: 1
status: proposed
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-COM-CAT-001-01
    title: Policy money fields reject incomplete or unsupported choices
    level: api
    proves:
      - BR-CAP-COM-CAT-001-01
      - BR-CAP-COM-CAT-001-02
    preconditions: A unit supports USD alone
    steps: Attempt creation without currency and with EUR
    expected: Both requests fail on the relevant field and leave no policy
    negative: true
    data_needs: Accounting business unit with currencies
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
        400 to a profile without a business unit or without a currency: the two
        money facts a profile always has
      - >-
        services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
        400 currency_not_supported_by_business_unit to a currency the business
        unit does not transact in
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
      400 to a profile without a business unit or without a currency: the two
      money facts a profile always has
  - id: ATS-COM-CAT-001-02
    title: Merchant-account eligibility and connection failure take different paths
    level: unit
    proves:
      - BR-CAP-COM-CAT-001-03
    preconditions: Accounting provides account fixtures and an unavailable response
    steps: >-
      Submit wrong-unit, inactive, wrong-currency and unknown accounts, then
      simulate connection failure
    expected: >-
      Invalid accounts fail field validation; connection failure permits saving
      with a logged warning
    negative: true
    data_needs: Fixture Accounting accounts
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/unit/persistence/ordering-profile-merchant-account.spec.js#is
        refused 400 merchant_account_not_eligible when the account belongs to
        another business unit
      - >-
        services-commerce:modules/configuration/tests/unit/persistence/ordering-profile-merchant-account.spec.js#is
        let through, logged, when Accounting is unreachable
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/unit/persistence/ordering-profile-merchant-account.spec.js#is
      refused 400 merchant_account_not_eligible when the account belongs to
      another business unit
  - id: ATS-COM-CAT-001-03
    title: Card-range validation identifies missing or reversed bounds
    level: api
    proves:
      - BR-CAP-COM-CAT-001-04
    preconditions: Range-based acceptance is selected
    steps: Omit each bound in turn and reverse their order
    expected: Each invalid range fails with the affected bound identified
    negative: true
    data_needs: none
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
        400 to a within_range acceptance without its minimum, naming
        card_minimum_total_minor, with or without the maximum (0755)
      - >-
        services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
        400 to an inverted card range, naming the field, not the database rule,
        and saves nothing (DEF-COM-0866)
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
      400 to a within_range acceptance without its minimum, naming
      card_minimum_total_minor, with or without the maximum (0755)
  - id: ATS-COM-CAT-001-04
    title: Database enforcement rejects unsupported payment windows
    level: api
    proves:
      - BR-CAP-COM-CAT-001-05
    preconditions: A policy row is ready for insertion
    steps: Insert zero-minute and eight-day windows
    expected: Both inserts fail their window constraint
    negative: true
    data_needs: none
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/integration/db/configuration-records.table.integration.spec.js#refuses
        a tender window outside one minute to a week, by
        ordering_profiles_tender_window_minutes_check
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/integration/db/configuration-records.table.integration.spec.js#refuses
      a tender window outside one minute to a week, by
      ordering_profiles_tender_window_minutes_check
  - id: ATS-COM-CAT-001-05
    title: Policy payment lists reject blanks and duplicates
    level: unit
    proves:
      - BR-CAP-COM-CAT-001-07
    preconditions: Policy requests contain editable payment lists
    steps: >-
      Replace with an empty collection option and create with a repeated payment
      method
    expected: Validation identifies each offending entry
    negative: true
    data_needs: none
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/unit/api/blank-ordering-profile-ids.spec.js#refuses
        an empty entry in collection_option_ids on a replacement 400, naming the
        field
      - >-
        services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#refuses
        a payment method named twice, 400 payment_method_repeated (the seam for
        Accounting’s list, D-10)
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/unit/api/blank-ordering-profile-ids.spec.js#refuses
      an empty entry in collection_option_ids on a replacement 400, naming the
      field
  - id: ATS-COM-CAT-001-06
    title: Default designation transfers without disappearing
    level: api
    proves:
      - BR-CAP-COM-CAT-001-09
    preconditions: The workspace initially has no policies
    steps: >-
      Create two policies, designate the second and attempt to clear its default
      flag
    expected: >-
      Creation selects the first; transfer selects only the second; clearing the
      flag fails
    negative: true
    data_needs: none
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#makes
        a second profile no default, and one stating is_tenant_default the
        default in place of the first, in one transaction
      - >-
        services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
        400 to a replacement that drops the tenant default flag from the
        default, and moves it when another states it
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#makes
      a second profile no default, and one stating is_tenant_default the default
      in place of the first, in one transaction
  - id: ATS-COM-CAT-001-07
    title: References retain default and store policies
    level: api
    proves:
      - BR-CAP-COM-CAT-001-10
      - BR-CAP-COM-CAT-001-11
    preconditions: Workspace and application defaults and a store policy exist
    steps: >-
      Deactivate the application default and delete referenced policies, then
      remove the store reference
    expected: >-
      Default and store refusals identify their dependencies; the unreferenced
      store policy can be deleted
    negative: true
    data_needs: A store under a policy
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#refuses
        making an application default inactive, 409 profile_is_default naming
        the application, and deactivates it once no default names it (D31)
      - >-
        services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
        409 naming the store while a store sells under the profile, then 200
        once the store is gone
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#refuses
      making an application default inactive, 409 profile_is_default naming the
      application, and deactivates it once no default names it (D31)
  - id: ATS-COM-CAT-001-08
    title: Stale policy replacement preserves the current record
    level: api
    proves:
      - BR-CAP-COM-CAT-001-13
    preconditions: The saved policy has advanced to version two
    steps: Submit the earlier version for replacement
    expected: A conflict preserves version two
    negative: true
    data_needs: none
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
        409 to a stale version
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers
      409 to a stale version
  - id: ATS-COM-CAT-001-09
    title: Policy writes refuse a read-only caller
    level: api
    proves:
      - BR-CAP-COM-CAT-001-15
    preconditions: A caller has policy read authority alone
    steps: 'Attempt policy creation, replacement and removal'
    expected: Permission refusals preserve the records
    negative: true
    data_needs: Read-exclusively persona
    bound_to:
      - >-
        services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#is
        refused the creates, 403 permission_missing
      - >-
        services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#is
        refused the replacements, 403 permission_missing, the records unchanged
    provenance: test
    source: >-
      services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#is
      refused the creates, 403 permission_missing
  - id: ATS-COM-CAT-001-10
    title: Policy summary reflects a saved card-range edit
    level: browser
    proves:
      - BR-CAP-COM-CAT-001-04
      - AS-JNY-COM-CAT-001-01
    preconditions: The console runs against Commerce mock data
    steps: 'Create and view a policy, edit its card range and save'
    expected: The returned view summarizes the revised range
    negative: false
    data_needs: Console mock
    bound_to:
      - >-
        react-console:e2e/mock/commerce-checkout-policies.mock.spec.ts#create a
        policy, read its summary on the view, edit the card range, save, and see
        it on the view
    provenance: test
    source: >-
      react-console:e2e/mock/commerce-checkout-policies.mock.spec.ts#create a
      policy, read its summary on the view, edit the card range, save, and see
      it on the view
evidence:
  - 'Pinned service inputs: test sources in scenario bindings'
  - 'Pinned console inputs: console sources in scenario bindings'
---

# Configure reusable sale-processing policies: Acceptance Test Set

## Coverage

| Rule | Proof Scenario or Gap |
|---|---|
| `BR-CAP-COM-CAT-001-01` | `ATS-COM-CAT-001-01` |
| `BR-CAP-COM-CAT-001-02` | `ATS-COM-CAT-001-01` |
| `BR-CAP-COM-CAT-001-03` | `ATS-COM-CAT-001-02` |
| `BR-CAP-COM-CAT-001-04` | `ATS-COM-CAT-001-03`, `ATS-COM-CAT-001-10` |
| `BR-CAP-COM-CAT-001-05` | `ATS-COM-CAT-001-04` |
| `BR-CAP-COM-CAT-001-07` | `ATS-COM-CAT-001-05` |
| `BR-CAP-COM-CAT-001-09` | `ATS-COM-CAT-001-06` |
| `BR-CAP-COM-CAT-001-10` | `ATS-COM-CAT-001-07` |
| `BR-CAP-COM-CAT-001-11` | `ATS-COM-CAT-001-07` |
| `BR-CAP-COM-CAT-001-13` | `ATS-COM-CAT-001-08` |
| `BR-CAP-COM-CAT-001-14` | no scenario: `FND-COM-CAT-026` |
| `BR-CAP-COM-CAT-001-15` | `ATS-COM-CAT-001-09` |
| `BR-CAP-COM-CAT-001-16` | no scenario: `FND-COM-CAT-026` |
