Refine Agent sidebar icons and manual expansion
This commit is contained in:
1 parent
a340c0fd94
commit
ad1d2f261d
7 files changed
+221
-20
No files matched your search
@@ -126,11 +126,28 @@ test('personal cloud Agent identity, configuration and separate published chat i
|
||||
expect(collapseBounds).not.toBeNull();
|
||||
expect(Math.abs(returnBounds!.y - collapseBounds!.y)).toBeLessThanOrEqual(1);
|
||||
expect(returnBounds!.x + returnBounds!.width).toBeLessThan(collapseBounds!.x);
|
||||
await page.screenshot({ path: testInfo.outputPath('cloud-agent-sidebar-icons.png') });
|
||||
await navigation.getByRole('button', { name: '折叠侧栏', exact: true }).click();
|
||||
await page.mouse.move(700, 400);
|
||||
const sidebar = page.getByTestId('sidebar');
|
||||
const sidebarToggle = page.getByTestId('titlebar-sidebar-toggle');
|
||||
await sidebarToggle.hover();
|
||||
await expect(sidebar).toHaveAttribute('aria-hidden', 'true');
|
||||
await expect(sidebarToggle).toHaveAttribute('aria-expanded', 'false');
|
||||
await page.getByTestId('titlebar-sidebar-toggle-layer').hover();
|
||||
await expect(sidebar).toHaveAttribute('aria-hidden', 'true');
|
||||
await page.mouse.move(3, 120);
|
||||
await expect(sidebar).toHaveAttribute('aria-hidden', 'true');
|
||||
await sidebarToggle.focus();
|
||||
await expect(sidebar).toHaveAttribute('aria-hidden', 'true');
|
||||
await expect(navigation.getByRole('button', { name: '返回首页', exact: true })).toBeVisible();
|
||||
await navigation.getByRole('button', { name: /展开侧栏|固定侧栏/ }).click();
|
||||
await expect(navigation.getByRole('button', { name: '展开侧栏', exact: true })).toBeVisible();
|
||||
await sidebarToggle.press('Enter');
|
||||
await expect(page.getByTestId('sidebar-cloud-agents-navigation')).toBeVisible();
|
||||
await expect(sidebarToggle).toHaveAttribute('aria-expanded', 'true');
|
||||
await sidebarToggle.click();
|
||||
await expect(sidebar).toHaveAttribute('aria-hidden', 'true');
|
||||
await sidebarToggle.click();
|
||||
await expect(sidebar).toHaveAttribute('aria-hidden', 'false');
|
||||
const fixtureState = () => app.evaluate(() => Reflect.get(globalThis, '__cloudAgentUiFixture').snapshot());
|
||||
const messageOperations = async () => (await fixtureState()).operations.filter((operation: string) => operation === 'preview' || operation === 'submit');
|
||||
await page.getByRole('button', { name: '创建我的第一个智能体', exact: true }).click();
|
||||
@@ -192,6 +209,7 @@ test('personal cloud Agent identity, configuration and separate published chat i
|
||||
await expect(page.getByText('选它做事时能用的工具。', { exact: true })).toHaveCount(0);
|
||||
await expect(page.getByText('给它一本手册,照着方法做。', { exact: true })).toHaveCount(0);
|
||||
await expect(page.getByText('管理我的云端能力', { exact: true })).toHaveCount(0);
|
||||
await expect(page.getByText('未选择的资源不会开放给此智能体。通过微信或 API 使用时也遵循本配置。', { exact: true })).toHaveCount(0);
|
||||
await expect(page.getByRole('group', { name: /^知识库/ })).toBeVisible();
|
||||
await expect(page.getByRole('heading', { name: '费用上限', exact: true })).toHaveCount(0);
|
||||
await expect(page.getByRole('heading', { name: '运行限制', exact: true })).toHaveCount(0);
|
||||
|
||||
Reference in new issue
Block a user