Skip to content

ATS-COM-CAT-004Calculate tax from buyer geography: Capability Test Specification

Markdown

ATS-COM-CAT-004

Calculate tax from buyer geography: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-COM-CAT-058
  • Validation covered
  • Permission covered
  • Edge gap: FND-COM-CAT-058
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-COM-CAT-058
  • Invariant covered
  • Interaction covered

Test Scenarios

8 scenarios proving CAP-COM-CAT-004; 6 bound to an existing test.

01 Tax-zone validation reports invalid configurationvalidationapinegativetest
Proves
BR-CAP-COM-CAT-004-01 BR-CAP-COM-CAT-004-02
Preconditions
A tax-zone request can be submitted
Steps
Use an unassigned country, excessive rate, missing rate name and reversed rate interval
Expected
Validation identifies each issue without saving the zone
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/e2e/tax-zones.e2e.spec.js#answers 400 to a country code that is not two upper-case letters, naming the field
02 Tax-prefix clearing requires explicit nullvalidationunitnegativetest
Proves
BR-CAP-COM-CAT-004-03
Preconditions
A saved zone carries H2X
Steps
Replace its prefix with spaces and then null
Expected
Spaces fail validation; null removes the prefix
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/unit/api/blank-tax-zone-values.spec.js#refuses a whitespace-only postal_code_prefix on a replacement 400 naming the field, instead of clearing H2X
03 Tax applicability follows product-type selectionboundaryunittest
Proves
BR-CAP-COM-CAT-004-04
Preconditions
Rates include unrestricted and selected-type configurations
Steps
Calculate tax for several product types and submit a list of 101 types
Expected
Only matching rates contribute, and the oversized list fails
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/unit/tax/zone-tax-calculation.spec.js#applies to every product type when it names none, and to the named ones alone otherwise
04 Specificity selects the rate components to roundruleunittest
Proves
BR-CAP-COM-CAT-004-05 BR-CAP-COM-CAT-004-06
Preconditions
Country, region and prefix zones match the address
Steps
Calculate tax for an address matching the prefix zone
Expected
That zone supplies individually rounded components whose sum is the line tax
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/unit/tax/zone-tax-calculation.spec.js#scores a prefix over a region over a country alone
05 Address requirements differ between checkout and displayfailureunitnegativetest
Proves
BR-CAP-COM-CAT-004-07
Preconditions
A zone can tax every product type
Steps
Request checkout and display calculations without an address
Expected
Checkout refuses the taxable line; display returns zero tax with a warning
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/unit/tax/zone-table-tax.spec.js#refuses a line a zone’s rate for every product type could tax, naming the line and its product
06 Tax reads do not grant tax writespermissionapinegativetest
Proves
BR-CAP-COM-CAT-004-10
Preconditions
The caller is a read-only tax user
Steps
Inspect and attempt to change zones
Expected
Inspection succeeds and changes fail permission checks
Data
Read-exclusively persona
Bound to
Source
services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#lists and reads the tax zones
07 The tax address changes the quoted line taxinteractionapiproposed
Proves
BR-CAP-COM-CAT-004-05 BR-CAP-COM-CAT-004-06 BR-CAP-COM-CAT-004-07 BR-CAP-COM-CAT-013-01
Preconditions
A product is taxable and country, region and postal zones have different rates.
Steps
Quote with each address and without an address in display and checkout modes.
Expected
The selected zone changes the line components; address-free display warns and taxable checkout refuses.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/tests/unit/tax/zone-tax-calculation.spec.js#scores a prefix over a region over a country alone,services-commerce:modules/pricing/tests/unit/tax/zone-tax-calculation.spec.js#sums every applicable rate per line, each rounded on its own, and names each component,services-commerce:modules/pricing/tests/unit/tax/zone-table-tax.spec.js#refuses a line a zone’s rate for every product type could tax, naming the line and its product,services-commerce:modules/pricing/tests/unit/engine/engine.spec.js#prices the hoodies through the member cell, the variant, the bulk rule and the store’s line discount, in that order
08 Tax-zone removal leaves no retained rate rowsinvariantapinegativeproposed
Proves
INV-DOM-COM-CAT-001-10 BR-CAP-COM-CAT-004-09
Preconditions
A zone has two valid integer-basis-point rates.
Steps
Read its rates, remove the zone, request it again and inspect the rate rows; separately attempt a fractional or excessive rate.
Expected
The removed zone is not found, its rates are gone and invalid rate inserts refuse.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/configuration/tests/e2e/tax-zones.e2e.spec.js#deletes a zone with its rates, after which it reads 404; deleting it again is 404,rhythm-v2-docs:specs/commerce/catalog/design/objects/DOM-COM-CAT-001-checkout-policy.md#DOM-COM-CAT-001

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.