Skip to content

ATS-PFM-ELG-005Replace obsolete rules without losing their uses: Capability Test Specification

Markdown

ATS-PFM-ELG-005

Replace obsolete rules without losing their uses: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleEligibility, Responsibilities and AttentionRevision3

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

  • Rule gap: FND-PFM-ELG-057
  • Transition gap: FND-PFM-ELG-057
  • Validation covered
  • Permission gap: FND-PFM-ELG-057
  • Edge gap: FND-PFM-ELG-057
  • Failure gap: FND-PFM-ELG-057
  • Boundary gap: FND-PFM-ELG-057
  • Concurrency covered
  • Invariant gap: FND-PFM-ELG-057
  • Interaction covered

Test Scenarios

11 scenarios proving CAP-PFM-ELG-005; 8 bound to an existing test.

01 Restrict lifecycle administrationpermissionapinegativetest
Proves
BR-CAP-PFM-ELG-005-01
Preconditions
A writer, binder and retire-authorized administrator are available.
Steps
Attempt deprecation, archive, restoration, deletion and reference transfer.
Expected
Only the retirement-authorized caller succeeds.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses the deprecation to a writer without the retire permission, 403
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses the deprecation to a writer without the retire permission, 403
02 Preserve existing deprecated usestransitionapitest
Proves
BR-CAP-PFM-ELG-005-02 INV-DOM-PFM-ELG-001-06
Preconditions
A price already uses the rule.
Steps
Deprecate with a replacement, evaluate, attempt a new use, restore and bind again.
Expected
Existing evaluation continues and a new use is blocked until restoration.
Data
No fixtures beyond the described setup.
Bound to
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deprecates the rule, naming its replacement
03 Wait for dependencies before archivevalidationapinegativetest
Proves
BR-CAP-PFM-ELG-005-03 INV-DOM-PFM-ELG-001-07
Preconditions
Following, published-reference and draft-reference dependencies exist.
Steps
Attempt archive as each dependency is removed.
Expected
Remaining dependencies are counted in refusals; archive succeeds after the last is removed.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses while an active binding follows it, counting the binding, and leaves it active
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses while another definition’s published version references it, counting the reference
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses while the current draft of another definition references it, counting the reference
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#archives it once every definition that referenced it is archived, whatever its dependency rows still say (DEF-ELIG-0275)
Source
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses while an active binding follows it, counting the binding, and leaves it active
04 Restore before reactivationtransitionunitnegativetest
Proves
BR-CAP-PFM-ELG-005-04 INV-DOM-PFM-ELG-001-06
Preconditions
An archived rule has a suspended binding.
Steps
Create and reactivate uses before and after restoration.
Expected
Archive blocks activation, restoration permits it and suspension remains possible.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses a new binding of an archived definition
services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses making a binding of an archived definition active again
services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#accepts suspending a binding of an archived definition
Source
services-platform:modules/eligibility/tests/unit/lifecycle.spec.js#refuses a new binding of an archived definition
05 Move followers while preserving pinsinteractionapitest
Proves
BR-CAP-PFM-ELG-005-05
Preconditions
A deprecated rule has following and pinned bindings and references.
Steps
Transfer dependencies to its replacement.
Expected
The follower moves with audit and the referencing rule gets a replacement release and note; pins remain listed in place.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#publishes the follower’s new version naming the replacement, with the migration’s change note
services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists the pinned binding for a person to move, and leaves it on the deprecated definition
Source
services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#reports the following binding as moved
06 Validate replacement standingvalidationapinegativetest
Proves
BR-CAP-PFM-ELG-005-06
Preconditions
Candidate replacements are unpublished, archived or the original rule itself.
Steps
Attempt transfer to each.
Expected
All fail without moving dependencies.
Data
No fixtures beyond the described setup.
Bound to
Source
services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses a replacement that was never published
07 Delete only unused unpublished worktransitionapitest
Proves
BR-CAP-PFM-ELG-005-07
Preconditions
Unpublished, published and bound rules exist.
Steps
Request deletion for each.
Expected
The unused unpublished rule and dependencies are removed with audit; other requests identify their refusal.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deletes it, answering its id, the same as key, and deleted: true
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses a published definition, 409, naming the archive instead
services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#refuses a definition a binding uses, naming the binding, and leaves it as it was
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#deletes it, answering its id, the same as key, and deleted: true
08 Check lifecycle versionsconcurrencyapinegativetest
Proves
BR-CAP-PFM-ELG-005-08
Preconditions
Two administrators act on the same rule.
Steps
Send an obsolete-version request and a request without a version.
Expected
The stale request fails and the unversioned request proceeds.
Data
No fixtures beyond the described setup.
Bound to
Source
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses a lifecycle move at a version that is no longer current
09 Use dependency counts to decide archive readinessinteractionapiproposed
Proves
BR-CAP-PFM-ELG-002-08 BR-CAP-PFM-ELG-005-03
Preconditions
A rule has a following use and a live draft reference.
Steps
Read its overview and usage, attempt archive, remove the use and reference, then repeat the reads and archive.
Expected
The refusal counts agree with discovery; removing both dependencies permits archive.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/integration/services/model/explorer.integration.spec.js#is the number the archive refusal names; services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses while an active binding follows it, counting the binding, and leaves it active
10 Move a following reference through replacementinteractionapiproposed
Proves
BR-CAP-PFM-ELG-004-03 BR-CAP-PFM-ELG-005-05
Preconditions
An obsolete rule is referenced by another released rule and a replacement is ready.
Steps
Transfer its following references, inspect the referencing rule history and attempt archive of the old rule.
Expected
The referencing rule gains a release using the replacement; any retained pins still prevent archive.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/integration/services/governance/publish.integration.spec.js#publishes the next draft as version 2 and supersedes version 1; services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists the pinned binding for a person to move, and leaves it on the deprecated definition
11 Keep pins while moving following usesinteractionapiproposed
Proves
BR-CAP-PFM-ELG-005-05 BR-CAP-PFM-ELG-007-04
Preconditions
An obsolete rule has one following use and one pinned use; its replacement fits both purposes.
Steps
Move uses to the replacement, inspect both connections and evaluate them.
Expected
The follower changes rule without a duplicate consumer use; the pin retains its earlier rule and expression.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/integration/services/governance/lifecycle.integration.spec.js#lists the pinned binding for a person to move, and leaves it on the deprecated definition; services-platform:modules/eligibility/tests/integration/services/persistence/bindings.integration.spec.js#refuses a pin of the definition’s draft

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.