feat(payment): confirm renewal only at checkout
This commit is contained in:
@@ -223,19 +223,11 @@ test("Indonesia VIP defaults to QRIS and completes after status polling", async
|
||||
"true",
|
||||
);
|
||||
const checkoutButton = page.getByRole("button", { name: "Pay and Top Up" });
|
||||
await expect(checkoutButton).toBeDisabled();
|
||||
await expectCheckoutButtonLayout(page);
|
||||
|
||||
await page.getByRole("button", { name: /Monthly, 195900 IDR/i }).click();
|
||||
const renewalDialog = page.getByRole("dialog", {
|
||||
name: "Automatic Renewal Confirmation",
|
||||
});
|
||||
await expect(renewalDialog).toBeVisible();
|
||||
expect(payment.getCreateOrderCount()).toBe(0);
|
||||
|
||||
await renewalDialog.getByRole("button", { name: "Confirm" }).click();
|
||||
await expect(renewalDialog).toBeHidden();
|
||||
await expect(checkoutButton).toBeEnabled();
|
||||
await expectCheckoutButtonLayout(page);
|
||||
await expect(
|
||||
page.getByRole("dialog", { name: "Automatic Renewal Confirmation" }),
|
||||
).toHaveCount(0);
|
||||
expect(payment.getCreateOrderCount()).toBe(0);
|
||||
|
||||
const orderId = await expectQrisOrder(
|
||||
|
||||
Reference in New Issue
Block a user