@funnelsgrove/cli 0.1.28 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/cli.d.ts +20 -0
- package/dist/cli.js +33 -8
- package/dist/githubSyncFlow.d.ts +6 -0
- package/dist/githubSyncFlow.js +55 -10
- package/funnel-contract-compatibility.json +28 -28
- package/package.json +8 -3
- package/template_docs/.funnelsgrove-docs.json +3 -3
- package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_docs/funnel-docs.config.json +1 -1
- package/template_scaffold/.funnelsgrove-docs.json +3 -3
- package/template_scaffold/.funnelsgrove-scaffold.json +150 -150
- package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_scaffold/funnel-docs.config.json +1 -1
- package/template_scaffold/package-lock.json +13 -13
- package/template_scaffold/package.json +3 -3
- package/template_scaffold/public/paywall/money-back-badge.png +0 -0
- package/template_scaffold/src/steps/step-32-paywall.tsx +2 -2
- package/template_scaffold/src/steps/step-33-subscription-started.tsx +1 -43
- package/template_scaffold/{funnel-agent-docs.test.ts → tests/funnel-agent-docs.test.ts} +4 -4
- package/template_scaffold/{package.test.ts → tests/package.test.ts} +4 -4
- package/template_scaffold/{src → tests/src}/app/layout.test.ts +2 -2
- package/template_scaffold/{src → tests/src}/components/FunnelFlow.test.tsx +2 -2
- package/template_scaffold/{src → tests/src}/config/billing.plans.test.ts +4 -4
- package/template_scaffold/{src → tests/src}/config/experiments.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/config/funnel.manifest.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/contract/funnel-project.validation.test.ts +2 -2
- package/template_scaffold/{src → tests/src}/contract/golden/golden-fixtures.test.ts +16 -16
- package/template_scaffold/{src → tests/src}/contract/validate-funnel.cli.test.ts +2 -2
- package/template_scaffold/{src → tests/src}/runtime/checkout-runtime-config.test.ts +3 -3
- package/template_scaffold/{src → tests/src}/runtime/funnel-runtime.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/runtime/step-content-context.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/runtime/use-funnel-flow-controller.integration.test.ts +4 -4
- package/template_scaffold/{src → tests/src}/runtime/use-funnel-flow-controller.test.ts +3 -3
- package/template_scaffold/{src → tests/src}/steps/paywall-checkout-options.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/steps/shared-header-contract.test.ts +3 -1
- package/template_scaffold/{src → tests/src}/steps/step-02.test.ts +3 -3
- package/template_scaffold/{src → tests/src}/steps/step-03.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/steps/step-04.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/steps/step-31-email-capture.test.ts +1 -1
- package/template_scaffold/{src → tests/src}/steps/step-32-paywall.test.ts +43 -43
- package/template_scaffold/{src → tests/src}/steps/step-33-subscription-started.test.ts +6 -7
- package/template_scaffold/{src → tests/src}/steps/step-34-upsell-form.test.ts +3 -3
- package/template_scaffold/{src → tests/src}/steps/step-image-migration.test.ts +1 -1
- /package/template_scaffold/{src → tests/src}/app/[stepId]/page.test.tsx +0 -0
- /package/template_scaffold/{src → tests/src}/components/FunnelStepImage.test.ts +0 -0
- /package/template_scaffold/{src → tests/src}/steps/step-01.test.ts +0 -0
|
@@ -5,7 +5,7 @@ import { describe, expect, it } from 'vitest';
|
|
|
5
5
|
describe('ClaimBee paywall source', () => {
|
|
6
6
|
it('uses the local checkout runtime config when creating subscription-backed custom checkout intents', () => {
|
|
7
7
|
const stepSource = readFileSync(
|
|
8
|
-
path.resolve(__dirname, '
|
|
8
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
9
9
|
'utf8',
|
|
10
10
|
);
|
|
11
11
|
|
|
@@ -20,11 +20,11 @@ describe('ClaimBee paywall source', () => {
|
|
|
20
20
|
|
|
21
21
|
it('renders the custom checkout trigger and separate claim CTA', () => {
|
|
22
22
|
const stepSource = readFileSync(
|
|
23
|
-
path.resolve(__dirname, '
|
|
23
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
24
24
|
'utf8',
|
|
25
25
|
);
|
|
26
26
|
const contentSource = readFileSync(
|
|
27
|
-
path.resolve(__dirname, '
|
|
27
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
28
28
|
'utf8',
|
|
29
29
|
);
|
|
30
30
|
|
|
@@ -60,11 +60,11 @@ describe('ClaimBee paywall source', () => {
|
|
|
60
60
|
|
|
61
61
|
it('keeps the timer and top CTA in a sticky bar with minute and second labels under blue digits', () => {
|
|
62
62
|
const stepSource = readFileSync(
|
|
63
|
-
path.resolve(__dirname, '
|
|
63
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
64
64
|
'utf8',
|
|
65
65
|
);
|
|
66
66
|
const contentSource = readFileSync(
|
|
67
|
-
path.resolve(__dirname, '
|
|
67
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
68
68
|
'utf8',
|
|
69
69
|
);
|
|
70
70
|
|
|
@@ -124,18 +124,18 @@ describe('ClaimBee paywall source', () => {
|
|
|
124
124
|
|
|
125
125
|
it('scrolls the header CTA to the selected plan card and opens the custom subscription checkout', () => {
|
|
126
126
|
const stepSource = readFileSync(
|
|
127
|
-
path.resolve(__dirname, '
|
|
127
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
128
128
|
'utf8',
|
|
129
129
|
);
|
|
130
130
|
const contentSource = readFileSync(
|
|
131
|
-
path.resolve(__dirname, '
|
|
131
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
132
132
|
'utf8',
|
|
133
133
|
);
|
|
134
134
|
|
|
135
135
|
expect(stepSource).toContain('useStripeSubscriptionCheckoutSession');
|
|
136
136
|
expect(stepSource).toContain('plan: selectedPlan');
|
|
137
137
|
expect(stepSource).toContain('couponId: checkoutPromoActive ? selectedDisplayPlan?.couponId ?? null : null');
|
|
138
|
-
expect(stepSource).toContain(
|
|
138
|
+
expect(stepSource).toContain("checkoutSession.prepareCardCheckout({ checkoutStartSource: 'checkout_render' })");
|
|
139
139
|
expect(stepSource).toContain("successUrl.searchParams.set('source', 'stripe-elements');");
|
|
140
140
|
expect(stepSource).not.toContain('publicAnalyticsSdk.trackCheckoutStarted({');
|
|
141
141
|
expect(stepSource).toContain('stepContractVersion: funnelManifest.stepContractVersion');
|
|
@@ -151,7 +151,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
151
151
|
|
|
152
152
|
it('uses subscription-backed Payment Element checkout instead of a one-time PaymentIntent checkout path', () => {
|
|
153
153
|
const stepSource = readFileSync(
|
|
154
|
-
path.resolve(__dirname, '
|
|
154
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
155
155
|
'utf8',
|
|
156
156
|
);
|
|
157
157
|
|
|
@@ -171,7 +171,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
171
171
|
|
|
172
172
|
it('claims paywall completion only when payment information is submitted', () => {
|
|
173
173
|
const stepSource = readFileSync(
|
|
174
|
-
path.resolve(__dirname, '
|
|
174
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
175
175
|
'utf8',
|
|
176
176
|
);
|
|
177
177
|
const paymentInfoHandler = stepSource.slice(
|
|
@@ -191,7 +191,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
191
191
|
|
|
192
192
|
it('tracks the staged discount timer, returns first checkout closes to the special offer, and forwards the active coupon into subscription checkout', () => {
|
|
193
193
|
const stepSource = readFileSync(
|
|
194
|
-
path.resolve(__dirname, '
|
|
194
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
195
195
|
'utf8',
|
|
196
196
|
);
|
|
197
197
|
|
|
@@ -228,11 +228,11 @@ describe('ClaimBee paywall source', () => {
|
|
|
228
228
|
|
|
229
229
|
it('waits for the stored discount state before rendering the paywall and shows a white loading screen first', () => {
|
|
230
230
|
const stepSource = readFileSync(
|
|
231
|
-
path.resolve(__dirname, '
|
|
231
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
232
232
|
'utf8',
|
|
233
233
|
);
|
|
234
234
|
const contentSource = readFileSync(
|
|
235
|
-
path.resolve(__dirname, '
|
|
235
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
236
236
|
'utf8',
|
|
237
237
|
);
|
|
238
238
|
|
|
@@ -247,11 +247,11 @@ describe('ClaimBee paywall source', () => {
|
|
|
247
247
|
|
|
248
248
|
it('keeps checkout dialog copy in the step content contract and editor', () => {
|
|
249
249
|
const contentSource = readFileSync(
|
|
250
|
-
path.resolve(__dirname, '
|
|
250
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
251
251
|
'utf8',
|
|
252
252
|
);
|
|
253
253
|
const editorSource = readFileSync(
|
|
254
|
-
path.resolve(__dirname, '
|
|
254
|
+
path.resolve(__dirname, '../../../src/steps/editor/step-32-paywall.editor.ts'),
|
|
255
255
|
'utf8',
|
|
256
256
|
);
|
|
257
257
|
|
|
@@ -269,7 +269,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
269
269
|
|
|
270
270
|
it('passes customer email and active discount state into subscription checkout', () => {
|
|
271
271
|
const stepSource = readFileSync(
|
|
272
|
-
path.resolve(__dirname, '
|
|
272
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
273
273
|
'utf8',
|
|
274
274
|
);
|
|
275
275
|
|
|
@@ -288,7 +288,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
288
288
|
|
|
289
289
|
it('renders the checkout CTAs immediately after the plans and before the feature grid', () => {
|
|
290
290
|
const stepSource = readFileSync(
|
|
291
|
-
path.resolve(__dirname, '
|
|
291
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
292
292
|
'utf8',
|
|
293
293
|
);
|
|
294
294
|
|
|
@@ -315,7 +315,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
315
315
|
|
|
316
316
|
it('keeps the mobile paywall geometry inside the viewport without horizontal scroll', () => {
|
|
317
317
|
const stepSource = readFileSync(
|
|
318
|
-
path.resolve(__dirname, '
|
|
318
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
319
319
|
'utf8',
|
|
320
320
|
);
|
|
321
321
|
|
|
@@ -332,7 +332,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
332
332
|
|
|
333
333
|
it('routes Apple Pay and Google Pay controls through subscription-backed Express Checkout', () => {
|
|
334
334
|
const stepSource = readFileSync(
|
|
335
|
-
path.resolve(__dirname, '
|
|
335
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
336
336
|
'utf8',
|
|
337
337
|
);
|
|
338
338
|
|
|
@@ -352,7 +352,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
352
352
|
|
|
353
353
|
it('carries paywall wallet availability into checkout so reopened checkout keeps known wallets visible', () => {
|
|
354
354
|
const stepSource = readFileSync(
|
|
355
|
-
path.resolve(__dirname, '
|
|
355
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
356
356
|
'utf8',
|
|
357
357
|
);
|
|
358
358
|
|
|
@@ -368,7 +368,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
368
368
|
|
|
369
369
|
it('prepares the real Apple Pay element on load instead of waiting for the placeholder tap', () => {
|
|
370
370
|
const stepSource = readFileSync(
|
|
371
|
-
path.resolve(__dirname, '
|
|
371
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
372
372
|
'utf8',
|
|
373
373
|
);
|
|
374
374
|
|
|
@@ -384,7 +384,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
384
384
|
|
|
385
385
|
it('keeps the paywall Apple Pay control visible and confirms the subscription client secret', () => {
|
|
386
386
|
const stepSource = readFileSync(
|
|
387
|
-
path.resolve(__dirname, '
|
|
387
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
388
388
|
'utf8',
|
|
389
389
|
);
|
|
390
390
|
|
|
@@ -404,7 +404,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
404
404
|
|
|
405
405
|
it('leaves checkout-start ownership to the shared session-aware payment helpers', () => {
|
|
406
406
|
const stepSource = readFileSync(
|
|
407
|
-
path.resolve(__dirname, '
|
|
407
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
408
408
|
'utf8',
|
|
409
409
|
);
|
|
410
410
|
|
|
@@ -419,7 +419,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
419
419
|
expect(stepSource).toContain('checkoutAnalytics={checkoutAnalyticsContext}');
|
|
420
420
|
expect(stepSource).toContain('checkoutSessionId={checkoutSession.checkoutSessionId}');
|
|
421
421
|
expect(stepSource).toContain('onPaymentInfoSubmitted={trackPaymentInfoSubmitted}');
|
|
422
|
-
expect(stepSource).toContain(
|
|
422
|
+
expect(stepSource).toContain("await checkoutSession.prepareCardCheckout({ checkoutStartSource: 'checkout_render' });");
|
|
423
423
|
expect(stepSource).not.toContain('const trackCheckoutCompleted = () => {');
|
|
424
424
|
expect(stepSource).not.toContain('publicAnalyticsSdk.trackCheckoutCompleted({');
|
|
425
425
|
expect(stepSource).not.toContain('onSuccess={trackCheckoutCompleted}');
|
|
@@ -429,7 +429,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
429
429
|
|
|
430
430
|
it('emits payment-info analytics only after a stable Checkout Session exists', () => {
|
|
431
431
|
const stepSource = readFileSync(
|
|
432
|
-
path.resolve(__dirname, '
|
|
432
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
433
433
|
'utf8',
|
|
434
434
|
);
|
|
435
435
|
const analyticsMetadata = stepSource.slice(
|
|
@@ -462,14 +462,14 @@ describe('ClaimBee paywall source', () => {
|
|
|
462
462
|
});
|
|
463
463
|
|
|
464
464
|
it('uses a local three-plan catalog so the paywall shows weekly, monthly, and yearly offers', () => {
|
|
465
|
-
const billingConfigPath = path.resolve(__dirname, '
|
|
465
|
+
const billingConfigPath = path.resolve(__dirname, '../../../src/config/billing.plans.ts');
|
|
466
466
|
const paywallPlansHookPath = path.resolve(__dirname, './use-claimbee-paywall-plans.ts');
|
|
467
467
|
const stepPaywallPlansPath = path.resolve(__dirname, './step-32-paywall.plans.ts');
|
|
468
468
|
const stepPaywallOfferPath = path.resolve(__dirname, './step-32-paywall.offer.ts');
|
|
469
469
|
const paywallConfigPath = path.resolve(__dirname, '../config/claimbee-paywall.config.ts');
|
|
470
|
-
const billingTestConfigPath = path.resolve(__dirname, '
|
|
470
|
+
const billingTestConfigPath = path.resolve(__dirname, '../../../src/config/billing.test.plans.ts');
|
|
471
471
|
const stepSource = readFileSync(
|
|
472
|
-
path.resolve(__dirname, '
|
|
472
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
473
473
|
'utf8',
|
|
474
474
|
);
|
|
475
475
|
|
|
@@ -521,7 +521,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
521
521
|
|
|
522
522
|
it('selects the monthly paywall plan by default', () => {
|
|
523
523
|
const stepSource = readFileSync(
|
|
524
|
-
path.resolve(__dirname, '
|
|
524
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
525
525
|
'utf8',
|
|
526
526
|
);
|
|
527
527
|
|
|
@@ -532,11 +532,11 @@ describe('ClaimBee paywall source', () => {
|
|
|
532
532
|
|
|
533
533
|
it('renders the FAQ items as a collapsed accordion by default', () => {
|
|
534
534
|
const stepSource = readFileSync(
|
|
535
|
-
path.resolve(__dirname, '
|
|
535
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
536
536
|
'utf8',
|
|
537
537
|
);
|
|
538
538
|
const contentSource = readFileSync(
|
|
539
|
-
path.resolve(__dirname, '
|
|
539
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
540
540
|
'utf8',
|
|
541
541
|
);
|
|
542
542
|
|
|
@@ -553,11 +553,11 @@ describe('ClaimBee paywall source', () => {
|
|
|
553
553
|
|
|
554
554
|
it('renders the gold promo-applied strip below the hero image', () => {
|
|
555
555
|
const stepSource = readFileSync(
|
|
556
|
-
path.resolve(__dirname, '
|
|
556
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
557
557
|
'utf8',
|
|
558
558
|
);
|
|
559
559
|
const contentSource = readFileSync(
|
|
560
|
-
path.resolve(__dirname, '
|
|
560
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
561
561
|
'utf8',
|
|
562
562
|
);
|
|
563
563
|
|
|
@@ -577,7 +577,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
577
577
|
|
|
578
578
|
it('matches the Figma promo strip treatment with a notched split card', () => {
|
|
579
579
|
const stepSource = readFileSync(
|
|
580
|
-
path.resolve(__dirname, '
|
|
580
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
581
581
|
'utf8',
|
|
582
582
|
);
|
|
583
583
|
|
|
@@ -616,7 +616,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
616
616
|
expect(promoStyles).toContain('.paywall-v2-promo-upgrade-badge {');
|
|
617
617
|
expect(promoStyles).toContain('.paywall-v2-promo-upgrade-label {');
|
|
618
618
|
expect(promoStyles).not.toContain('.paywall-v2-promo-glyph {');
|
|
619
|
-
expect(readFileSync(path.resolve(__dirname, '
|
|
619
|
+
expect(readFileSync(path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'), 'utf8')).toContain(
|
|
620
620
|
"initialLabel: '% Your promo code applied!'",
|
|
621
621
|
);
|
|
622
622
|
expect(stepSource).not.toContain("className='paywall-v2-promo-glyph'");
|
|
@@ -624,7 +624,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
624
624
|
|
|
625
625
|
it('renders the discounted per-day row and the auto-renew disclaimer below the buttons', () => {
|
|
626
626
|
const stepSource = readFileSync(
|
|
627
|
-
path.resolve(__dirname, '
|
|
627
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
628
628
|
'utf8',
|
|
629
629
|
);
|
|
630
630
|
|
|
@@ -639,15 +639,15 @@ describe('ClaimBee paywall source', () => {
|
|
|
639
639
|
|
|
640
640
|
it('renders paywall support from the runtime project support email', () => {
|
|
641
641
|
const stepSource = readFileSync(
|
|
642
|
-
path.resolve(__dirname, '
|
|
642
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
643
643
|
'utf8',
|
|
644
644
|
);
|
|
645
645
|
const contentSource = readFileSync(
|
|
646
|
-
path.resolve(__dirname, '
|
|
646
|
+
path.resolve(__dirname, '../../../src/steps/content/step-32-paywall.content.ts'),
|
|
647
647
|
'utf8',
|
|
648
648
|
);
|
|
649
649
|
const editorSource = readFileSync(
|
|
650
|
-
path.resolve(__dirname, '
|
|
650
|
+
path.resolve(__dirname, '../../../src/steps/editor/step-32-paywall.editor.ts'),
|
|
651
651
|
'utf8',
|
|
652
652
|
);
|
|
653
653
|
|
|
@@ -663,7 +663,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
663
663
|
|
|
664
664
|
it('matches the Figma plan-card spacing so the per-day label stays aligned', () => {
|
|
665
665
|
const stepSource = readFileSync(
|
|
666
|
-
path.resolve(__dirname, '
|
|
666
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
667
667
|
'utf8',
|
|
668
668
|
);
|
|
669
669
|
|
|
@@ -705,7 +705,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
705
705
|
|
|
706
706
|
it('keeps the featured plan taller so the badge sits above a full-height body', () => {
|
|
707
707
|
const stepSource = readFileSync(
|
|
708
|
-
path.resolve(__dirname, '
|
|
708
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
709
709
|
'utf8',
|
|
710
710
|
);
|
|
711
711
|
|
|
@@ -722,7 +722,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
722
722
|
|
|
723
723
|
it('keeps the feature grid below checkout and ends the paywall with the guarantee', () => {
|
|
724
724
|
const stepSource = readFileSync(
|
|
725
|
-
path.resolve(__dirname, '
|
|
725
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
726
726
|
'utf8',
|
|
727
727
|
);
|
|
728
728
|
|
|
@@ -751,7 +751,7 @@ describe('ClaimBee paywall source', () => {
|
|
|
751
751
|
|
|
752
752
|
it('keeps the rotating reviews card at a fixed height so the paywall does not jump between stories', () => {
|
|
753
753
|
const stepSource = readFileSync(
|
|
754
|
-
path.resolve(__dirname, '
|
|
754
|
+
path.resolve(__dirname, '../../../src/steps/step-32-paywall.tsx'),
|
|
755
755
|
'utf8',
|
|
756
756
|
);
|
|
757
757
|
|
|
@@ -3,20 +3,19 @@ import path from 'node:path';
|
|
|
3
3
|
import { describe, expect, it } from 'vitest';
|
|
4
4
|
|
|
5
5
|
describe('template subscription-started source', () => {
|
|
6
|
-
it('uses the shared runtime handoff screen
|
|
6
|
+
it('uses the shared runtime handoff screen without browser-owned checkout analytics', () => {
|
|
7
7
|
const stepSource = readFileSync(
|
|
8
|
-
path.resolve(__dirname, '
|
|
8
|
+
path.resolve(__dirname, '../../../src/steps/step-33-subscription-started.tsx'),
|
|
9
9
|
'utf8',
|
|
10
10
|
);
|
|
11
11
|
|
|
12
12
|
expect(stepSource).toContain('SubscriptionHandoffScreen');
|
|
13
13
|
expect(stepSource).toContain("completionMode='funnel'");
|
|
14
|
-
expect(stepSource).toContain('stepContractVersion: funnelManifest.stepContractVersion');
|
|
15
14
|
expect(stepSource).toContain("type: 'purchase_completed'");
|
|
16
|
-
expect(stepSource).toContain(
|
|
17
|
-
expect(stepSource).toContain('publicAnalyticsSdk
|
|
18
|
-
expect(stepSource).toContain(
|
|
19
|
-
expect(stepSource).toContain(
|
|
15
|
+
expect(stepSource).not.toContain('@funnelsgrove/analytics');
|
|
16
|
+
expect(stepSource).not.toContain('publicAnalyticsSdk');
|
|
17
|
+
expect(stepSource).not.toContain("searchParams.get('payment_intent')");
|
|
18
|
+
expect(stepSource).not.toContain("searchParams.get('redirect_status')");
|
|
20
19
|
expect(stepSource).not.toContain("eventType: redirectStatus === 'succeeded'");
|
|
21
20
|
expect(stepSource).not.toContain('trackPurchaseCompleted');
|
|
22
21
|
expect(stepSource).not.toContain("searchParams.get('userId')");
|
|
@@ -5,15 +5,15 @@ import { describe, expect, it } from 'vitest';
|
|
|
5
5
|
describe('template cleanup', () => {
|
|
6
6
|
it('keeps upsell removed while preserving the duplicate paywall variant', () => {
|
|
7
7
|
const manifestSource = readFileSync(
|
|
8
|
-
path.resolve(__dirname, '
|
|
8
|
+
path.resolve(__dirname, '../../../src/config/funnel.manifest.ts'),
|
|
9
9
|
'utf8',
|
|
10
10
|
);
|
|
11
11
|
const registrySource = readFileSync(
|
|
12
|
-
path.resolve(__dirname, '
|
|
12
|
+
path.resolve(__dirname, '../../../src/runtime/step-registry.ts'),
|
|
13
13
|
'utf8',
|
|
14
14
|
);
|
|
15
15
|
const contentRegistrySource = readFileSync(
|
|
16
|
-
path.resolve(__dirname, '
|
|
16
|
+
path.resolve(__dirname, '../../../src/steps/step-content.registry.ts'),
|
|
17
17
|
'utf8',
|
|
18
18
|
);
|
|
19
19
|
|
|
@@ -12,7 +12,7 @@ const stepFiles = [
|
|
|
12
12
|
describe('funnel-template step image migration', () => {
|
|
13
13
|
it('does not leave raw img tags in migrated steps', () => {
|
|
14
14
|
for (const fileName of stepFiles) {
|
|
15
|
-
const filePath = path.resolve(__dirname, fileName);
|
|
15
|
+
const filePath = path.resolve(__dirname, '../../../src/steps', fileName);
|
|
16
16
|
const source = readFileSync(filePath, 'utf8');
|
|
17
17
|
expect(source).not.toContain('<img');
|
|
18
18
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|