feat(payment): confirm renewal only at checkout
This commit is contained in:
@@ -71,7 +71,14 @@ describe("subscription payment dialogs", () => {
|
||||
expect(dialog?.textContent).toContain("Automatic Renewal Confirmation");
|
||||
expect(dialog?.textContent).toContain("Monthly");
|
||||
expect(dialog?.textContent).toContain("19.90 usd");
|
||||
expect(dialog?.querySelectorAll("a")).toHaveLength(2);
|
||||
expect(
|
||||
Array.from(dialog?.querySelectorAll("a") ?? []).map((link) =>
|
||||
link.getAttribute("href"),
|
||||
),
|
||||
).toEqual([
|
||||
"/legal/vip-membership-benefits.html",
|
||||
"/legal/automatic-renewal.html",
|
||||
]);
|
||||
|
||||
act(() => clickButton(dialog, "Confirm"));
|
||||
expect(onConfirm).toHaveBeenCalledOnce();
|
||||
|
||||
Reference in New Issue
Block a user