feat: add Super Alpha research, management and MCP workflows
Deploy production / deploy (push) Successful in 56s

This commit is contained in:
yuxuanhui
2026-09-13 12:32:16 +08:00
parent 7c8188df9c
commit e256d6fef1
59 changed files with 3766 additions and 125 deletions
+14 -15
View File
@@ -65,7 +65,7 @@ test("account → scoped sync → research → resync → PnL → filtered expor
async () =>
(
await (
await page.request.get("/api/v1/alphas?submission=UNSUBMITTED")
await page.request.get("/api/v1/alphas?submission=UNSUBMITTED&q=TEST")
).json()
).total,
)
@@ -77,28 +77,26 @@ test("account → scoped sync → research → resync → PnL → filtered expor
await expect
.poll(
async () =>
(await (await page.request.get("/api/v1/alphas")).json()).total,
(await (await page.request.get("/api/v1/alphas?q=TEST")).json()).total,
{ timeout: 20000 },
)
.toBe(620);
await page.keyboard.press("Escape");
await expect(page.locator(".job-panel")).not.toBeVisible();
await page.getByRole("tab", { name: "待提交", exact: true }).click();
await expect(page.locator(".alpha-table-meta .count-pill")).toHaveText("413");
// Alpha 管理 now excludes SUPER; the upstream sync still imports both types.
await expect(page.locator(".alpha-page-view:not([hidden]) .alpha-table-meta .count-pill")).toHaveText("354");
await page.screenshot({
path: "../output/playwright/alpha-library.png",
fullPage: true,
});
await page.getByRole("button", { name: "筛选 Alpha", exact: true }).click();
await page.getByRole("textbox", { name: "搜索 Alpha" }).fill("TEST0007");
await page.getByRole("textbox", { name: "搜索 Alpha" }).fill("TEST0008");
await page.getByRole("button", { name: "查询", exact: true }).click();
await expect(page.locator(".alpha-link")).toHaveCount(1);
await page.locator(".alpha-link").click();
await expect(
page.getByRole("heading", { name: "Selection", exact: true }),
).toBeVisible();
await expect(
page.getByRole("heading", { name: "Combo", exact: true }),
page.getByRole("heading", { name: "表达式", exact: true }),
).toBeVisible();
await page.getByRole("tab", { name: "研究信息" }).click();
await page
@@ -115,7 +113,7 @@ test("account → scoped sync → research → resync → PnL → filtered expor
await expect
.poll(
async () =>
(await (await page.request.get("/api/v1/alphas/TEST0007/pnl")).json())
(await (await page.request.get("/api/v1/alphas/TEST0008/pnl")).json())
.cached,
)
.toBe(true);
@@ -131,7 +129,7 @@ test("account → scoped sync → research → resync → PnL → filtered expor
const job = await (
await page.request.post("/api/v1/sync-jobs", {
headers: { "X-WQ-Request": "1" },
data: { kind: "alpha_refresh", alpha_ids: ["TEST0007"] },
data: { kind: "alpha_refresh", alpha_ids: ["TEST0008"] },
})
).json();
await expect
@@ -143,7 +141,7 @@ test("account → scoped sync → research → resync → PnL → filtered expor
.toBe("completed");
await page.reload();
await page.getByRole("button", { name: "筛选 Alpha", exact: true }).click();
await page.getByRole("textbox", { name: "搜索 Alpha" }).fill("TEST0007");
await page.getByRole("textbox", { name: "搜索 Alpha" }).fill("TEST0008");
await page.getByRole("button", { name: "查询", exact: true }).click();
await expect(page.locator(".alpha-link")).toHaveCount(1);
await page.locator(".alpha-link").click();
@@ -165,13 +163,14 @@ test("account → scoped sync → research → resync → PnL → filtered expor
expect(contents).toContain("TEST0619");
expect(contents).toContain("TEST0001");
expect(contents).not.toContain("TEST0000");
expect((contents.match(/TEST\d{4}/g) ?? []).length).toBe(413);
expect(contents).not.toContain("TEST0007");
expect((contents.match(/TEST\d{4}/g) ?? []).length).toBe(354);
await page.getByRole("button", { name: "用户菜单" }).click();
await page.getByRole("button", { name: "退出登录" }).click();
await expect(
page.getByRole("heading", { name: "登录研究工作空间" }),
).toBeVisible();
expect((await page.request.get("/api/v1/alphas")).status()).toBe(401);
expect((await page.request.get("/api/v1/alphas?q=TEST")).status()).toBe(401);
expect(failures).toEqual([]);
});
@@ -185,7 +184,7 @@ test("batch tags, column visibility, server pagination and saved preferences", a
page.getByRole("tab", { name: "待提交", exact: true }),
).toBeVisible();
// Each test can run alone against the isolated browser acceptance server.
if ((await (await page.request.get("/api/v1/alphas")).json()).total !== 620) {
if ((await (await page.request.get("/api/v1/alphas?q=TEST")).json()).total !== 620) {
const headers = { "X-WQ-Request": "1" };
await page.request.put("/api/v1/account/credentials", {
headers,
@@ -215,7 +214,7 @@ test("batch tags, column visibility, server pagination and saved preferences", a
await expect
.poll(
async () =>
(await (await page.request.get("/api/v1/alphas")).json()).total,
(await (await page.request.get("/api/v1/alphas?q=TEST")).json()).total,
{ timeout: 20000 },
)
.toBe(620);