Skip to content

ATS-ACC-BKS-014Prepare Accounting document and export templates: Capability Test Specification

Markdown

ATS-ACC-BKS-014

Prepare Accounting document and export templates: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaAccountingModuleBooks, Business Units and Chart of AccountsRevision2

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure gap: FND-ACC-BKS-075
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

12 scenarios proving CAP-ACC-BKS-014; 8 bound to an existing test.

01 Preserve template kindinvariantapinegativetest
Proves
BR-CAP-ACC-BKS-014-01 INV-DOM-ACC-BKS-004-01
Preconditions
An invoice template exists.
Steps
Replace its kind and create an unknown kind.
Expected
Both invalid-kind attempts fail.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers 409 to a change of kind, which is write-once
02 Refuse invalid source textvalidationapinegativetest
Proves
BR-CAP-ACC-BKS-014-02 INV-DOM-ACC-BKS-004-02
Preconditions
No saved template is required.
Steps
Submit Handlebars, malformed Liquid and unknown fields or filters.
Expected
Validation identifies field and position and saves no invalid template.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers 400 with the renderer’s sentence for Handlebars pasted into the body
03 Validate e-mail and download partsvalidationapinegativetest
Proves
BR-CAP-ACC-BKS-014-03 INV-DOM-ACC-BKS-004-03
Preconditions
No saved template is required.
Steps
Submit missing statement e-mail, incomplete e-mail, download e-mail, missing download format and an invalid reply-to.
Expected
Every incompatible template is refused.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/integration/db/document-templates.table.integration.spec.js#refuses a statement without its e-mail (Rhythm 1.0’s V6)
04 Choose statement recipients consistentlyruleapitest
Proves
BR-CAP-ACC-BKS-014-04
Preconditions
Recipient roles are available.
Steps
Save default recipients, role recipients and all-contacts mode carrying roles.
Expected
Default and role selections persist; conflicting all-contact roles are refused.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#sends a statement to all contacts when send_to is not stated
05 Copy protected built-ins safelytransitionapinegativetest
Proves
BR-CAP-ACC-BKS-014-05 BR-CAP-ACC-BKS-014-06 INV-DOM-ACC-BKS-004-04
Preconditions
Built-in content is available.
Steps
Replace, delete and duplicate the invoice built-in and reuse its identity for a customer template.
Expected
Mutations and identity reuse fail; duplication creates an active complete copy.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers 409 to a replacement of a built-in
06 Preview draft output without savingedgeapitest
Proves
BR-CAP-ACC-BKS-014-07
Preconditions
Unsaved invoice and download sources include a bad variable.
Steps
Preview both kinds.
Expected
Sample rendering uses suitable escaping, identifies empty values and problems and preserves unaffected output.
Data
The setup needs no extra fixture records.
Bound to
Source
services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#renders an invoice body and its e-mail with the sample invoice, escaping it as HTML
07 Prepare a chapter’s invoice contentinteractionbrowsertest
Proves
AS-JNY-ACC-BKS-004-01 AS-JNY-ACC-BKS-004-02
Preconditions
The chapter has a business unit.
Steps
Copy and edit its invoice template through the journey.
Expected
Invalid content cannot save; corrected content is available for the unit’s selection.
Data
The setup needs no extra fixture records.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/configuration/ACT-ACC-0026.spec.ts#ACT-ACC-0026
08 Exercise the grants for prepare accounting document and export templatespermissionapinegativeproposed
Proves
BR-CAP-ACC-BKS-016-01
Preconditions
An application-authorized reader and administrator share the run-owned setup. A third principal lacks the relevant resource grant.
Steps
Read the relevant configuration as the reader, attempt each supported mutation, then repeat with the matching administrator grants. Repeat the reads without their resource grants.
Expected
The permission outcomes match the cited authorization rule, and refused mutations leave every configured value unchanged.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
services-accounting:modules/books/tests/e2e/configuration-security.e2e.spec.js#is refused the create 403 permission_missing
09 Reactivate and remove unused customer contenttransitionapiproposed
Proves
BR-CAP-ACC-BKS-014-01 BR-CAP-ACC-BKS-014-06 BR-CAP-ACC-BKS-015-05 INV-DOM-ACC-BKS-004-05
Preconditions
An administrator has valid unassigned content and two unused customer identities.
Steps
Create inactive content, reactivate it and deactivate it again. Create an active copy and remove it while unused. Remove the inactive original and read both identities.
Expected
The lifecycle accepts each eligible transition and neither removed identity reads back as stored content.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
specs/accounting/books/design/state-models/STATE-ACC-BKS-003-document-template-lifecycle.md:transitions
10 Statement role-count endpointsboundaryapinegativeproposed
Proves
BR-CAP-ACC-BKS-014-04
Preconditions
An isolated workspace has records needed for both eligible and ineligible examples.
Steps
Save a role-recipient statement with one and fifty roles, then zero and fifty-one roles.
Expected
Eligible role collections persist and out-of-range collections leave the saved content unchanged.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#sends a statement to all contacts when send_to is not stated
11 Refuse the second replacement of a shared read versionconcurrencyapinegativeproposed
Proves
BR-CAP-ACC-BKS-016-05
Preconditions
Two administrators read the same version of the relevant mutable record. Each prepares a different otherwise valid replacement.
Steps
Release both replacement requests from a barrier. Read the record again and retry the losing payload at its original version.
Expected
One replacement commits, the other is stale, and repeating the stale request preserves the winning values.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Source
services-accounting:modules/books/tests/e2e/payment-terms.e2e.spec.js#answers 400 naming is_active to a replacement that leaves it out
12 Prepared content stays protected while selectedinteractionbrowsertest
Proves
BR-CAP-ACC-BKS-014-06 BR-CAP-ACC-BKS-015-05
Preconditions
Run-owned records satisfy the preconditions of the referenced capability proofs.
Steps
Copy and edit an invoice template, assign it to a unit, try deleting and deactivating it, clear the choice and delete it.
Expected
Selected content survives both refusals and becomes removable after release.
Data
Run-owned records for the stated setup; retain the initial values for comparison.
Bound to
Source
services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#copies a built-in into a new, active tenant template with the built-in’s content,services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers 409 to deleting the business unit’s template, naming the unit

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.