feat: show current-cycle token totals
This commit is contained in:
@@ -91,6 +91,14 @@ test("shows every account as a collapsible summary on the overview", async ({
|
||||
resetsAt: 1_900_000_000,
|
||||
},
|
||||
],
|
||||
currentCycle: {
|
||||
limitId: "codex",
|
||||
windowType: "secondary",
|
||||
windowDurationMinutes: 10_080,
|
||||
startedAt: 1_899_999_000,
|
||||
resetsAt: 1_900_604_800,
|
||||
totalTokens: 123_456,
|
||||
},
|
||||
summary: {
|
||||
lifetimeTokens: 12_345,
|
||||
peakDailyTokens: 3_000,
|
||||
@@ -151,6 +159,7 @@ test("shows every account as a collapsible summary on the overview", async ({
|
||||
await expect(page.locator(".account-overview")).toHaveCount(2);
|
||||
await expect.poll(() => requestedDashboards.size).toBe(2);
|
||||
await expect(page.getByText("最低 65% 剩余")).toBeVisible();
|
||||
await expect(page.getByText("本周期 123.5K Tokens")).toBeVisible();
|
||||
await expect(page.getByText("限额暂无")).toBeVisible();
|
||||
await expect(page.locator(".account-detail")).toHaveCount(0);
|
||||
await expect(page.locator(".account-select")).toHaveCount(0);
|
||||
@@ -162,6 +171,9 @@ test("shows every account as a collapsible summary on the overview", async ({
|
||||
await expect(
|
||||
first.getByRole("heading", { name: "每日 Token 趋势" }),
|
||||
).toBeVisible();
|
||||
await expect(first.getByText("本周期 Tokens")).toBeVisible();
|
||||
await expect(first.getByText("123.5K", { exact: true })).toBeVisible();
|
||||
await expect(first.getByText("按每日数据汇总")).toBeVisible();
|
||||
await expect(page.locator(".account-detail")).toHaveCount(1);
|
||||
|
||||
await first.getByRole("button", { name: "收起个人账号详情" }).click();
|
||||
|
||||
Reference in New Issue
Block a user