From 46ca7690d367bb5de099f7978d35fbdaad957f01 Mon Sep 17 00:00:00 2001 From: Anbc <49482824+xiaoan17@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:00:47 +0800 Subject: [PATCH] test(dashboard): let the delegation smoke read the real steward source The delegation-search smoke fabricated a 200 answer for /api/chat/app-steward with page.route, so the page never observed the fixture's later source refusal and the "steward conversation is unavailable" alert could not appear. The expectation added with #7526 therefore failed on every run, including runs of unrelated branches. The fixture already installs the real conversation source owner and answers {ok: true, binding_id: null, session_id: null} in its normal state, exactly the payload the route fabricated. Dropping the route lets the page read the real answer, so the refusal and the recovery after it are exercised against the server instead of a stub. Validation: the packaged smoke reproduces the same timeout before the change and passes afterwards; RFC bilingual check passed; loopx canary premerge --from-git-diff green; public boundary scan clean. Signed-off-by: xiaoan17 --- .../dashboard/smoke/delegation-search-browser-smoke.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/presentation/dashboard/smoke/delegation-search-browser-smoke.mjs b/apps/presentation/dashboard/smoke/delegation-search-browser-smoke.mjs index 3a7371fd6d..278c19753a 100644 --- a/apps/presentation/dashboard/smoke/delegation-search-browser-smoke.mjs +++ b/apps/presentation/dashboard/smoke/delegation-search-browser-smoke.mjs @@ -37,8 +37,8 @@ try { await page.addInitScript(() => {if (!localStorage.getItem('loopx-pw-locale')) localStorage.setItem('loopx-pw-locale', 'zh-CN');}); const writes = []; page.on('request', request => {if (request.method() !== 'GET') writes.push(new URL(request.url()).pathname);}); const errors = []; page.on('pageerror', error => errors.push(error.message)); - // This disposable source has manager history, but no original Lark binding. - await page.route('**/api/chat/app-steward', route => route.fulfill({json: {ok: true, binding_id: null, session_id: null}})); + // The fixture serves the conversation source owner, so the page reads the + // real answer. An interception here would hide the later source refusal. await page.goto(ready.origin + '/chat/'); await page.getByRole('navigation', {name: '管家视图'}).getByRole('button', {name: /^(Chat|对话)$/}).click(); await page.getByText('复核迁移说明中的示例', {exact: true}).filter({visible: true}).first().waitFor();