feat(payment): support user-bound seven-discount offers
This commit is contained in:
@@ -23,4 +23,23 @@ describe("CommercialActionCard", () => {
|
||||
expect(html).toContain("Open private zone");
|
||||
expect(html).toContain('aria-label="Dismiss offer"');
|
||||
});
|
||||
|
||||
it("renders a consent-first discount action without a checkout URL", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<CommercialActionCard
|
||||
action={{
|
||||
actionId: "offer-1",
|
||||
type: "discountOffer",
|
||||
copy: "Want me to ask for my best private offer?",
|
||||
ctaLabel: "Yes, ask for me",
|
||||
target: "discountConsent",
|
||||
ruleId: "discount_after_price_objection",
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain('data-commercial-action="discountOffer"');
|
||||
expect(html).toContain("Yes, ask for me");
|
||||
expect(html).not.toContain("/subscription");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user