feat: show reset credits publicly

This commit is contained in:
2026-08-22 10:06:48 +08:00
parent 6a711c1fff
commit 54e20f7b8c
7 changed files with 24 additions and 21 deletions
+6
View File
@@ -217,6 +217,10 @@ test("shows a read-only overview before login", async ({ page }) => {
connected: true,
},
limits: [],
resetCredits: {
availableCount: 2,
expiresAt: [1_784_246_400],
},
summary: {},
usage: [],
fetchedAt: 1_900_000_000,
@@ -235,6 +239,8 @@ test("shows a read-only overview before login", async ({ page }) => {
const account = page.locator('[data-account-id="1"]');
await account.getByRole("button", { name: "展开默认账号详情" }).click();
await expect(account.getByText("登录后查看")).toBeVisible();
await expect(account.getByTestId("reset-credits")).toContainText("可用 2 张");
await expect(account.getByTestId("reset-credits")).toContainText("到期时间");
await expect(account.locator(".account-detail .refresh")).toHaveCount(0);
await page.goto("/settings");