Skip to content

ATS-PFM-ELG-001Author a readable eligibility rule: Capability Test Specification

Markdown

ATS-PFM-ELG-001

Author a readable eligibility rule: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleEligibility, Responsibilities and AttentionRevision3

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

20 scenarios proving CAP-PFM-ELG-001; 15 bound to an existing test.

01 Validate readable identitiesvalidationapinegativetest
Proves
BR-CAP-PFM-ELG-001-01 INV-DOM-PFM-ELG-001-01
Preconditions
The caller can author rules in a workspace.
Steps
Submit uppercase, hyphenated, reserved, 64-character and valid keys.
Expected
Only the valid lowercase underscore form within 63 characters persists; refusals leave no rule.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses an id that is not a configuration id, before anything is written
Source
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses an id that is not a configuration id, before anything is written
02 Keep uniqueness localinvariantapinegativetest
Proves
BR-CAP-PFM-ELG-001-02 INV-DOM-PFM-ELG-001-01
Preconditions
Two workspaces are available.
Steps
Create a key twice in one workspace and once in the second.
Expected
The local duplicate fails with its key named; the second workspace accepts it.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses a second definition with the same id (key) in the tenant, naming it
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#accepts the same id in another tenant, because ids are unique per tenant
Source
services-platform:modules/eligibility/tests/integration/services/persistence/definitions.integration.spec.js#refuses a second definition with the same id (key) in the tenant, naming it
03 Protect the permanent keyinvariantapinegativetest
Proves
BR-CAP-PFM-ELG-001-03 INV-DOM-PFM-ELG-001-01
Preconditions
A saved rule is available.
Steps
Submit a metadata edit with another key.
Expected
The edit fails and the original identity remains.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses an edit that names the key, which never changes, 400
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses an edit that names the key, which never changes, 400
04 Retain invalid work for repairruleapitest
Proves
BR-CAP-PFM-ELG-001-04
Preconditions
Separate writing and publishing callers are available.
Steps
Save a misused condition, attempt release, repair it, validate and release again.
Expected
Problems accompany the saved draft and block the first release; the corrected expression validates and publishes.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#answers the draft’s problem, saved rather than refused
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses the publish while the problem exists, 400, naming it
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#answers the draft’s problem, saved rather than refused
05 Replace one draft with version checksconcurrencyapitest
Proves
BR-CAP-PFM-ELG-001-05 INV-DOM-PFM-ELG-001-02
Preconditions
A rule has an editable draft.
Steps
Save twice, retry the initial version, then save without a version.
Expected
The same draft advances; the obsolete save changes nothing and the unversioned save replaces it.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#refuses a save at a draft version that is no longer current, and leaves the draft as it was
Source
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#replaces the draft in place on the next save, moving its version
06 Distinguish bare creationtransitionapitest
Proves
BR-CAP-PFM-ELG-001-06
Preconditions
An author can create rules.
Steps
Create with and without conditions and inspect both, then save the bare rule’s draft.
Expected
The bare rule gains its first version on save; supplied conditions create version one immediately.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#creates a definition without a draft when the request carries no expression
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#saves the expression as draft version 1 with its summary and no problems
Source
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#creates a definition without a draft when the request carries no expression
07 Identify invalid dependencies and subjectsvalidationapinegativetest
Proves
BR-CAP-PFM-ELG-001-07
Preconditions
Published, archived and draft-only rules and a contact custom field are present.
Steps
Validate unavailable references, a cycle, unsupported facts and fields and an organization primary on a contact rule.
Expected
Each invalid case returns its own problem, while an available publication and known field validate.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/model/validate-definition.integration.spec.js#answers a draft that reaches itself through a published reference as a cycle
services-platform:modules/eligibility/tests/integration/services/model/validate-definition.integration.spec.js#answers a field the tenant’s contacts do not have as invalid args, naming it
Source
services-platform:modules/eligibility/tests/integration/services/model/validate-definition.integration.spec.js#answers a reference to an archived definition as missing
08 Check parameter consistencyvalidationapinegativetest
Proves
BR-CAP-PFM-ELG-001-08
Preconditions
An expression declares a parameter.
Steps
Try inverted bounds, a mistyped default, an out-of-range default and a consistent declaration.
Expected
Invalid declarations identify the parameter; the consistent declaration validates.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/e2e/eligibility-governance-repairs.e2e.spec.js#refuses a default outside min and max, naming the parameter
services-platform:modules/eligibility/tests/unit/governance-repairs.spec.js#refuses a minimum above the maximum, naming the parameter
Source
services-platform:modules/eligibility/tests/e2e/eligibility-governance-repairs.e2e.spec.js#refuses min above max, naming the parameter
09 Exercise exact expression boundariesboundaryapinegativetest
Proves
BR-CAP-PFM-ELG-001-09
Preconditions
A rule author is available.
Steps
Validate expressions at every size bound and one beyond each.
Expected
Boundary cases pass, excess cases fail and summaries stop at 4,000 characters.
Data
No fixtures beyond the described setup.
Bound to
Source
react-console:acceptance/eligibility/playwright/journeys/definitions/ELIG-ACC-0061.spec.ts#ELIG-ACC-0061
10 Resolve readable labelsruleapitest
Proves
BR-CAP-PFM-ELG-001-10
Preconditions
An expression refers to a portal role and affiliation-type choice.
Steps
Validate it and an expression referring to a removed role.
Expected
Available labels appear in the summary; the unresolved reference remains, and stored references are unchanged.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/model/role-names.integration.spec.js#keeps the id of a role that is not there, so the sentence is not wrong (negative control)
Source
services-platform:modules/eligibility/tests/integration/services/model/role-names.integration.spec.js#says the roles by name in the summary of a validation
11 Require authority to sharepermissionapinegativetest
Proves
BR-CAP-PFM-ELG-001-11
Preconditions
A private rule, a writer without release authority and a publisher exist.
Steps
Both callers attempt workspace sharing, and the writer renames the rule.
Expected
Sharing fails for the writer and succeeds for the publisher; renaming remains allowed.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses a writer without the publish permission the promotion of a private definition, 403
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#refuses to promote a private definition without the publish permission, 403
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses a writer without the publish permission the promotion of a private definition, 403
12 Select the duplication sourcetransitionapitest
Proves
BR-CAP-PFM-ELG-001-12
Preconditions
A published rule also has a draft, and another rule has never been released.
Steps
Duplicate the default source, the draft and an explicitly absent publication.
Expected
Copies start with the chosen expression in a workspace-owned first draft; the absent source fails.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#copies the published rule as the copy’s draft by default, with a note naming the source
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#refuses to copy a published rule from a definition never published
Source
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#copies the published rule as the copy’s draft by default, with a note naming the source
13 Count Unicode charactersboundaryapinegativetest
Proves
BR-CAP-PFM-ELG-001-13
Preconditions
An author can save rule wording.
Steps
Try 1,000 and 1,001 four-byte characters in notes and boundary-length names and portal wording in multiple scripts.
Expected
Boundary lengths pass and one excess character fails with the limit named.
Data
No fixtures beyond the described setup.
Bound to
Source
services-platform:modules/eligibility/tests/integration/services/persistence/versions.integration.spec.js#refuses a change note of 1001 astral characters naming the limit
14 Require restoration before draftingtransitionapinegativetest
Proves
BR-CAP-PFM-ELG-001-14
Preconditions
The rule is archived.
Steps
Attempt a draft save, restore and save again.
Expected
Archive blocks the first save and restoration permits the second.
Data
No fixtures beyond the described setup.
Bound to
Source
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#refuses a draft of an archived definition
15 Identity aliases agree across creation and duplicationvalidationapinegativetest
Proves
BR-CAP-PFM-ELG-001-15
Preconditions
A writer can create and copy expressions.
Steps
Submit either alias, matching aliases, conflicting aliases and neither alias to both operations.
Expected
Either single alias and matching pairs succeed with equal response identities; conflicting or missing identities are refused.
Data
The existing route fixture supplies the rule and authorized caller.
Bound to
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definition-key-alias.e2e.spec.js#refuses id and key that differ, 400, naming both
16 Discover a saved draftinteractionapiproposed
Proves
BR-CAP-PFM-ELG-001-06 BR-CAP-PFM-ELG-002-06
Preconditions
A rule author and a reader share a workspace.
Steps
Create a bare rule, save a draft that references a released rule, then inspect the list and detail.
Expected
The new rule is discoverable and its draft and reference counts agree with the saved expression.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/integration/services/model/authoring.integration.spec.js#creates a definition without a draft when the request carries no expression; services-platform:modules/eligibility/tests/integration/services/model/explorer.integration.spec.js#answers the version it last published and its draft
17 Repair work before trying itinteractionapiproposed
Proves
BR-CAP-PFM-ELG-001-04 BR-CAP-PFM-ELG-003-03
Preconditions
A draft has one invalid reference and a readable subject exists.
Steps
Save the invalid draft, attempt a trial, repair the reference and run the trial again.
Expected
The first trial exposes draft problems; the repaired trial supplies a condition explanation without decision history.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#answers the draft’s problem, saved rather than refused; react-console:acceptance/eligibility/playwright/journeys/evaluation/ELIG-ACC-0294.spec.ts#ELIG-ACC-0294
18 Keep repairable drafts out of releaseinteractionapiproposed
Proves
BR-CAP-PFM-ELG-001-04 BR-CAP-PFM-ELG-004-02
Preconditions
A writer has a draft with validation errors.
Steps
Save the draft, attempt publication, repair its errors and publish with authority.
Expected
Only the repaired expression appears as a released version; the earlier refusal leaves the draft available.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#answers the draft’s problem, saved rather than refused; services-platform:modules/eligibility/tests/integration/services/governance/publish.integration.spec.js#refuses a condition type of an application the tenant is not licensed for
19 Use a renamed condition in existing workinteractionapiproposed
Proves
BR-CAP-PFM-ELG-001-07 BR-CAP-PFM-ELG-006-06
Preconditions
A released rule uses a condition whose application declares a new key with an alias.
Steps
Register the rename, inspect authoring choices and validate the retained expression.
Expected
The author sees the new vocabulary while the expression using the former key remains valid.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/integration/services/model/validate-definition.integration.spec.js#answers a reference to an archived definition as missing; services-platform:modules/eligibility/tests/integration/services/registry/register-eligibility-registration.integration.spec.js#folds a renamed type into its successor rather than withdrawing it, so the old key keeps resolving
20 Promote private product work without detaching itinteractionapiproposed
Proves
BR-CAP-PFM-ELG-001-11 BR-CAP-PFM-ELG-007-14
Preconditions
A product has a private rule and an active use.
Steps
Share the rule with publication authority and inspect the shared library and the product connection.
Expected
The rule appears in the shared library and the product retains the same connection.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/eligibility/tests/e2e/eligibility-definitions.e2e.spec.js#refuses a writer without the publish permission the promotion of a private definition, 403; react-console:components/eligibility/embeds/eligibility-card.tsx:EligibilityCard

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.