test(panel): open subagents from the Session panel in the remaining browser tests
The header's subagent count is gone, so these scenarios reach the catalog through the panel section.
This commit is contained in:
1 parent
5175c04dda
commit
41a2af24e4
5 files changed
+15
-23
No files matched your search
@@ -10,7 +10,7 @@ import type { SessionId } from '@deepseek-ai/dsh-session'
|
||||
import type {} from '@deepseek-ai/dsh-agent'
|
||||
import type {} from '@deepseek-ai/dsh-subagent'
|
||||
import { launchWebScaffold, selectedSessionFixture, webSnapshotMode, type WebScaffold } from './scaffold.ts'
|
||||
import { connectFreshWorkspace, newEnglishPage, openSettings, saveFailureShot } from './support.ts'
|
||||
import { connectFreshWorkspace, newEnglishPage, openSettings, saveFailureShot, showSessionPanel } from './support.ts'
|
||||
|
||||
const BASE_FIXTURE = fileURLToPath(new URL('../../../snapshots/web/live-interactions/session.v3.jsonl', import.meta.url))
|
||||
const LABEL = 'event-sourcing researcher'
|
||||
@@ -104,8 +104,7 @@ describe('web e2e: composer paste routing', () => {
|
||||
parent,
|
||||
})
|
||||
await waitForAgentToSettle(scaffold, started.childId)
|
||||
await page.getByRole('button', { name: '1 subagent', exact: true }).hover()
|
||||
await page.getByRole('treeitem', { name: new RegExp(LABEL) })
|
||||
await (await showSessionPanel(page)).getByRole('treeitem', { name: new RegExp(LABEL) })
|
||||
.getByRole('button', { name: `Open ${LABEL} in sidebar`, exact: true }).click()
|
||||
await page.locator('[data-sidebar-chat] [data-composer-card]').waitFor({ timeout: 15_000 })
|
||||
})
|
||||
|
||||
@@ -24,7 +24,7 @@ import { sessionFixtureName } from '@deepseek-ai/dsh-session-snapshot'
|
||||
import { snapshotSubagentDescriptor } from '@deepseek-ai/dsh-subagent'
|
||||
import { createChatScrollFixture, type ChatScrollFixture } from './chat-scroll-fixture.ts'
|
||||
import { launchWebScaffold, parseSeedFixture, seedSession, watchConsole, webSnapshotMode, type WebScaffold } from './scaffold.ts'
|
||||
import { newEnglishPage, openSettings } from './support.ts'
|
||||
import { newEnglishPage, openSettings, showSessionPanel } from './support.ts'
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@@ -620,10 +620,8 @@ async function prepareWorld(browser: Browser, scenario: Case, scaffold: WebScaff
|
||||
await page.goto(scaffold.authenticatedUrl, { waitUntil: 'load' })
|
||||
await openSessionBySearch(page, parentFixture.markers.user(1))
|
||||
await choosePreferences(page, scenario)
|
||||
const trigger = page.getByRole('button', { name: '1 subagent', exact: true })
|
||||
await trigger.waitFor({ timeout: 15_000 })
|
||||
await trigger.hover()
|
||||
const openAside = page.getByRole('treeitem', { name: new RegExp(CHILD_LABEL) })
|
||||
const panel = await showSessionPanel(page)
|
||||
const openAside = panel.getByRole('treeitem', { name: new RegExp(CHILD_LABEL) })
|
||||
.getByRole('button', { name: /^Open .+ in sidebar$/u })
|
||||
await expect.poll(() => openAside.count()).toBe(1)
|
||||
await openAside.click()
|
||||
|
||||
@@ -48,7 +48,7 @@ import {
|
||||
buildVfsExampleFiles,
|
||||
} from '../../../packages/experimental/webworker-runtime/tests/vfs-example-fixture.ts'
|
||||
import { captureStableAria, compareOrRefreshGolden, webSnapshotMode } from './scaffold.ts'
|
||||
import { expandOwningTurnProcess, newEnglishPage, REPO_ROOT, saveFailureShot } from './support.ts'
|
||||
import { expandOwningTurnProcess, hideSessionPanel, newEnglishPage, REPO_ROOT, saveFailureShot, showSessionPanel } from './support.ts'
|
||||
|
||||
const DIST_ROOT = fileURLToPath(new URL('../dist', import.meta.url))
|
||||
|
||||
@@ -543,13 +543,10 @@ async function bootPreview(site: Site, manifest: ImageManifest, browser: Browser
|
||||
await preview.getByRole('heading', { name: 'Preview Workspace', exact: true }).waitFor({ state: 'visible' })
|
||||
expect(await preview.locator('[data-dockkit-tab-title]').allTextContents()).toEqual(['PREVIEW.md'])
|
||||
|
||||
const subagents = page.getByRole('button', { name: '2 subagents', exact: true })
|
||||
await subagents.waitFor({ timeout: 15_000 })
|
||||
await subagents.hover()
|
||||
const catalog = page.getByRole('tree', { name: 'Subagent sessions' })
|
||||
const catalog = (await showSessionPanel(page)).getByRole('tree', { name: 'Subagent sessions' })
|
||||
await catalog.getByRole('treeitem', { name: /Review preview architecture/ }).waitFor()
|
||||
await catalog.getByRole('treeitem', { name: /Continue preview verification/ }).waitFor()
|
||||
await catalog.press('Escape')
|
||||
await hideSessionPanel(page)
|
||||
|
||||
// Auto-prefetch may already have published the page, and a pointer click can
|
||||
// land on whatever moved under it; activate the control only while it still
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// Replay-binding note: only the PRIMARY script can hang, and scripts bind by
|
||||
// first-call order, so the child issues the composition's first model call
|
||||
// (claiming the overridden primary) and the parent's one UI prompt — needed
|
||||
// so the non-blank parent renders its header catalog — binds to a derived
|
||||
// so the non-blank parent lists its subagents in the Session panel — binds to a derived
|
||||
// child fixture afterwards.
|
||||
import { existsSync } from 'node:fs'
|
||||
import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
acknowledgeReloadConnectionLoss, assertFixtureInventory, captureStableAria, compareOrRefreshGolden,
|
||||
launchWebScaffold, readPersistedEvents, watchConsole, webSnapshotMode, type WebScaffold,
|
||||
} from './scaffold.ts'
|
||||
import { connectFreshWorkspace, newEnglishPage, saveFailureShot } from './support.ts'
|
||||
import { connectFreshWorkspace, newEnglishPage, saveFailureShot, showSessionPanel } from './support.ts'
|
||||
|
||||
const BASE_FIXTURE = fileURLToPath(new URL('../../../snapshots/web/live-interactions/session.v3.jsonl', import.meta.url))
|
||||
|
||||
@@ -171,7 +171,7 @@ describe.skipIf(MODE === 'record')('web e2e: composer interrupt for a running co
|
||||
const warningStart = tripwire.warnings.length
|
||||
await page.reload({ waitUntil: 'load' })
|
||||
await page.waitForSelector('[class*="frame"]', { timeout: 30_000 })
|
||||
await page.getByRole('button', { name: /1 subagent/ }).waitFor({ timeout: 15_000 })
|
||||
await (await showSessionPanel(page)).getByRole('treeitem', { name: new RegExp(LABEL) }).waitFor({ timeout: 15_000 })
|
||||
acknowledgeReloadConnectionLoss(tripwire, warningStart)
|
||||
expect(scaffold.ctx.agents.get(childId)?.status).toBe('running')
|
||||
}, 120_000)
|
||||
@@ -209,8 +209,7 @@ describe.skipIf(MODE === 'record')('web e2e: composer interrupt for a running co
|
||||
await page.reload({ waitUntil: 'load' })
|
||||
await page.waitForSelector('[class*="frame"]', { timeout: 30_000 })
|
||||
acknowledgeReloadConnectionLoss(tripwire, warningStart)
|
||||
await page.getByRole('button', { name: /1 subagent/ }).click()
|
||||
await page.getByRole('treeitem', { name: new RegExp(LABEL) }).press('Enter')
|
||||
await (await showSessionPanel(page)).getByRole('treeitem', { name: new RegExp(LABEL) }).press('Enter')
|
||||
const input = page.locator('[data-composer-input]').first()
|
||||
await input.waitFor({ timeout: 15_000 })
|
||||
await page.getByText(/^Explain event sourcing in one sentence\./)
|
||||
@@ -269,8 +268,7 @@ describe.skipIf(MODE === 'record')('web e2e: composer interrupt for a running co
|
||||
acknowledgeReloadConnectionLoss(tripwire, warningStart)
|
||||
await page.getByRole('navigation', { name: 'Session hierarchy' })
|
||||
.getByRole('button').first().click()
|
||||
await page.getByRole('button', { name: /1 subagent/ }).click()
|
||||
await page.getByRole('treeitem', { name: new RegExp(LABEL) }).press('Enter')
|
||||
await (await showSessionPanel(page)).getByRole('treeitem', { name: new RegExp(LABEL) }).press('Enter')
|
||||
// A live continuable child advertises the ordinary steer-all gesture, so
|
||||
// that placeholder is the composer's accessible name in this window. It
|
||||
// changes back as the queue drains, so later interactions address the
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
} from './scaffold.ts'
|
||||
import {
|
||||
connectFreshWorkspace, expandOwningTurnProcess, expandTurnProcesses, newEnglishPage, REPO_ROOT, saveFailureShot,
|
||||
showSessionPanel,
|
||||
} from './support.ts'
|
||||
|
||||
const MODE = webSnapshotMode()
|
||||
@@ -218,8 +219,7 @@ describe.skipIf(MODE === 'record')('web e2e: durable workflow run in Chat', () =
|
||||
await page.getByText(CHILD_PROMPT, { exact: false }).waitFor()
|
||||
expect(await page.getByRole('button', { name: /^Open Reply with exactly the word/ }).count()).toBe(0)
|
||||
|
||||
await page.getByRole('button', { name: '1 subagent', exact: true }).hover()
|
||||
const catalog = page.getByRole('tree', { name: 'Subagent sessions' })
|
||||
const catalog = (await showSessionPanel(page)).getByRole('tree', { name: 'Subagent sessions' })
|
||||
await catalog.getByRole('treeitem', { name: /snapshot-flow child 1/ }).press('Enter')
|
||||
await page.getByText(CHILD_PROMPT, { exact: true }).waitFor({ timeout: 15_000 })
|
||||
expect(await page.locator('[data-composer-input][contenteditable="true"]').count()).toBe(1)
|
||||
|
||||
Reference in new issue
Block a user