Skip to content

ATS-COM-CAT-013Calculate and explain a buyer’s item price: Capability Test Specification

Markdown

ATS-COM-CAT-013

Calculate and explain a buyer’s item price: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

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

Test Scenarios

20 scenarios proving CAP-COM-CAT-013; 13 bound to an existing test.

01 Engine calculation preserves the configured adjustment orderruleunittest
Proves
BR-CAP-COM-CAT-013-01
Preconditions
An isolated member fixture supplies variant, bulk and store adjustments
Steps
Calculate the cart price
Expected
The adjustment sequence and provenance match the rule
Data
none
Bound to
Source
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
02 Nonfinal eligibility never establishes an audienceruleunittest
Proves
BR-CAP-COM-CAT-013-02
Preconditions
Eligibility fixtures return negative, uncertain, provisional and review verdicts
Steps
Resolve audience qualification
Expected
None qualifies and the corresponding reasons remain available
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/unit/engine/step-2-audience-resolution.spec.js#does not qualify for an ineligible decision, an indeterminate one, a provisional one or one under review, and says why
03 Audience pricing uses supported fallbacksedgeunittest
Proves
BR-CAP-COM-CAT-013-03
Preconditions
Period pricing is absent for Member
Steps
Calculate with and without an Always Member price
Expected
The result uses Always Member when present and Standard otherwise
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#inherits the audience’s always cell when the period has none, never another period’s cell
04 Half-unit rounding moves away from zeroboundaryunittest
Proves
BR-CAP-COM-CAT-013-04 INV-DOM-COM-CAT-004-08
Preconditions
The arithmetic helper accepts signed values
Steps
Round positive and negative exact halves
Expected
Results move away from zero without even-number rounding
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/unit/engine/rounding.spec.js#rounds a positive half up
05 Currency calculation requires an available conversionfailureunitnegativetest
Proves
BR-CAP-COM-CAT-013-05 BR-CAP-COM-CAT-013-06 INV-DOM-COM-CAT-004-11
Preconditions
The product has base USD pricing
Steps
Calculate EUR with a rate, without a rate and under Standard prohibition
Expected
Conversion retains its rate provenance; missing rate and prohibition refuse pricing
Data
Exedit rates
Bound to
Source
services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#converts a calculate cell from the base cell at the rate of the day, rounded half away from zero, and freezes the conversion
06 Public-sale guards distinguish staff order authoritypermissionapinegativetest
Proves
BR-CAP-COM-CAT-013-07 AS-JNY-COM-CAT-003-03
Preconditions
The store contains published, unlisted, draft and excluded products
Steps
Request quotes as visitors, members and staff with or without order-create permission
Expected
Public guards refuse draft and excluded products; authorized staff receive their prices while staff readers do not
Data
Catalog fixtures
Bound to
Source
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#refuses a draft product to an anonymous caller: 400 product_not_published, naming the store
07 Anonymous quote inputs cannot name private contextvalidationapinegativetest
Proves
BR-CAP-COM-CAT-013-08
Preconditions
An active store supports public quotes
Steps
Name a subject, omit the store and select a closed store
Expected
All invalid public requests fail
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#refuses a body that names a subject, an acting contact, a recipient or a cart: nothing about a person is read anonymously
08 Extension failure handling depends on requirement and modefailureapinegativetest
Proves
BR-CAP-COM-CAT-013-09
Preconditions
Required and optional handlers fail
Steps
Attempt placement and quoting through both
Expected
Required placement records an exception and refuses; optional placement and quotes continue with warnings
Data
Fixture handlers
Bound to
Source
services-commerce:modules/pricing/tests/integration/services/extensions/priced-with-extensions.integration.spec.js#refuses with EXTENSION_UNAVAILABLE naming the extension, and records the exception on the order with the SDK’s status (A24)
09 Unsupported store fees prevent preview and placementfailureapinegativeproposed
Proves
BR-CAP-COM-CAT-013-10
Preconditions
The store pricing handler proposes an order fee
Steps
Preview and place that sale
Expected
Both return the unsupported-fee refusal without persisting it
Data
A fee-adding handler
Source
services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D5-F1
10 Hypothetical pricing remains staff-controlledpermissionapinegativetest
Proves
BR-CAP-COM-CAT-013-11 AS-JNY-COM-CAT-002-05
Preconditions
A nonmember and dated student qualification are available
Steps
Preview assumed Member and a future qualification date as staff, then request those overrides as a member
Expected
Staff results identify assumptions and dated qualification; portal override requests fail
Data
Fixture eligibility
Bound to
Source
services-commerce:modules/pricing/tests/e2e/price-quote-staff-form.e2e.spec.js#answers 200 priced at the member cell, the audience marked assumed in the provenance, the response saying what it assumed
11 Portal quotes respect represented partiespermissionapinegativetest
Proves
BR-CAP-COM-CAT-013-12
Preconditions
A member may act for an affiliated organization
Steps
Quote for self, that organization and another contact
Expected
Permitted subjects are priced and the unrelated contact request fails
Data
CRM affiliations
Bound to
Source
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#quotes for themselves, the price for their own contact
12 Price preview does not bind the later calculationinvariantunittest
Proves
BR-CAP-COM-CAT-013-13 INV-DOM-COM-CAT-004-09
Preconditions
A price changes after preview
Steps
Compare the placement calculation with the earlier result
Expected
The comparison reports the change instead of retaining the old price
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/unit/engine/quote-tolerance.spec.js#differs with the changes when a price moved, never answering the previewed price
13 Placement rechecks qualification before period stampingtransitionapinegativetest
Proves
BR-CAP-COM-CAT-013-14 INV-DOM-COM-CAT-004-10
Preconditions
Membership lapses after a line is priced
Steps
Attempt placement
Expected
Each affected line is refused and no first-sale marker is written
Data
Fixture eligibility
Bound to
Source
services-commerce:modules/pricing/tests/integration/services/placement/audience-settlement.integration.spec.js#refuses the placement for a lapsed member, one audience_lapsed problem per line with the portal sentence, stamping nothing
14 Quote validation limits input and accessvalidationapinegativetest
Proves
BR-CAP-COM-CAT-013-15
Preconditions
Quote requests can vary size, quantity and permissions
Steps
Submit fifty-one items, zero quantity and a caller lacking quote access
Expected
Input and permission refusals apply to the respective requests
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#refuses more than fifty items
15 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
16 Removing an audience binding removes qualificationinteractionapiproposed
Proves
BR-CAP-COM-CAT-010-07 BR-CAP-COM-CAT-013-02
Preconditions
An eligibility audience has a selected binding and a price.
Steps
Quote an eligible buyer, remove the binding, then quote again.
Expected
The second quote omits that audience and explains the missing binding.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/tests/unit/engine/step-2-audience-resolution.spec.js#warns of an audience with no binding, and holds nobody for it; a binding the batch did not answer is simply not held,services-commerce:modules/pricing/tests/unit/engine/step-2-audience-resolution.spec.js#does not qualify for an ineligible decision, an indeterminate one, a provisional one or one under review, and says why
17 A moved boundary changes the next quote without rewriting an earlier saleinteractionapiproposed
Proves
BR-CAP-COM-CAT-011-02 BR-CAP-COM-CAT-011-05 BR-CAP-COM-CAT-013-03 BR-CAP-COM-CAT-013-14
Preconditions
Early Bird has a placed sale and Regular starts at its end.
Steps
Read the sale, extend Early Bird with Regular’s start moved together, quote on both sides of the new boundary and reread the sale.
Expected
New quotes select the period at their instant; the earlier amount and first-sale stamp stay unchanged.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/tests/integration/services/persistence/pricing-schedules.queries.integration.spec.js#finds the period containing an instant: the open start, a boundary belonging to the period it starts, the open end,services-commerce:modules/pricing/tests/e2e/pricing-schedules.e2e.spec.js#extends the sold-in Early Bird by a week, Regular starting where it now ends, its first sale untouched,services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#inherits the audience’s always cell when the period has none, never another period’s cell,services-commerce:modules/pricing/tests/integration/services/placement/audience-settlement.integration.spec.js#refuses the placement for a lapsed member, one audience_lapsed problem per line with the portal sentence, stamping nothing
18 Purchasing strategy and handler activity alter the quoteinteractionapiproposed
Proves
BR-CAP-COM-CAT-012-03 BR-CAP-COM-CAT-012-06 BR-CAP-COM-CAT-013-01
Preconditions
Member and Student qualify and a product handler adds a fixed amount.
Steps
Quote under lowest and rank, then disable the handler and repeat.
Expected
The selected audience follows each strategy and the disabled handler contributes no adjustment.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#prices the same buyer at the member price under rank, Member coming before Student members,services-commerce:modules/pricing/tests/e2e/product-extensions.e2e.spec.js#keeps the row and ignores it when it is put inactive: back to $20.00,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
19 Browsing and quoting use the same buyer contextinteractionapiproposed
Proves
BR-CAP-COM-CAT-013-08 BR-CAP-COM-CAT-008-03 BR-CAP-COM-CAT-008-04
Preconditions
Standard and a publicly displayed Member price exist.
Steps
Browse and quote anonymously, then repeat as the member without staff assumptions.
Expected
Public results show public alternatives; signed results use the member’s identity.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#refuses a body that names a subject, an acting contact, a recipient or a cart: nothing about a person is read anonymously,services-commerce:modules/catalog/tests/e2e/storefront.e2e.spec.js#shows the audiences marked for public display beside the Standard price (D10): the Members price 2000, with its audience,services-commerce:modules/catalog/tests/e2e/storefront.e2e.spec.js#prices a portal member as themselves (the recorded member: the member price, nothing signing in could change)
20 Changing audience price changes the winning promotional alternativeinteractionapiproposed
Proves
BR-CAP-COM-CAT-013-01 BR-CAP-COM-CAT-016-02
Preconditions
A noncombining quarter-off code competes with an audience amount.
Steps
Compare at eighty dollars, then at sixty dollars against a hundred-dollar Standard amount.
Expected
The seventy-five-dollar code wins first; the sixty-dollar audience wins second and consumes no code use.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
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,services-commerce:modules/promotions/tests/unit/pricing/alternatives.spec.js#2. combine = no, member: audience pricing $80.00 against $100.00 less 25 % = $75.00; the promotional price wins

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.