From 51e98a7f0e550aa2acf5ff76f84cc637f2ce5d01 Mon Sep 17 00:00:00 2001 From: LegGasai Date: Wed, 11 Nov 2026 17:03:40 +0800 Subject: [PATCH] test(subagent): open the forked child from the Session panel The subagent list moved from the Session header switcher to the Session panel, so the fork divider scenario opens the child from the panel's tree. --- apps/web/tests/subagent-fork-divider.e2e.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/tests/subagent-fork-divider.e2e.ts b/apps/web/tests/subagent-fork-divider.e2e.ts index 149a26817d..6d083d8cd1 100644 --- a/apps/web/tests/subagent-fork-divider.e2e.ts +++ b/apps/web/tests/subagent-fork-divider.e2e.ts @@ -11,7 +11,7 @@ import { expect, it, onTestFailed } from 'vitest' import { parseSessionLog } from '@deepseek-ai/dsh-llm-replay' import type {} from '@deepseek-ai/dsh-subagent' import { launchWebScaffold, selectedSessionFixture, watchConsole } from './scaffold.ts' -import { connectFreshWorkspace, newEnglishPage, saveFailureShot } from './support.ts' +import { connectFreshWorkspace, newEnglishPage, saveFailureShot, showSessionPanel } from './support.ts' const DIR = fileURLToPath(new URL('../../../snapshots/web/subagent-fork-schedule', import.meta.url)) const LABEL = 'Check child reminder refusal' @@ -50,8 +50,8 @@ it('places the inherited-history divider between the parent turn and the child p } finally { await activation.dispose() } - await page.getByRole('button', { name: '1 subagent' }).click() - await page.getByRole('tree', { name: 'Subagent sessions' }).getByRole('treeitem', { name: new RegExp(LABEL) }).click() + const subagents = (await showSessionPanel(page)).locator('[data-session-panel-section="subagents"]') + await subagents.getByRole('tree', { name: 'Subagent sessions' }).getByRole('treeitem', { name: new RegExp(LABEL) }).click() const divider = page.getByRole('separator', { name: 'Inherited history above' }) await divider.waitFor({ timeout: 15_000 }) expect(await divider.count()).toBe(1)