feat(tip): refine single-screen payment layout
This commit is contained in:
@@ -62,6 +62,28 @@ describe("PaymentMethodSelector", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("renders compact controls without the caption", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<PaymentMethodSelector
|
||||
config={{
|
||||
canChoosePaymentMethod: true,
|
||||
initialPayChannel: "ezpay",
|
||||
showPaymentMethodSelector: true,
|
||||
}}
|
||||
value="ezpay"
|
||||
density="compact"
|
||||
caption="This caption is hidden"
|
||||
analyticsKey="tip.payment_method"
|
||||
onChange={() => undefined}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain('data-density="compact"');
|
||||
expect(html).toContain("Payment Method");
|
||||
expect(html).not.toContain("This caption is hidden");
|
||||
expect(html).toContain("min-h-11");
|
||||
});
|
||||
|
||||
it("does not render when payment method selection is unavailable", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<PaymentMethodSelector
|
||||
|
||||
Reference in New Issue
Block a user