Skip to content

ATS-COM-CAT-014Prepare and control a promotion’s lifecycle: Acceptance Test Set

Markdown

ATS-COM-CAT-014

Prepare and control a promotion’s lifecycle: Acceptance Test Set

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-COM-CAT-014

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision1

Read atservices-commerce c8b66a98react-console baf6dae3

Test Scenarios

12 scenarios proving CAP-COM-CAT-014; 12 bound to an existing test.

01 Promotion kind changes respect existing codes and lifecycleapinegativetest
Proves
BR-CAP-COM-CAT-014-01
Preconditions
A coded draft and active automatic promotion exist
Steps
Convert the coded draft, change the active kind and add a code to the automatic promotion
Expected
Each prohibited operation fails
Data
none
Bound to
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses to make a draft with a code automatic, 409 automatic_promotion_has_no_codes
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#makes a draft with no code automatic, and refuses the change once it is active, 409 kind_not_editable
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses a code, 409 automatic_promotion_has_no_codes
Source
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses to make a draft with a code automatic, 409 automatic_promotion_has_no_codes
02 Offer validation rejects incompatible or excessive partsunitnegativetest
Proves
BR-CAP-COM-CAT-014-02 BR-CAP-COM-CAT-014-03
Preconditions
A promotion creation request is available
Steps
Combine parts with an order offer, supply twenty-one parts, omit percentage parts, exceed one hundred percent and omit per-unit currency
Expected
Each invalid offer receives a validation refusal
Data
none
Bound to
services-commerce:modules/promotions/tests/unit/promotions/promotion-parts-rules.spec.js#refuses percent_off as the promotion’s own kind without parts
Source
services-commerce:modules/promotions/tests/unit/promotions/promotion-parts-rules.spec.js#refuses parts together with a promotion-level kind
03 Selling areas validate part targetsapinegativetest
Proves
BR-CAP-COM-CAT-014-03
Preconditions
The merchandise provider is registered
Steps
Select an unknown area and a nonmerchandise product
Expected
Both part requests identify their invalid target
Data
none
Bound to
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses an area nobody offers, 400 promotion_invalid naming the part
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses a product that is not merchandise, 400 promotion_invalid naming the part and the product
Source
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses an area nobody offers, 400 promotion_invalid naming the part
04 Promotion validation returns all detected problemsapinegativetest
Proves
BR-CAP-COM-CAT-014-04
Preconditions
A request contains an invalid cap, interval and currency
Steps
Submit the request once
Expected
One refusal reports every detected issue
Data
none
Bound to
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#names every problem of a sloppy promotion in one 400 promotion_invalid, the zero cap among them (Q07, journey 0203)
services-commerce:modules/promotions/tests/unit/pricing/promotion-shape.spec.js#refuses a stated cap of zero, as the database does, and admits a cap of one and a minimum of zero (Q07)
Source
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#names every problem of a sloppy promotion in one 400 promotion_invalid, the zero cap among them (Q07, journey 0203)
05 Code and automatic eligibility have different homesapinegativetest
Proves
BR-CAP-COM-CAT-014-05
Preconditions
Both promotion kinds can be created
Steps
Set promotion eligibility on each and include legacy scope
Expected
Code-promotion eligibility fails, automatic eligibility succeeds and legacy scope has no effect
Data
none
Bound to
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses a promotion-level eligibility rule on a code-claimed promotion, 400 in the code’s words
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#accepts a scope of any members and ignores it: never an error, nothing stored (Revision 2)
Source
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses a promotion-level eligibility rule on a code-claimed promotion, 400 in the code’s words
06 Audience combination defaults on and can be changedapitest
Proves
BR-CAP-COM-CAT-014-06
Preconditions
A new promotion omits the combination setting
Steps
Create it and replace the setting
Expected
The default is enabled and the replacement is readable
Data
none
Bound to
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#defaults "combine with audience prices" to yes when the body leaves it out (D12)
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#changes "combine with audience prices" and reads it back (D12)
Source
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#defaults "combine with audience prices" to yes when the body leaves it out (D12)
07 Lifecycle transitions validate states and retain reasonsapinegativetest
Proves
BR-CAP-COM-CAT-014-09 AS-JNY-COM-CAT-004-01
Preconditions
Fixtures cover each promotion state
Steps
Exercise valid transitions and unsupported moves
Expected
Valid moves appear in history and invalid moves identify their states
Data
none
Bound to
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#pauses an active promotion, resumes a paused one, and activates a paused one
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#ends an active promotion, and archives an ended one and a draft
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#records every transition on the history, newest first, with the reason given
Source
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#pauses an active promotion, resumes a paused one, and activates a paused one
08 Activation requires operational configurationapinegativetest
Proves
BR-CAP-COM-CAT-014-10
Preconditions
Drafts lack active codes, parts or selected eligibility rules
Steps
Attempt activation of each
Expected
Each refusal identifies its missing prerequisite
Data
none
Bound to
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses to activate a coded promotion with no active code, 409 no_active_code
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses to activate a promotion whose parts were removed, 409 offer_required
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses activating an effect with no rule chosen yet, 409 eligibility_rule_required
Source
services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses to activate a coded promotion with no active code, 409 no_active_code
09 Launch authority is independent of preparation authorityapinegativetest
Proves
BR-CAP-COM-CAT-014-11 AS-JNY-COM-CAT-004-02
Preconditions
Separate callers hold manage and activate permissions
Steps
Attempt preparation, pause, activation and resumption
Expected
Management cannot launch or resume, and activation authority alone cannot pause
Data
Personas by key
Bound to
services-commerce:modules/promotions/tests/e2e/promotions-security.e2e.spec.js#cannot resume a paused promotion, 403 permission_missing
Source
services-commerce:modules/promotions/tests/e2e/promotions-security.e2e.spec.js#cannot activate a draft, 403 permission_missing
10 Console actions reflect the separate launch grantunittest
Proves
BR-CAP-COM-CAT-014-11
Preconditions
Read-only, coordinator and administrator fixtures exist
Steps
Render promotion actions for each
Expected
Coordinators receive preparation and pause actions without Activate or Resume
Data
none
Bound to
react-console:components/commerce/__tests__/permission-gating.test.tsx#lets a coordinator prepare and pause but not launch or resume (commerce.promotions.activate)
react-console:components/commerce/__tests__/permission-gating.test.tsx#offers a read-only person no pencil and no lifecycle
Source
react-console:components/commerce/__tests__/permission-gating.test.tsx#lets a coordinator prepare and pause but not launch or resume (commerce.promotions.activate)
11 Used promotions retain economic terms while allowing maintenanceapinegativetest
Proves
BR-CAP-COM-CAT-014-12
Preconditions
A promotion already has redemptions
Steps
Change its benefit, extend dates, change limits and duplicate after ending
Expected
Locked benefit changes fail; permitted maintenance saves and the duplicate is editable
Data
Planted redemptions
Bound to
services-commerce:modules/promotions/tests/e2e/promotion-redemptions.e2e.spec.js#names the column and offers to end the promotion and duplicate it
services-commerce:modules/promotions/tests/e2e/promotion-redemptions.e2e.spec.js#changes the benefit value of its duplicate, a draft never redeemed
Source
services-commerce:modules/promotions/tests/e2e/promotion-redemptions.e2e.spec.js#refuses the new benefit value, 409 promotion_locked
12 Promotion view reflects a coordinator’s saved editbrowsertest
Proves
AS-JNY-COM-CAT-004-03
Preconditions
The browser uses mocked promotions
Steps
Create a category offer, view it and change its benefit to fifteen percent
Expected
The view displays the revised offer
Data
Console mock
Bound to
react-console:e2e/mock/promotions.mock.spec.ts#a new promotion is created for a category, shown on its view, and an edit to 15% comes back to the view
Source
react-console:e2e/mock/promotions.mock.spec.ts#a new promotion is created for a category, shown on its view, and an edit to 15% comes back to 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.