feat: show available reset credits
This commit is contained in:
@@ -106,6 +106,10 @@ test("shows every account as a collapsible summary on the overview", async ({
|
||||
currentStreakDays: 4,
|
||||
longestRunningTurnSec: 80,
|
||||
},
|
||||
resetCredits: {
|
||||
availableCount: 2,
|
||||
expiresAt: [1_784_246_400],
|
||||
},
|
||||
usage: [{ date: "2026-08-13", totalTokens: 3_000 }],
|
||||
fetchedAt: 1_900_000_000,
|
||||
stale: false,
|
||||
@@ -175,6 +179,9 @@ test("shows every account as a collapsible summary on the overview", async ({
|
||||
).toBeVisible();
|
||||
await expect(first.getByText("本周期 Tokens")).toBeVisible();
|
||||
await expect(first.getByText("本周期单日峰值")).toBeVisible();
|
||||
await expect(first.getByTestId("reset-credits")).toContainText("重置卡");
|
||||
await expect(first.getByTestId("reset-credits")).toContainText("可用 2 张");
|
||||
await expect(first.getByTestId("reset-credits")).toContainText("到期时间");
|
||||
await expect(first.getByText("连续使用", { exact: true })).toHaveCount(0);
|
||||
await expect(first.getByText("最长任务时长", { exact: true })).toHaveCount(0);
|
||||
await expect(first.getByText("123.5K", { exact: true })).toBeVisible();
|
||||
@@ -183,6 +190,10 @@ test("shows every account as a collapsible summary on the overview", async ({
|
||||
|
||||
await first.getByRole("button", { name: "收起个人账号详情" }).click();
|
||||
await expect(page.locator(".account-detail")).toHaveCount(0);
|
||||
|
||||
const second = page.locator('[data-account-id="2"]');
|
||||
await second.getByRole("button", { name: "展开Team 工作区详情" }).click();
|
||||
await expect(second.getByTestId("reset-credits")).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("shows a read-only overview before login", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user