diff --git a/frontend/src/pages/AlphaPage.tsx b/frontend/src/pages/AlphaPage.tsx
index 88afa74..5a74364 100644
--- a/frontend/src/pages/AlphaPage.tsx
+++ b/frontend/src/pages/AlphaPage.tsx
@@ -1013,6 +1013,16 @@ export function AlphaPage({
aria-label="Alpha 表格工具栏"
>
+
}
+ theme="borderless"
+ type="tertiary"
+ aria-label="刷新 Alpha 列表"
+ title="按当前条件刷新列表"
+ loading={loading}
+ disabled={loading}
+ onClick={refresh}
+ />
{
let params = new URLSearchParams();
+ let searches = 0;
await page.route(/\/api\/v1\/alphas\?/, async (route) => {
+ searches += 1;
params = new URL(route.request().url()).searchParams;
await route.fulfill({
json: { items: [], total: 0, limit: 25, offset: 0 },
@@ -21,9 +23,7 @@ test("local correlation filters combine with tabs and survive saved views", asyn
await page
.getByRole("textbox", { name: "搜索 Alpha", exact: true })
.fill("candidate");
- await page
- .getByText("全部状态", { exact: true })
- .click();
+ await page.getByText("全部状态", { exact: true }).click();
await page.getByRole("option", { name: /相关性偏高/ }).click();
await page.getByText("更多筛选", { exact: true }).click();
await page
@@ -51,6 +51,17 @@ test("local correlation filters combine with tabs and survive saved views", asyn
expect(params.get("local_correlation_status")).toBe("high");
expect(params.get("local_correlation_min")).toBe("0.7");
expect(params.get("local_correlation_max")).toBe("0.75");
+ const refresh = page.getByRole("button", {
+ name: "刷新 Alpha 列表",
+ exact: true,
+ });
+ await expect(refresh).toBeEnabled();
+ const before = searches;
+ const savedQuery = params.toString();
+ await refresh.click();
+ await expect.poll(() => searches).toBeGreaterThan(before);
+ expect(params.toString()).toBe(savedQuery);
+ await expect(saved).toHaveAttribute("aria-selected", "true");
await blocked.click();
await page.getByRole("button", { name: "筛选 Alpha", exact: true }).click();
await page.getByRole("button", { name: "重置", exact: true }).click();