Skip to content

ATS-ACC-PRD-018Maintain the tax default for a product kind: Capability Test Specification

Markdown

ATS-ACC-PRD-018

Maintain the tax default for a product kind: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-ACC-PRD-018

Design

Executed by
TST-ACC-PRD-029, TST-ACC-PRD-042

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

9 scenarios proving CAP-ACC-PRD-018; 7 bound to an existing test.

01 Tax resolution honors assignment priorityinteractionapitest
Proves
BR-CAP-ACC-PRD-018-01 INV-DOM-ACC-PRD-004-11
Preconditions
Packages differ in setup classes and a kind default can be configured.
Steps
Read packages before and after assigning the default.
Expected
Own assignments win, defaults fill missing assignments and absent choices return no class.
Data
Packages differ in setup classes and a kind default can be configured.
Bound to
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#lets the product’s own accounting setup class win over the type default
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#sets a default for membership packages, after which a package without a setup class is taxed under it
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#sets a type’s default, answers it on every product of the type without a setup class, and keeps the setup’s class where there is one
Source
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#lets the product’s own accounting setup class win over the type default
02 Defaults reject unavailable new assignmentsvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-018-02 BR-CAP-ACC-PRD-018-03
Preconditions
Tax fixtures include inactive and later-retired classes.
Steps
Try missing kinds, missing classes and new inactive choices, then resave a held retired class.
Expected
Invalid new choices fail and the retained class remains.
Data
Tax fixtures include inactive and later-retired classes.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses an unknown type, an unknown class and an inactive class newly chosen, and keeps an inactive class once held
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#refuses an unknown type and an unknown class, 400 with their sentences
Source
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses an unknown type, an unknown class and an inactive class newly chosen, and keeps an inactive class once held
03 Tax defaults use their own versionsconcurrencyapinegativetest
Proves
BR-CAP-ACC-PRD-018-04
Preconditions
The kind initially has no default.
Steps
Create one, replace at its read version and try obsolete or omitted replacement versions.
Expected
Creation and current replacement succeed while invalid versions fail.
Data
The kind initially has no default.
Bound to
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#replaces the default at the version read, lists it, and refuses a stale version 409
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#replaces a default at the version read, and refuses a stale one or one without its version
Source
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#replaces the default at the version read, lists it, and refuses a stale version 409
04 Default removal changes fallback resolutiontransitionapinegativetest
Proves
BR-CAP-ACC-PRD-018-05
Preconditions
Packages use a kind default without own assignments.
Steps
Remove the default and repeat removal.
Expected
Those packages resolve no class and repeat removal returns not found.
Data
Packages use a kind default without own assignments.
Bound to
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#removes the default, 200 then 404, after which a package without a setup class is taxed under none
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#removes a default, after which its products fall back to none; a second delete is 404
Source
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#removes the default, 200 then 404, after which a package without a setup class is taxed under none
05 Default references protect tax classesinvariantapinegativetest
Proves
BR-CAP-ACC-PRD-018-06
Preconditions
Only a kind default refers to a class.
Steps
Delete the class, remove the default and try class deletion again.
Expected
The first deletion fails and the final deletion succeeds.
Data
Only a kind default refers to a class.
Bound to
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#refuses deleting a tax class only a default names, 409 with the sentence, and allows it once the default is gone
Source
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#refuses deleting a tax class only a default names, 409 with the sentence, and allows it once the default is gone
06 Combined locks protect tax defaultspermissionunitnegativetest
Proves
BR-CAP-ACC-PRD-018-07
Preconditions
A default has an update-and-delete lock.
Steps
Attempt replacement and removal.
Expected
Both operations fail.
Data
A default has an update-and-delete lock.
Bound to
Source
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses replacing or deleting a locked default
07 Product authority does not grant tax authoritypermissionapinegativetest
Proves
BR-CAP-ACC-PRD-018-08
Preconditions
A product manager has no tax-class permissions.
Steps
Request a default read and replacement.
Expected
Both requests are denied.
Data
A product manager has no tax-class permissions.
Bound to
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#refuses a caller with product rights alone (tax configuration needs the tax-classes keys)
Source
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#refuses a caller with product rights alone (tax configuration needs the tax-classes keys)
08 Deletion-only default protection permits replacementedgeapinegativeproposed
Proves
BR-CAP-ACC-PRD-018-07
Preconditions
A kind default has deletion-only protection and a current version.
Steps
Replace its class at that version, then request removal.
Expected
The class replacement succeeds; deletion remains refused.
Data
A kind default has deletion-only protection and a current version.
Source
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses replacing or deleting a locked default
09 Default changes alter product resolution without changing product versionsinteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-018-01 BR-CAP-ACC-PRD-018-05 BR-CAP-ACC-PRD-003-03
Preconditions
Two products of the same kind differ in whether their setup names a class.
Steps
Change the kind default, read both products, remove the default and repeat the reads.
Expected
Only fallback resolution changes; explicit setup classification and product versions remain unchanged.
Data
Two products of the same kind differ in whether their setup names a class.
Source
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#lets the product’s own accounting setup class win over the type default; services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#removes the default, 200 then 404, after which a package without a setup class is taxed under none; services-accounting:modules/products/tests/integration/services/persistence/products.queries.integration.spec.js#maps a product whole: every column, its prices, its components and its accounting summary

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.