import { expect, type Page } from "@playwright/test" // Automatic routing now asks for an explicit configuration target. export async function selectEditableAgent(page: Page) { const picker = page.getByRole("dialog", { name: "选择要编辑的智能体", exact: true }) const editor = page.getByRole("heading", { name: "编辑智能体", exact: true }) await expect(picker.or(editor)).toBeVisible() if (await picker.isVisible()) await picker.getByRole("option", { name: /^科研助手/ }).click() await expect(editor).toBeVisible() }