feat(research): separate template editing and backtest preparation tabs
Deploy production / deploy (push) Successful in 36s

This commit is contained in:
yuxuanhui
2026-09-13 15:09:56 +08:00
parent db449f0915
commit 20f6d0fc51
3 changed files with 362 additions and 245 deletions
+1
View File
@@ -86,6 +86,7 @@ test("feature conversion, saved views and immutable evaluations", async ({
await expect(
page.getByRole("textbox", { name: "模板名称", exact: true }),
).toHaveValue("特征转换模板");
await page.getByRole("tab", { name: "回测准备", exact: true }).click();
const settingsEditor = page.getByRole("region", {
name: "回测参数",
exact: true,
+17 -1
View File
@@ -79,7 +79,7 @@ for (const mode of ["templates", "variants", "features"] as const) {
const hypothesis = "检验 <收益> 与规模\n第二轮保留原始假设";
await input.fill(hypothesis);
await expect(
sheet.locator("p").filter({ hasText: /Semi 准备集合 ·/ }),
sheet.locator("p:visible").filter({ hasText: /Semi 准备集合 ·/ }),
).toBeVisible();
let release!: () => void;
const pending = new Promise<void>((resolve) => {
@@ -148,6 +148,22 @@ for (const mode of ["templates", "variants", "features"] as const) {
sheet.getByRole("textbox", { name: "模板名称", exact: true }),
).toHaveValue("AI 生成验收");
await expect(generate).toBeEnabled();
if (mode === "templates") {
await sheet.getByRole("button", { name: "下一步:回测准备" }).click();
await expect(
sheet.getByRole("textbox", { name: "回测研究假设", exact: true }),
).toHaveValue(hypothesis);
await expect(
sheet.getByRole("button", { name: "生成候选研究集合", exact: true }),
).toBeVisible();
await expect(generate).toBeHidden();
await sheet
.getByRole("tab", { name: "模板信息编辑", exact: true })
.click();
await expect(
sheet.getByRole("textbox", { name: "模板名称", exact: true }),
).toHaveValue("AI 生成验收");
}
await expect(input).toContainText("检验 <收益> 与规模");
await page.screenshot({ path: `../output/playwright/semi-ai-${mode}.png` });
await page.setViewportSize({ width: 390, height: 900 });