агенты: добавить поиск инструментов по каталогу

This commit is contained in:
2026-07-21 13:12:46 +03:00
parent 63f8ee333f
commit 99bd05c145
35 changed files with 2088 additions and 155 deletions
+23
View File
@@ -21,3 +21,26 @@ test('agents page shows demo cards and edit drawer opens', async ({ page }) => {
);
await expect(page.locator('.drawer')).toContainText(/mcp/i);
});
test('agent drawer configures on-demand tool discovery and catalog sections', async ({ page }) => {
await login(page);
await page.goto('/agents');
await page.getByRole('button', { name: localized('New agent', 'Новый агент') }).click();
await page.locator('.ops-picker-item').first().click();
await page.locator('.tool-access-option').nth(1).click();
await expect(page.locator('.tool-search-config')).toBeVisible();
await page.getByRole('button', { name: localized('Add section', 'Добавить раздел') }).click();
const group = page.locator('.tool-group-card').first();
await group.locator('input').nth(0).fill('Finance');
await group.locator('input').nth(1).fill('finance');
await group.locator('textarea').fill('Invoices, payments and refunds');
await expect(group.locator('input').nth(1)).toHaveValue('finance');
await expect(page.locator('.tool-search-preview')).toBeVisible();
await page.locator('.tool-group-chip').first().click();
await page.locator('.tool-search-preview input').fill('currency rate');
await page.locator('.tool-search-preview .btn-primary-sm').click();
await expect(page.locator('.tool-search-result').first()).toBeVisible();
});