Skip to content

ATS-PFM-DJE-002Review a change before approving its application: Capability Test Specification

Markdown

ATS-PFM-DJE-002

Review a change before approving its application: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleData Job EngineRevision2

Read atmacroservice-libraries 54536a44services-crm a8d1364fservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

9 scenarios proving CAP-PFM-DJE-002; 4 bound to an existing test.

01 Validation leaves records intacttransitionapitest
Proves
BR-CAP-PFM-DJE-002-01
Preconditions
Prepare a title update for two contacts.
Steps
[ { "do": "Validate the request and inspect its job detail.", "expect": "The job waits in validated state and exposes planned impact and outcomes; target records are unchanged.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#changes nothing while it is validating" } ]
Expected
The job waits in validated state and exposes planned impact and outcomes; target records are unchanged.
Data
No additional fixture is needed.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#changes nothing while it is validating
02 Approval must identify the saved impactvalidationapinegativetest
Proves
BR-CAP-PFM-DJE-002-02
Preconditions
Prepare validated contact and configuration jobs.
Steps
[ { "do": "Attempt approval without a fingerprint, with a different one, and with the saved one.", "expect": "Invalid fingerprints are refused while the jobs remain validated; a matching approval queues work.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update that echoes no impact digest" } ]
Expected
Invalid fingerprints are refused while the jobs remain validated; a matching approval queues work.
Data
No additional fixture is needed.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update that echoes no impact digest
03 Acting on an old preview expires itboundaryapinegativeproposed
Proves
BR-CAP-PFM-DJE-002-03
Preconditions
Prepare a job whose validation finished 25 hours earlier.
Steps
[ { "do": "Read the job and then attempt approval.", "expect": "The read still shows validated; approval expires the job and is refused.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/job-control.ts:applyValidatedJob" } ]
Expected
The read still shows validated; approval expires the job and is refused.
Data
A clock that the fixture can control.
Source
macroservice-libraries:packages/data-jobs/src/job-control.ts:applyValidatedJob
04 An unvalidated job refuses approvalvalidationapinegativetest
Proves
BR-CAP-PFM-DJE-002-04
Preconditions
Submit an organization job directly for application.
Steps
[ { "do": "Invoke its apply action.", "expect": "The response is 409.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/e2e/organization-update.e2e.spec.js#refuses the apply of a job that was never validated with 409, because an apply is the approval of a validation" } ]
Expected
The response is 409.
Data
No additional fixture is needed.
Bound to
Source
services-crm:modules/data-jobs/tests/e2e/organization-update.e2e.spec.js#refuses the apply of a job that was never validated with 409, because an apply is the approval of a validation
05 Impact aggregation retains all batch contributionsruleunittest
Proves
BR-CAP-PFM-DJE-002-05
Preconditions
Prepare several batch impact reports.
Steps
[ { "do": "Combine those reports.", "expect": "Change counts, affected-collection counts and blocked-reason counts are added.", "provenance": "test", "source": "macroservice-libraries:packages/data-jobs/src/define-data-operation.spec.ts#adds the counts, which is what makes a digest speak for every batch and not the last one" } ]
Expected
Change counts, affected-collection counts and blocked-reason counts are added.
Data
No additional fixture is needed.
Bound to
Source
macroservice-libraries:packages/data-jobs/src/define-data-operation.spec.ts#adds the counts, which is what makes a digest speak for every batch and not the last one
06 Saved submission reaches approval unchangedinteractionapiproposed
Proves
BR-CAP-PFM-DJE-001-04 BR-CAP-PFM-DJE-002-01 BR-CAP-PFM-DJE-002-02
Preconditions
Create two contacts with distinct starting values.
Steps
[ { "do": "Submit a common change for validation, alter the caller's local request, and approve the saved preview.", "expect": "The contacts receive the saved change; the altered local request supplies no replacement input.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#freezes the patch on every item, so a later apply writes what was submitted and not what is asked for then; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#changes nothing while it is validating; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered" } ]
Expected
The contacts receive the saved change; the altered local request supplies no replacement input.
Data
Create two contacts with distinct starting values.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#freezes the patch on every item, so a later apply writes what was submitted and not what is asked for then; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#changes nothing while it is validating; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered
07 A later edit changes the approved job's resultinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-002-01 BR-CAP-PFM-DJE-002-02 BR-CAP-PFM-DJE-006-01
Preconditions
Prepare two contacts and a validated title change.
Steps
[ { "do": "Edit one contact after preview and approve the original fingerprint.", "expect": "The edited contact remains intact with a conflict while the other receives the saved title.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#changes nothing while it is validating; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-update-versions.integration.spec.js#skips the contact that changed after the validation as a named conflict; services-crm:modules/data-jobs/services/operations/contact-update.ts:prevalidate" } ]
Expected
The edited contact remains intact with a conflict while the other receives the saved title.
Data
Prepare two contacts and a validated title change.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#changes nothing while it is validating; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-update-versions.integration.spec.js#skips the contact that changed after the validation as a named conflict; services-crm:modules/data-jobs/services/operations/contact-update.ts:prevalidate
08 A stale deletion approval removes nothinginteractionapiproposed
Proves
BR-CAP-PFM-DJE-002-02 BR-CAP-PFM-DJE-007-01 BR-CAP-PFM-DJE-007-03
Preconditions
Prepare a deletion preview with eligible and blocked contacts.
Steps
[ { "do": "Attempt approval with another fingerprint or count phrase, inspect the records, then send the returned approval values.", "expect": "Refused approvals preserve every record; the matching approval removes only eligible contacts.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-delete.integration.spec.js#refuses a delete submitted to be applied, because a delete is validated first; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-delete.integration.spec.js#refuses an apply whose confirmation names another number of contacts" } ]
Expected
Refused approvals preserve every record; the matching approval removes only eligible contacts.
Data
Prepare a deletion preview with eligible and blocked contacts.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-delete.integration.spec.js#refuses a delete submitted to be applied, because a delete is validated first; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-delete.integration.spec.js#refuses an apply whose confirmation names another number of contacts
09 Dialog approval is tied to its saved previewinteractionapiproposed
Proves
BR-CAP-PFM-DJE-002-02 BR-CAP-PFM-DJE-009-07 BR-CAP-PFM-DJE-009-10
Preconditions
Open a contact deletion dialog with an eligible selection.
Steps
[ { "do": "Enter incorrect approval text, verify no apply request, then approve the returned phrase and repeat the click.", "expect": "Incorrect text sends no approval and the accepted click applies one saved preview.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered; react-console:acceptance/data-jobs/playwright/journeys/dialogs/DJE-ACC-0112.spec.ts#DJE-ACC-0112; react-console:acceptance/data-jobs/playwright/journeys/dialogs/DJE-ACC-0105.spec.ts#DJE-ACC-0105" } ]
Expected
Incorrect text sends no approval and the accepted click applies one saved preview.
Data
Open a contact deletion dialog with an eligible selection.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses an apply of the validated update whose digest is not the one the validation answered; react-console:acceptance/data-jobs/playwright/journeys/dialogs/DJE-ACC-0112.spec.ts#DJE-ACC-0112; react-console:acceptance/data-jobs/playwright/journeys/dialogs/DJE-ACC-0105.spec.ts#DJE-ACC-0105

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.