---
id: ATS-MBR-STR-012
scope: CAP-MBR-STR-012
product_area: membership
module: structure
revision: 1
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-MBR-STR-012-01
    title: Invalid product identities leave no package
    level: api
    proves:
      - BR-CAP-MBR-STR-012-01
      - AS-JNY-MBR-STR-004-02
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: 'Attempt package creation without identity, with an absent product and with the wrong product type.'
    expected: Each attempt returns its validation problem and creates no extension.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        refuses a package create that names no product id: there is no name to make one from
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        refuses a package whose product Accounting does not have, 400
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        refuses a package on a product of another type, 400
      - >-
        services-membership:tests/acceptance/configuration/MBR-ACC-0099.acceptance.ts#MBR-ACC-0099: A package
        is created as the extension of a product Accounting already holds: no id, an unknown product, a
        product of another type and the product's own fields are each refused, and the created package answers
        the product's name, status, visibility and audiences
    provenance: test
    source: >-
      services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
      refuses a package create that names no product id: there is no name to make one from
  - id: ATS-MBR-STR-012-02
    title: Shared product fields remain Accounting-owned
    level: api
    proves:
      - BR-CAP-MBR-STR-012-02
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Submit a package name and separately read an existing package.
    expected: 'The write rejects the shared field while the read returns product name, status and visibility.'
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        refuses the common fields a package no longer carries of its own (they are the product’s)
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        extends a product of type membership_package and answers the product’s name, status and visibility as
        the package’s
    provenance: test
    source: >-
      services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
      refuses the common fields a package no longer carries of its own (they are the product’s)
  - id: ATS-MBR-STR-012-03
    title: Product retirement affects package availability
    level: api
    proves:
      - BR-CAP-MBR-STR-012-03
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: 'Make the product inactive, inspect the active package list and attempt a staff renewal.'
    expected: The extension no longer appears active and the renewal fails.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        lists packages with the product’s fields and filters is_active by the product’s status
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        refuses a renewal term on a package whose product Accounting deactivated
      - >-
        services-membership:tests/acceptance/configuration/MBR-ACC-0091.acceptance.ts#MBR-ACC-0091: A package
        follows its Accounting product: when Accounting deactivates, retires or deletes the product the
        package answers that status, sells no term and writes nothing in Membership
    provenance: test
    source: >-
      services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
      lists packages with the product’s fields and filters is_active by the product’s status
  - id: ATS-MBR-STR-012-04
    title: A product cannot receive a second package extension
    level: api
    proves:
      - BR-CAP-MBR-STR-012-04
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Repeat creation under an already extended product identity.
    expected: The existing extension remains and duplicate creation fails.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
        refuses a second extension of the same product: the package id is the product id
    provenance: test
    source: >-
      services-membership:tests/e2e/packages-as-products.e2e.spec.ts#packages as products, through the API ›
      refuses a second extension of the same product: the package id is the product id
  - id: ATS-MBR-STR-012-05
    title: Package classification matches its program
    level: api
    proves:
      - BR-CAP-MBR-STR-012-05
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Submit one program with another program’s classification.
    expected: The classification field is named in the refusal and no package is retained.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
        through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
        refuses › refuses a package of a type of another program 400 naming membership_type_id, and writes no
        package nor unit rule
    provenance: test
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches, through
      the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column refuses ›
      refuses a package of a type of another program 400 naming membership_type_id, and writes no package nor
      unit rule
  - id: ATS-MBR-STR-012-06
    title: Renewal targets cannot be self or cross-program
    level: api
    proves:
      - BR-CAP-MBR-STR-012-06
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Compare renewal targets pointing to the package itself and to a different program’s package.
    expected: Both cases report an invalid renewal target.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
        through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
        refuses › refuses a package renewing into itself 400 naming renews_into_package_id
      - >-
        services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
        through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
        refuses › refuses a package renewing into another program’s package 400 naming renews_into_package_id
    provenance: test
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches, through
      the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column refuses ›
      refuses a package renewing into itself 400 naming renews_into_package_id
  - id: ATS-MBR-STR-012-07
    title: Policy-set references require an existing set
    level: api
    proves:
      - BR-CAP-MBR-STR-012-08
    preconditions: >-
      An isolated Membership-licensed workspace contains the relevant records, with caller permissions
      selected for the case.
    steps: Create an otherwise valid package with an absent policy set.
    expected: The response names the policy-set field and rejects creation.
    negative: true
    data_needs: The FAA example records or equivalent records prepared within the isolated workspace.
    bound_to:
      - >-
        services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches,
        through the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column
        refuses › refuses a change policy set that does not exist 400 naming change_policy_set_id
    provenance: test
    source: >-
      services-membership:tests/e2e/database-refusals.e2e.spec.ts#mistakes only the database catches, through
      the API › DEF-MBR-0086: a configuration write a check, a foreign key or an integer column refuses ›
      refuses a change policy set that does not exist 400 naming change_policy_set_id
evidence:
  - 'services-membership:tests/acceptance/configuration/MBR-ACC-0091.acceptance.ts'
  - 'services-membership:tests/acceptance/configuration/MBR-ACC-0099.acceptance.ts'
  - 'services-membership:tests/e2e/database-refusals.e2e.spec.ts'
  - 'services-membership:tests/e2e/packages-as-products.e2e.spec.ts'
---

# Offer membership through an Accounting product: Acceptance Test Set

## Coverage

| Rule | Proof Scenario or Open Finding |
|---|---|
| `BR-CAP-MBR-STR-012-01` | `ATS-MBR-STR-012-01` |
| `BR-CAP-MBR-STR-012-02` | `ATS-MBR-STR-012-02` |
| `BR-CAP-MBR-STR-012-03` | `ATS-MBR-STR-012-03` |
| `BR-CAP-MBR-STR-012-04` | `ATS-MBR-STR-012-04` |
| `BR-CAP-MBR-STR-012-05` | `ATS-MBR-STR-012-05` |
| `BR-CAP-MBR-STR-012-06` | `ATS-MBR-STR-012-06` |
| `BR-CAP-MBR-STR-012-08` | `ATS-MBR-STR-012-07` |
| `BR-CAP-MBR-STR-012-09` | no scenario: `FND-MBR-STR-036` |
| `BR-CAP-MBR-STR-012-10` | no scenario: `FND-MBR-STR-036` |
| `BR-CAP-MBR-STR-012-11` | no scenario: `FND-MBR-STR-036` |
