Skip to content

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

Markdown

ATS-COM-CAT-013

Calculate and explain a buyer’s item price: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-COM-CAT-013

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

Test Scenarios

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

01 Engine calculation preserves the configured adjustment orderunittest
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
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/pricing/tests/unit/engine/engine.spec.js#answers totals that are the sum of the line totals and the order adjustments
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 audienceunittest
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
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
services-commerce:modules/pricing/tests/unit/engine/step-2-audience-resolution.spec.js#qualifies for every eligibility audience answered eligible, in rank order, each with its decision and binding
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 fallbacksunittest
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
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/unit/engine/step-3-base-price.spec.js#falls back to the standard cell for a member when the member audience has no cell in the currency (the audience fallback)
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 zerounittest
Proves
BR-CAP-COM-CAT-013-04
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
services-commerce:modules/pricing/tests/unit/engine/rounding.spec.js#rounds a negative half down, away from zero, where Math.round would answer -2
services-commerce:modules/pricing/tests/unit/engine/rounding.spec.js#does not round to the even neighbour (no banker’s rounding)
Source
services-commerce:modules/pricing/tests/unit/engine/rounding.spec.js#rounds a positive half up
05 Currency calculation requires an available conversionunitnegativetest
Proves
BR-CAP-COM-CAT-013-05 BR-CAP-COM-CAT-013-06
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
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
services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#refuses a currency whose default is prohibit when no cell exists in it, and a calculate with no rate for the day
services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#refuses a currency the product is prohibited in for everyone (a prohibit on standard)
services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#refuses a product outside its sale window, before and after
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 authorityapinegativetest
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
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
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#refuses a published product outside the store’s category assortment: 400 product_not_in_store_assortment, naming the store
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#refuses a portal member the draft too, beside their own quote
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#prices the draft and the out-of-assortment product for staff holding commerce.orders.create: Standard 6000 and 15000
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#does not extend the staff exemption to a console reader without commerce.orders.create
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 contextapinegativetest
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
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/pricing/tests/e2e/price-quotes.e2e.spec.js#needs the store: a public quote outside one is refused, an unknown store is 404 and a closed one 409
services-commerce:modules/pricing/tests/e2e/price-quote-public-display.e2e.spec.js#shows the Standard price alone, and still the notice, when the Member audience is not marked public
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 modeapinegativetest
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
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)
services-commerce:modules/pricing/tests/integration/services/extensions/priced-with-extensions.integration.spec.js#skips an optional extension with a warning, the exception recorded, the placement proceeding
services-commerce:modules/pricing/tests/unit/extensions/commerce-extensions.spec.js#skips an extension that fails in a quote with a warning and no adjustment
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 placementapinegativeproposed
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-controlledapinegativetest
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
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
services-commerce:modules/pricing/tests/e2e/price-quote-staff-form.e2e.spec.js#reads the student’s standing as of August 2027: the student term ended and the committed Alumni term holds, so Member prices, not Student
services-commerce:modules/pricing/tests/e2e/price-quote-staff-form.e2e.spec.js#refuses a portal member either property, 403, and prices them without
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 partiesapinegativetest
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
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#quotes for themselves, the price for their own contact
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#quotes for the organization they act for, themselves the acting contact whatever the body says
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#is refused a quote for another contact (403), and gets a public quote when naming nobody
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 calculationunittest
Proves
BR-CAP-COM-CAT-013-13
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
services-commerce:modules/pricing/tests/unit/engine/quote-tolerance.spec.js#differs with the changes when a price moved, never answering the previewed price
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 stampingapinegativetest
Proves
BR-CAP-COM-CAT-013-14
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
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
services-commerce:modules/pricing/tests/integration/services/placement/audience-settlement.integration.spec.js#passes a member still eligible, stamps the period’s first sale once, and leaves a period already sold in as it was
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 accessapinegativetest
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
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#refuses a property outside the contract, a quantity of zero and a fractional entered amount
services-commerce:modules/pricing/tests/e2e/price-quotes-security.e2e.spec.js#refuses a principal without the quote key, 403 permission_missing
Source
services-commerce:modules/pricing/tests/e2e/price-quotes.e2e.spec.js#refuses more than fifty items

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.