feat(payment): confirm renewal only at checkout
This commit is contained in:
@@ -74,16 +74,17 @@ test("offers the Facebook external-browser path before creating a Stripe order",
|
||||
});
|
||||
|
||||
await seedEmailSession(page);
|
||||
await page.goto("/subscription?type=vip&payChannel=stripe");
|
||||
await page.goto(
|
||||
"/subscription?type=vip&payChannel=stripe&character=elio",
|
||||
);
|
||||
await page.getByRole("button", { name: /Monthly,/i }).click();
|
||||
await page
|
||||
.getByRole("dialog", { name: "Automatic Renewal Confirmation" })
|
||||
.getByRole("button", { name: "Confirm" })
|
||||
.click();
|
||||
const externalButton = page.getByRole("button", {
|
||||
name: "Open in browser for more payment methods",
|
||||
});
|
||||
await expect(externalButton).toBeVisible();
|
||||
await expect(externalButton).toBeEnabled();
|
||||
await expect(
|
||||
page.getByRole("dialog", { name: "Automatic Renewal Confirmation" }),
|
||||
).toHaveCount(0);
|
||||
const handoffRequest = page.waitForRequest("**/api/auth/handoff/checkout");
|
||||
await externalButton.click();
|
||||
expect((await handoffRequest).postDataJSON()).toMatchObject({
|
||||
|
||||
Reference in New Issue
Block a user