Test Scenarios
26 scenarios proving CAP-ACC-BAT-013; 11 bound to an existing test.
01 Submission validates access and existencepermissionapinegativetest
- Proves
BR-CAP-ACC-BAT-013-01 BR-CAP-ACC-BAT-013-02 - Preconditions
- A reader lacks posting access and staff can post.
- Steps
- Submit as the reader, then submit an empty selection and a selection including an unknown reference as staff.
- Expected
- Permission and empty-selection failures return 403 and 400; an unknown reference prevents job creation.
- Data
- Provide security fixtures.
- Bound to
- Source
- services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses a posting without the posting permission, 403
03 Repeated requests reuse a submissioninvariantapitest
- Proves
BR-CAP-ACC-BAT-013-04 INV-DOM-ACC-BAT-003-02 - Preconditions
- The batch is eligible for posting.
- Steps
- Repeat keyed and differently keyed requests while running and after completion, then unpost and post again.
- Expected
- Equivalent posting requests return the first job; unposting and the next posting create two additional jobs.
- Data
- Provide no fixtures beyond the stated setup.
- Bound to
- Source
- services-accounting:modules/batches/tests/integration/services/jobs/submission-identity.integration.spec.js#answers a colleague's retry under another key, after the posting finished, with the job that posted (DEF-ACT-0514)
04 Action eligibility differs from engine eligibilityedgeunitnegativeproposed
- Proves
BR-CAP-ACC-BAT-013-05 - Preconditions
- Batches represent Open, Closed, Error, Archived, Posted and Posting.
- Steps
- Request posting through the action and engine, including successful and failed Error retries.
- Expected
- Each entry point enforces its own status set, and retry replaces the previous error details.
- Data
- Provide no fixtures beyond the stated setup.
- Source
- FND-ACC-BAT-027
08 Failure follows dependencies without blocking unrelated batchesfailurebrowsernegativetest
- Proves
BR-CAP-ACC-BAT-013-10 - Preconditions
- January can post; April refers to an unposted credit and May depends on April.
- Steps
- Post all three in one request.
- Expected
- January posts; April reports its application problem and May its dependency; neither failed batch writes ledger records.
- Data
- Provide rebuilt documents fixtures.
- Bound to
- Source
- services-accounting:modules/batches/tests/integration/services/posting/rebuilt-posting-edges.integration.spec.js#posts January, puts April in error naming the application whose credit's batch is not posted, and May in error as April's dependent
11 Concurrent requests serialize postingconcurrencyapinegativetest
- Proves
BR-CAP-ACC-BAT-013-13 INV-DOM-ACC-BAT-003-01 - Preconditions
- A postable batch is held by a second database transaction that changes its status to Posted.
- Steps
- Start direct posting, observe it waiting on the row lock, commit the competing status change and inspect the outcome.
- Expected
- Posting waits and then refuses the Posted batch without writing a posting or entry.
- Data
- Provide two browser sessions.
- Bound to
- Source
- services-accounting:modules/batches/tests/integration/services/posting/concurrent-posting.integration.spec.js#makes a direct posting wait for the batch, then refuse it as posted, with no posting and no entry written
13 Job actions differ from workflow retriesruleunitproposed
- Proves
BR-CAP-ACC-BAT-013-16 - Preconditions
- Posting and unposting job kinds are registered.
- Steps
- Inspect user controls and task retry configuration.
- Expected
- User retry and cancellation are disabled while workflow task retries remain configured.
- Data
- Provide fixtures appropriate to the stated accounting context.
- Source
- services-accounting:modules/batches/services/jobs/batch-posting-jobs.ts:ensureBatchPostingJobTypesRegistered