test(smoke): 智能体抽屉历史用例起始页改用日志页

/console/audit 已跳转到 /console/logs?type=audit(且丢掉 ?mock=1),
断言路径仍是 /console/audit 必然失败;改从日志页起步,断言打开会话后路径不变。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-06 19:34:07 +08:00
1 parent 14cb2c4c7e
commit 169d9e5e7c
1 file changed
+4 -2
+4 -2
View File
@@ -275,7 +275,9 @@ async function main() {
const t0 = Date.now();
try {
await page.goto("about:blank");
await page.goto(`${BASE}/console/audit?mock=1`, { waitUntil: "networkidle", timeout: 30_000 });
// 起始页用不跳转的日志页(/console/audit 已并进日志页,会跳到 /console/logs?type=audit 且丢掉 ?mock=1)
await page.goto(`${BASE}/console/logs?type=audit&mock=1`, { waitUntil: "networkidle", timeout: 30_000 });
const startPath = new URL(page.url()).pathname;
const launcher = page.locator("[data-agent-launcher]:visible").last();
await launcher.click();
await page.getByRole("button", { name: "历史会话" }).click();
@@ -288,7 +290,7 @@ async function main() {
// 等历史弹层退场后再按 Escape,避免按键被仍在退场的 Popover 消耗。
await list.waitFor({ state: "hidden", timeout: 5_000 });
await page.getByRole("button", { name: "新对话" }).and(page.locator(":enabled")).waitFor({ timeout: 10_000 });
if (new URL(page.url()).pathname !== "/console/audit") problems.push("点历史会话跳走了页面");
if (new URL(page.url()).pathname !== startPath) problems.push("点历史会话跳走了页面");
await page.keyboard.press("Escape");
await page.locator('[data-slot="sheet-content"]').waitFor({ state: "hidden", timeout: 5_000 });
await launcher.click();