Skip to content

ATS-COM-CAT-001Configure reusable sale-processing policies: Acceptance Test Set

Markdown

ATS-COM-CAT-001

Configure reusable sale-processing policies: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-COM-CAT-001

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

Test Scenarios

10 scenarios proving CAP-COM-CAT-001; 10 bound to an existing test.

01 Policy money fields reject incomplete or unsupported choicesapinegativetest
Proves
BR-CAP-COM-CAT-001-01 BR-CAP-COM-CAT-001-02
Preconditions
A unit supports USD alone
Steps
Attempt creation without currency and with EUR
Expected
Both requests fail on the relevant field and leave no policy
Data
Accounting business unit with currencies
Bound to
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to a profile without a business unit or without a currency: the two money facts a profile always has
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 currency_not_supported_by_business_unit to a currency the business unit does not transact in
Source
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to a profile without a business unit or without a currency: the two money facts a profile always has
02 Merchant-account eligibility and connection failure take different pathsunitnegativetest
Proves
BR-CAP-COM-CAT-001-03
Preconditions
Accounting provides account fixtures and an unavailable response
Steps
Submit wrong-unit, inactive, wrong-currency and unknown accounts, then simulate connection failure
Expected
Invalid accounts fail field validation; connection failure permits saving with a logged warning
Data
Fixture Accounting accounts
Bound to
services-commerce:modules/configuration/tests/unit/persistence/ordering-profile-merchant-account.spec.js#is refused 400 merchant_account_not_eligible when the account belongs to another business unit
Source
services-commerce:modules/configuration/tests/unit/persistence/ordering-profile-merchant-account.spec.js#is refused 400 merchant_account_not_eligible when the account belongs to another business unit
03 Card-range validation identifies missing or reversed boundsapinegativetest
Proves
BR-CAP-COM-CAT-001-04
Preconditions
Range-based acceptance is selected
Steps
Omit each bound in turn and reverse their order
Expected
Each invalid range fails with the affected bound identified
Data
none
Bound to
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to a within_range acceptance without its minimum, naming card_minimum_total_minor, with or without the maximum (0755)
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to an inverted card range, naming the field, not the database rule, and saves nothing (DEF-COM-0866)
Source
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to a within_range acceptance without its minimum, naming card_minimum_total_minor, with or without the maximum (0755)
04 Database enforcement rejects unsupported payment windowsapinegativetest
Proves
BR-CAP-COM-CAT-001-05
Preconditions
A policy row is ready for insertion
Steps
Insert zero-minute and eight-day windows
Expected
Both inserts fail their window constraint
Data
none
Bound to
services-commerce:modules/configuration/tests/integration/db/configuration-records.table.integration.spec.js#refuses a tender window outside one minute to a week, by ordering_profiles_tender_window_minutes_check
Source
services-commerce:modules/configuration/tests/integration/db/configuration-records.table.integration.spec.js#refuses a tender window outside one minute to a week, by ordering_profiles_tender_window_minutes_check
05 Policy payment lists reject blanks and duplicatesunitnegativetest
Proves
BR-CAP-COM-CAT-001-07
Preconditions
Policy requests contain editable payment lists
Steps
Replace with an empty collection option and create with a repeated payment method
Expected
Validation identifies each offending entry
Data
none
Bound to
services-commerce:modules/configuration/tests/unit/api/blank-ordering-profile-ids.spec.js#refuses an empty entry in collection_option_ids on a replacement 400, naming the field
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#refuses a payment method named twice, 400 payment_method_repeated (the seam for Accounting’s list, D-10)
Source
services-commerce:modules/configuration/tests/unit/api/blank-ordering-profile-ids.spec.js#refuses an empty entry in collection_option_ids on a replacement 400, naming the field
06 Default designation transfers without disappearingapinegativetest
Proves
BR-CAP-COM-CAT-001-09
Preconditions
The workspace initially has no policies
Steps
Create two policies, designate the second and attempt to clear its default flag
Expected
Creation selects the first; transfer selects only the second; clearing the flag fails
Data
none
Bound to
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#makes a second profile no default, and one stating is_tenant_default the default in place of the first, in one transaction
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to a replacement that drops the tenant default flag from the default, and moves it when another states it
Source
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#makes a second profile no default, and one stating is_tenant_default the default in place of the first, in one transaction
07 References retain default and store policiesapinegativetest
Proves
BR-CAP-COM-CAT-001-10 BR-CAP-COM-CAT-001-11
Preconditions
Workspace and application defaults and a store policy exist
Steps
Deactivate the application default and delete referenced policies, then remove the store reference
Expected
Default and store refusals identify their dependencies; the unreferenced store policy can be deleted
Data
A store under a policy
Bound to
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#refuses making an application default inactive, 409 profile_is_default naming the application, and deactivates it once no default names it (D31)
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 409 naming the store while a store sells under the profile, then 200 once the store is gone
Source
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#refuses making an application default inactive, 409 profile_is_default naming the application, and deactivates it once no default names it (D31)
08 Stale policy replacement preserves the current recordapinegativetest
Proves
BR-CAP-COM-CAT-001-13
Preconditions
The saved policy has advanced to version two
Steps
Submit the earlier version for replacement
Expected
A conflict preserves version two
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 409 to a stale version
09 Policy writes refuse a read-only callerapinegativetest
Proves
BR-CAP-COM-CAT-001-15
Preconditions
A caller has policy read authority alone
Steps
Attempt policy creation, replacement and removal
Expected
Permission refusals preserve the records
Data
Read-exclusively persona
Bound to
services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#is refused the replacements, 403 permission_missing, the records unchanged
Source
services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#is refused the creates, 403 permission_missing
10 Policy summary reflects a saved card-range editbrowsertest
Proves
BR-CAP-COM-CAT-001-04 AS-JNY-COM-CAT-001-01
Preconditions
The console runs against Commerce mock data
Steps
Create and view a policy, edit its card range and save
Expected
The returned view summarizes the revised range
Data
Console mock
Bound to
react-console:e2e/mock/commerce-checkout-policies.mock.spec.ts#create a policy, read its summary on the view, edit the card range, save, and see it on the view
Source
react-console:e2e/mock/commerce-checkout-policies.mock.spec.ts#create a policy, read its summary on the view, edit the card range, save, and see it on the view

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.