Skip to content

ATS-PFM-ELG-013Assign accountability for an area of work: Capability Test Specification

Markdown

ATS-PFM-ELG-013

Assign accountability for an area of work: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleEligibility, Responsibilities and AttentionRevision3

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

17 scenarios proving CAP-PFM-ELG-013; 14 bound to an existing test.

01 Keep accountability outside access checksinvariantunittest
Proves
BR-CAP-PFM-ELG-013-01 INV-DOM-PFM-ELG-004-01
Preconditions
Authorization source and package files are available.
Steps
Scan imports, table references and deliberately planted violations.
Expected
No responsibility dependency exists, and planted imports, reads or calls fail the guard.
Data
No fixtures beyond the described setup.
Bound to
services-platform:tests/unit/responsibilities-not-in-authorization.spec.ts#imports nothing of the responsibilities module into the authorizer or the grant slice, and names none of its tables
services-platform:tests/unit/responsibilities-not-in-authorization.spec.ts#keeps the shared evaluator free of the module and its tables
services-platform:tests/unit/responsibilities-not-in-authorization.spec.ts#refuses a statement that reads a responsibility table
Source
services-platform:tests/unit/responsibilities-not-in-authorization.spec.ts#imports nothing of the responsibilities module into the authorizer or the grant slice, and names none of its tables
02 Filter the area catalogueruleapitest
Proves
BR-CAP-PFM-ELG-013-02
Preconditions
A workspace lacks one application licence.
Steps
Read responsibility definitions.
Expected
Platform areas remain and unlicensed areas are absent, with readable scope labels.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#lists Platform’s definitions, which every tenant may use
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#leaves out the definitions of an application the tenant may not use
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#lists Platform’s definitions, which every tenant may use
03 Require a manager for assignmentspermissionapinegativetest
Proves
BR-CAP-PFM-ELG-013-03
Preconditions
Reader-only and management callers exist.
Steps
Create, end and remove holdings as both.
Expected
The reader fails and the manager succeeds.
Data
No fixtures beyond the described setup.
Bound to
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses a caller with read alone, 403
04 Validate holder and scopevalidationapinegativetest
Proves
BR-CAP-PFM-ELG-013-04 INV-DOM-PFM-ELG-004-03
Preconditions
An area supports business-unit scope.
Steps
Try teams, duplicate subject fields, committee scope, a foreign user and a retired area.
Expected
Every invalid request names its field and persists nothing.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses a scope kind the definition is not held at with 400, naming resource_type
services-platform:modules/responsibilities/tests/integration/db/responsibility-assignments.table.integration.spec.js#refuses, by the wall, a resource scope of a kind the definition is not held at
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses a team with 400, naming team_id
05 Reject identical active holding duplicatesinvariantapinegativetest
Proves
BR-CAP-PFM-ELG-013-05 INV-DOM-PFM-ELG-004-02
Preconditions
Pat already holds unit batch posting.
Steps
Repeat the same holding as a backup with identical validity endpoints, vary its scope, end and recreate it, then race two identical creates.
Expected
The identical duplicate is refused, another scope remains valid, ending permits recreation and the identical-create race leaves one holding.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses a second identical active assignment, 409 already_assigned
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#refuses the second of two simultaneous creates without a key, and writes one row
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses a second identical active assignment, 409 already_assigned
06 Replay assignment requestsedgeapitest
Proves
BR-CAP-PFM-ELG-013-06 INV-DOM-PFM-ELG-004-04
Preconditions
An idempotency key identifies a creation.
Steps
Repeat its body, replay after ending and reuse it with a different body.
Expected
Replays return the original without writes and changed bodies fail; the key is absent from responses.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#answers a replay of the same Idempotency-Key and body with the first assignment, same id
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses the same Idempotency-Key with another body, 422 idempotency_key_reused
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#answers the same assignment, as it now stands, to a replay after it has ended, creating nothing
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#answers a replay of the same Idempotency-Key and body with the first assignment, same id
07 Delay future holdingsboundaryunitnegativetest
Proves
BR-CAP-PFM-ELG-013-07
Preconditions
A holding starts next week.
Steps
Inspect current holders and try an inverted period.
Expected
It contributes no present holding and the invalid end is identified.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/unit/rules.spec.js#refuses an end that is not after the start, naming valid_until
Source
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#allows a future-dated assignment, read by nothing until it starts
08 End direct holdings with covertransitionapinegativetest
Proves
BR-CAP-PFM-ELG-013-08 INV-DOM-PFM-ELG-004-06
Preconditions
Direct, derived and default assignments exist, with cover on the direct holding.
Steps
End each and retry the direct end with an obsolete version.
Expected
Direct cover ends atomically, stale input fails and derived/default endings report their distinct refusals.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses to end a derived assignment, 409 derived_assignment
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#refuses to end a role default, 409 role_default_assignment
Source
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#ends the assignment’s open delegations in the same transaction
09 Respect removed defaultstransitionapitest
Proves
BR-CAP-PFM-ELG-013-09 INV-DOM-PFM-ELG-004-05
Preconditions
An area has a role-default holding.
Steps
Remove it, reconcile and register again.
Expected
The removed history remains and no replacement default is created.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/integration/services/reconcile/reconcile-after-registration.integration.spec.js#does not give a tenant back a default it removed when the application registers again
Source
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#removes a role default, which stays as history with status removed
10 Explain personal holding originsruleapitest
Proves
BR-CAP-PFM-ELG-013-11
Preconditions
One user has direct, role and delegated holdings.
Steps
Read My Responsibilities.
Expected
Origins, role names and incoming/outgoing cover are presented.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#answers the caller’s own effective rows with via, and the delegations to and from them
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.queries.integration.spec.js#answers a user’s effective rows with via, their delegation from a colleague included
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#answers the caller’s own effective rows with via, and the delegations to and from them
11 Resolve scope and fallbackruleapitest
Proves
BR-CAP-PFM-ELG-013-12
Preconditions
A unit primary, broader holding, backup, delegate and fallback exist.
Steps
Resolve held and unheld scopes with normal and always coverage.
Expected
Specific primaries lead, wider coverage follows policy, delegates identify cover and fallback supplies unheld areas.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#answers the holders at a scope chain, the unit’s primary first
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.queries.integration.spec.js#leaves the tenant-wide holder out when the unit has its own primary and coverage is when_u
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.queries.integration.spec.js#answers the fallback’s holders, every one covering, when nobody holds the key at any sco
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities.e2e.spec.js#answers the holders at a scope chain, the unit’s primary first
12 Notify affected people selectivelyruleapitest
Proves
BR-CAP-PFM-ELG-013-13
Preconditions
A manager can assign a colleague or self.
Steps
Assign both and a default, then end the colleague before its notice is read.
Expected
The colleague receives creation and ending notices and the unread first notice is withdrawn; self-action and defaults create none.
Data
No fixtures beyond the described setup.
Bound to
services-platform:modules/responsibilities/tests/e2e/responsibilities-notifications.e2e.spec.js#puts the assignment in the person’s inbox and nothing in the administrator’s, who made it
services-platform:modules/responsibilities/tests/integration/services/notices/responsibility-notices.integration.spec.js#publishes nothing when the administrator assigns it to themself: they hear nothing for their own acts
services-platform:modules/responsibilities/tests/integration/services/notices/responsibility-notices.integration.spec.js#withdraws the assigned notice by its supersede key and tells the person it ended
Source
services-platform:modules/responsibilities/tests/e2e/responsibilities-notifications.e2e.spec.js#puts the assignment in the person’s inbox and nothing in the administrator’s, who made it
13 End a holding with its coverinteractionapiproposed
Proves
BR-CAP-PFM-ELG-013-08 BR-CAP-PFM-ELG-014-06
Preconditions
A direct holding has active cover and an authorized manager has its current version.
Steps
End the holding and read both the cover arrangement and effective holdings.
Expected
Both ending changes commit together and neither person remains effective through the ended holding.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#ends the assignment’s open delegations in the same transaction; react-console:acceptance/platform-attention/playwright/journeys/responsibilities/RA-ACC-0002.spec.ts#RA-ACC-0002
14 Repair a reported gap by assignmentinteractionapiproposed
Proves
BR-CAP-PFM-ELG-013-08 BR-CAP-PFM-ELG-015-05
Preconditions
An always-held area has no primary holding.
Steps
Read uncovered areas, create a valid primary holding, then end it and read again.
Expected
The area leaves the report when assigned and returns after ending, with each gap change committed with the holding.
Data
Run-owned records and a controlled clock where timing changes the result.
Source
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#ends the assignment’s open delegations in the same transaction; services-platform:modules/responsibilities/tests/integration/services/persistence/unassigned-responsibilities.integration.spec.js#opens the row at once when the only assignment of an area is ended
15 Remove one holder without rewriting the conditioninteractionapitest
Proves
BR-CAP-PFM-ELG-013-12 BR-CAP-PFM-ELG-017-03
Preconditions
Two people hold the same attention area and an occurrence addresses that area.
Steps
Read both lists, end one holding and read both lists and the occurrence again.
Expected
Only the ended holder loses visibility and the occurrence remains open for the other person.
Data
Run-owned records and a controlled clock where timing changes the result.
Bound to
Source
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.queries.integration.spec.js#answers the fallback’s holders, every one covering, when nobody holds the key at any sco; services-platform:modules/attention/tests/integration/services/read/ending-assignment.integration.spec.js#removes Pat’s item on the next read, without touching the item, and leaves the second holder’s
16 Replay competing creates under one keyconcurrencyapinegativetest
Proves
BR-CAP-PFM-ELG-013-06 INV-DOM-PFM-ELG-004-04
Preconditions
Two concurrent requests use identical assignment input and the same idempotency key.
Steps
Submit both creates and inspect their returned identities and stored holdings.
Expected
Both requests return one holding identity and the fixture stores one row.
Data
Run-owned fixtures, separate caller contexts and a controlled clock where required.
Bound to
Source
services-platform:modules/responsibilities/tests/integration/services/persistence/assignments.integration.spec.js#answers one assignment to two simultaneous creates under one key
17 Expose unequal overlapping periods as a contract discrepancyedgeapinegativeproposed
Proves
INV-DOM-PFM-ELG-004-02 BR-CAP-PFM-ELG-013-05
Preconditions
One active direct holding covers a bounded period.
Steps
Create another holding for the same person, area and scope with different endpoints inside that period.
Expected
The current database permits two rows, exposing the unresolved discrepancy with the broader planned overlap guard.
Data
Run-owned fixtures, separate caller contexts and a controlled clock where required.
Source
services-platform:modules/responsibilities/db/responsibility-assignments.table.ts:responsibility_assignments_live_holder_uidx

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.