feat: simplify page ai drawer ui

This commit is contained in:
lix-2026
2026-05-15 03:32:54 +08:00
parent 0fc9fa7551
commit 0e6cf5cf13
4 changed files with 308 additions and 115 deletions
@@ -119,6 +119,8 @@ async function main() {
);
await page.getByTestId("wolai-floating-ai").click({ timeout: UI_TIMEOUT_MS });
await page.locator('.wolai-page-ai-icon[data-page-ai-tab="agent"]').click({ timeout: UI_TIMEOUT_MS });
await page.locator('.wolai-page-ai-panel-section:not([hidden]) [data-page-ai-tab="runtime"]').click({ timeout: UI_TIMEOUT_MS });
await page.waitForFunction(
(expected) => window.__mnoteHermesSettingsUrl === expected,
EXPECTED_SETTINGS_URL,
@@ -132,7 +134,9 @@ async function main() {
const settingsDisabled = await page.locator('[data-page-ai-action="open-hermes-settings"]').isDisabled();
assert.equal(settingsDisabled, false, "配置 Hermes upstream 后设置入口不应禁用");
await page.locator('.wolai-page-ai-panel-section:not([hidden]) [data-page-ai-tab="agent"]').click({ timeout: UI_TIMEOUT_MS });
await page.locator("[data-page-ai-context-scope]").selectOption("options", { timeout: UI_TIMEOUT_MS });
await page.locator('.wolai-page-ai-panel-section:not([hidden]) [data-page-ai-tab="chat"]').click({ timeout: UI_TIMEOUT_MS });
await page.locator("[data-page-ai-input]").fill(`请只读取页面设置 ${title}`, { timeout: UI_TIMEOUT_MS });
await page.locator('[data-page-ai-action="send"]').click({ timeout: UI_TIMEOUT_MS });
await page.waitForFunction(