@@ -4,19 +4,26 @@ import { mockRestEndpoints, captureJoinBodyViaStripeRedirect, injectEnvOverrides
44/**
55 * Phase 7 — Supporter mode edge cases and product naming
66 *
7- * PR #59 test plan sections 9, 10, and 13.
7+ * One-off tab disabled when Direct Debit Only is active:
8+ * When STRIPE_DIRECT_DEBIT_ONLY=true, the One-off tab is disabled and an
9+ * explanatory note is shown. Monthly donations remain available.
810 *
9- * Section 9: One-off tab disabled when STRIPE_DIRECT_DEBIT_ONLY=true.
10- * Section 10: No plans configured shows a warning.
11- * Section 13: Product naming — /join request body carries the correct
12- * membership value prefix for standard vs supporter mode.
11+ * No plans configured:
12+ * When a Supporter Mode block has no membership plans set, the donation page
13+ * shows a "No donation amounts configured" warning instead of tier buttons.
1314 *
14- * Note: Section 11 (free membership) is already covered by Phase 3
15- * (03-free-membership.spec.ts). Section 12 (Mailchimp non-fatal errors)
16- * is a backend concern verified by PHP unit tests; the frontend always
17- * receives success:true regardless of Mailchimp state.
18- * Section 6 (supporter mode monthly via Direct Debit) requires a live
19- * GoCardless integration and is covered by manual testing.
15+ * Product naming in /join request body:
16+ * - Standard join: membership field holds a plan ID (not prefixed "Donation:").
17+ * The backend names the Stripe product "Membership: <plan label>".
18+ * - Supporter mode monthly: recurDonation=true and donationAmount=0 signal
19+ * that the plan price IS the donation; backend names it "Donation: <label>".
20+ * - Supporter mode one-off: recurDonation=false and donationAmount>0 signal
21+ * a one-time PaymentIntent; backend uses the "Supporter Donation" product.
22+ *
23+ * Note: Free membership (payment skipped for zero-price plans) is covered by
24+ * Phase 3 (03-free-membership.spec.ts). Mailchimp non-fatal error handling is
25+ * a backend concern covered by JoinServiceMailchimpTest.php. Supporter mode
26+ * monthly via Direct Debit requires a live GoCardless integration.
2027 */
2128
2229const SUPPORTER_PAGE = '/e2e-supporter/' ;
@@ -27,7 +34,7 @@ const STANDARD_PAGE = '/e2e-standard-join/';
2734// Section 9 — One-off disabled when Direct Debit only
2835// ---------------------------------------------------------------------------
2936
30- test . describe ( '7.1 — One-off tab disabled when STRIPE_DIRECT_DEBIT_ONLY=true (PR #59 section 9) ' , ( ) => {
37+ test . describe ( '7.1 — One-off tab disabled when STRIPE_DIRECT_DEBIT_ONLY=true' , ( ) => {
3138 test . beforeEach ( async ( { page } ) => {
3239 await injectEnvOverrides ( page , `**${ SUPPORTER_PAGE } ` , {
3340 USE_STRIPE : true ,
@@ -64,7 +71,7 @@ test.describe('7.1 — One-off tab disabled when STRIPE_DIRECT_DEBIT_ONLY=true (
6471// Section 10 — No plans configured
6572// ---------------------------------------------------------------------------
6673
67- test . describe ( '7.2 — No plans configured warning (PR #59 section 10) ' , ( ) => {
74+ test . describe ( '7.2 — No plans configured warning' , ( ) => {
6875 test . beforeEach ( async ( { page } ) => {
6976 await injectEnvOverrides ( page , `**${ SUPPORTER_NO_PLANS_PAGE } ` , { USE_STRIPE : true } ) ;
7077 await mockRestEndpoints ( page ) ;
@@ -87,7 +94,7 @@ test.describe('7.2 — No plans configured warning (PR #59 section 10)', () => {
8794// Section 13 — Product naming
8895// ---------------------------------------------------------------------------
8996
90- test . describe ( '7.3 — Product naming: standard join (PR #59 section 13) ' , ( ) => {
97+ test . describe ( '7.3 — Product naming: standard join' , ( ) => {
9198 test ( '/join body membership does not contain "Donation:" prefix for standard join' , async ( { page } ) => {
9299 await injectEnvOverrides ( page , `**${ STANDARD_PAGE } ` , { USE_STRIPE : true } ) ;
93100 await mockRestEndpoints ( page ) ;
@@ -110,7 +117,7 @@ test.describe('7.3 — Product naming: standard join (PR #59 section 13)', () =>
110117 } ) ;
111118} ) ;
112119
113- test . describe ( '7.4 — Product naming: supporter mode monthly (PR #59 section 13) ' , ( ) => {
120+ test . describe ( '7.4 — Product naming: supporter mode monthly' , ( ) => {
114121 test ( '/join body signals a recurring donation (recurDonation=true, donationAmount=0)' , async ( { page } ) => {
115122 await injectEnvOverrides ( page , `**${ SUPPORTER_PAGE } ` , {
116123 USE_STRIPE : true ,
@@ -136,7 +143,7 @@ test.describe('7.4 — Product naming: supporter mode monthly (PR #59 section 13
136143 } ) ;
137144} ) ;
138145
139- test . describe ( '7.5 — Product naming: supporter mode one-off (PR #59 section 13) ' , ( ) => {
146+ test . describe ( '7.5 — Product naming: supporter mode one-off' , ( ) => {
140147 test ( '/join body signals a one-off donation (recurDonation=false, donationAmount>0)' , async ( { page } ) => {
141148 await injectEnvOverrides ( page , `**${ SUPPORTER_PAGE } ` , {
142149 USE_STRIPE : true ,
0 commit comments