Skip to content

ATS-COM-CAT-012Configure product purchasing and price adjustments: Acceptance Test Set

Markdown

ATS-COM-CAT-012

Configure product purchasing and price adjustments: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-COM-CAT-012

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

Test Scenarios

7 scenarios proving CAP-COM-CAT-012; 7 bound to an existing test.

01 Unconfigured settings return defaults and replacement resets omissionsapitest
Proves
BR-CAP-COM-CAT-012-02
Preconditions
A product has no purchasing-settings record
Steps
Read settings and save a partial selection
Expected
Read returns defaults with the unconfigured indication; omitted fields take defaults on save
Data
none
Bound to
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#reads a product without a row as the defaults, not configured
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#gives a setting the PUT leaves out its default, the whole record being stated
services-commerce:modules/pricing/tests/integration/services/persistence/product-purchasing-settings.integration.spec.js#creates the row at the defaults: priced for the buyer, no roles, not excluded from promotions, version 1
Source
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#reads a product without a row as the defaults, not configured
02 Selection strategy changes the qualifying price chosenapitest
Proves
BR-CAP-COM-CAT-012-03 AS-JNY-COM-CAT-002-04
Preconditions
A buyer qualifies for Member and Student
Steps
Quote using lowest, rank and lowest again
Expected
Selection produces Student, Member and Student pricing respectively
Data
Student and Member price rows
Bound to
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#prices the student member at the student price under lowest (premise)
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-purchasing-settings.e2e.spec.js#prices the buyer at the student price again once the selection is put back to lowest
Source
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#prices the student member at the student price under lowest (premise)
03 Invalid settings preserve the existing recordapinegativetest
Proves
BR-CAP-COM-CAT-012-04
Preconditions
The product has saved settings
Steps
Reference an unknown schedule, unsupported selection and unknown role
Expected
Each invalid save fails and preserves the settings
Data
none
Bound to
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#refuses a schedule the workspace does not have, 400, and leaves the settings as they were
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#refuses a selection, a subject and a qualification date outside the lists, 400, naming the field
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#refuses an unknown organization role id with 400 naming it, and stores nothing (COM-ACC-0799)
Source
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#refuses a schedule the workspace does not have, 400, and leaves the settings as they were
04 Pricing-handler activation controls its adjustmentapitest
Proves
BR-CAP-COM-CAT-012-06
Preconditions
The product price is twenty dollars
Steps
Register a 2.50-dollar adjustment, deactivate it and remove it
Expected
Quotes become 22.50 dollars, then return to twenty dollars for both later states
Data
Fixture handler registry
Bound to
services-commerce:modules/pricing/tests/e2e/product-extensions.e2e.spec.js#adds the function’s $2.50 to the next quote: $20.00 price row and $2.50 extension, $22.50
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/e2e/product-extensions.e2e.spec.js#removes the row, and the quote is at the price row again
Source
services-commerce:modules/pricing/tests/e2e/product-extensions.e2e.spec.js#adds the function’s $2.50 to the next quote: $20.00 price row and $2.50 extension, $22.50
05 Pricing-function requests reject mismatched and handler-owned fieldsapinegativetest
Proves
BR-CAP-COM-CAT-012-07
Preconditions
A product function can be registered
Steps
Submit another product or workspace, a timeout and no handler
Expected
Invalid registration fails without a saved function
Data
none
Bound to
services-commerce:modules/pricing/tests/e2e/product-extensions.e2e.spec.js#refuses an unknown property such as a timeout, which belongs to the handler
Source
services-commerce:modules/pricing/tests/e2e/product-extensions.e2e.spec.js#refuses a body naming another product
06 Grid validation requires Standard coverageunitnegativetest
Proves
BR-CAP-COM-CAT-012-08
Preconditions
Member pricing exists without Standard in a cell
Steps
Validate missing, inherited and prohibited Standard configurations
Expected
Missing coverage identifies the cell; inherited and prohibited coverage pass
Data
none
Bound to
react-console:lib/commerce/pricing/__tests__/rules.test.ts#refuses a period with a Member price and no Standard price, naming the cell
react-console:lib/commerce/pricing/__tests__/rules.test.ts#accepts a Standard inherited from the Always row
react-console:lib/commerce/pricing/__tests__/rules.test.ts#accepts a Standard that is prohibited on purpose
Source
react-console:lib/commerce/pricing/__tests__/rules.test.ts#refuses a period with a Member price and no Standard price, naming the cell
07 Pricing configuration separates read and write authorityapinegativetest
Proves
BR-CAP-COM-CAT-012-10
Preconditions
The caller holds read grants for settings and functions
Steps
Inspect both resources and attempt changes
Expected
Inspection succeeds and writes fail
Data
Read-exclusively persona
Bound to
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#lets a read-only principal read, and refuses it the PUT, 403 permission_missing, the settings as they were
services-commerce:modules/pricing/tests/e2e/product-extensions.e2e.spec.js#lets a read-only principal read, and refuses it the PUT and the DELETE, 403 permission_missing
Source
services-commerce:modules/pricing/tests/e2e/product-purchasing-settings.e2e.spec.js#lets a read-only principal read, and refuses it the PUT, 403 permission_missing, the settings as they were

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.