feat: introduce Orven brand and task-focused workspace
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Keep acceptance drivers on the product's real navigation after the Orven redesign.
|
||||
// This opens a visible entry or the searchable toolbox; it never bypasses the UI.
|
||||
export async function openWorkbenchTool(page, name) {
|
||||
const aliases = { '打开模型中心': '选择与管理模型', '项目MCP工具': '项目 MCP 工具' };
|
||||
const direct = page.getByRole('button', { name: aliases[name] ?? name, exact: true });
|
||||
if (await direct.first().isVisible()) { await direct.first().click(); return; }
|
||||
await page.getByRole('button', { name: '打开工具箱', exact: true }).click();
|
||||
const toolbox = page.getByRole('dialog', { name: '工具箱', exact: true });
|
||||
const actionName = name === '打开模型中心' ? '模型中心' : aliases[name] ?? name;
|
||||
await toolbox.getByLabel('搜索工作台工具').fill(actionName);
|
||||
await toolbox.getByRole('button', { name: actionName, exact: true }).click();
|
||||
}
|
||||
Reference in New Issue
Block a user