feat: add versioned research templates and alpha variants

This commit is contained in:
yuxuanhui
2026-09-08 21:29:21 +08:00
parent b604e6050e
commit f89ae211d2
55 changed files with 5650 additions and 435 deletions
+10 -4
View File
@@ -15,7 +15,8 @@ test("account → scoped sync → research → resync → PnL → filtered expor
await expect(page.getByText("用户名或密码不正确")).toBeVisible();
await page.getByLabel("密码", { exact: true }).fill("browser-test-password");
await page.getByRole("button", { name: "进入工作空间" }).click();
await page.getByRole("button", { name: "个人信息", exact: true }).click();
await page.getByRole("button", { name: "用户菜单", exact: true }).click();
await page.getByRole("button", { name: "查看个人信息", exact: true }).click();
const connectionSettings = page.getByRole("button", {
name: "连接设置",
exact: true,
@@ -81,7 +82,7 @@ test("account → scoped sync → research → resync → PnL → filtered expor
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(".library-stats strong").first()).toHaveText("620");
await expect(page.locator(".table-toolbar .count-pill")).toHaveText("413");
await page.screenshot({
path: "../output/playwright/alpha-library.png",
fullPage: true,
@@ -160,6 +161,7 @@ test("account → scoped sync → research → resync → PnL → filtered expor
expect(contents).toContain("TEST0001");
expect(contents).not.toContain("TEST0000");
expect((contents.match(/TEST\d{4}/g) ?? []).length).toBe(413);
await page.getByRole("button", { name: "用户菜单" }).click();
await page.getByRole("button", { name: "退出登录" }).click();
await expect(
page.getByRole("heading", { name: "登录研究工作空间" }),
@@ -175,7 +177,7 @@ test("batch tags, column visibility, server pagination and saved preferences", a
await page.getByLabel("密码", { exact: true }).fill("browser-test-password");
await page.getByRole("button", { name: "进入工作空间" }).click();
await expect(
page.getByRole("heading", { name: "Alpha 管理", exact: true }),
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) {
@@ -252,11 +254,15 @@ test("batch tags, column visibility, server pagination and saved preferences", a
const firstId = await page.locator(".alpha-link").first().innerText();
await page.locator(".semi-page-item").filter({ hasText: /^2$/ }).click();
await expect(page.locator(".alpha-link").first()).not.toHaveText(firstId);
await page.getByRole("button", { name: "个人信息", exact: true }).click();
await page.getByRole("button", { name: "用户菜单", exact: true }).click();
await page.getByRole("button", { name: "查看个人信息", exact: true }).click();
await expect(page.locator(".account-page .preferences-form")).toHaveCount(0);
await page.getByRole("button", { name: "配置", exact: true }).click();
await page.getByRole("textbox", { name: "显示名称" }).fill("Alpha 研究室");
await page.getByRole("button", { name: "保存偏好", exact: true }).click();
await expect(page.locator(".account-name")).toHaveText("Alpha 研究室");
await page.reload();
await page.getByRole("button", { name: "配置", exact: true }).click();
await expect(page.getByRole("textbox", { name: "显示名称" })).toHaveValue(
"Alpha 研究室",
);