feat(agents): improve processor creation choice

This commit is contained in:
RockChinQ
2026-08-27 14:31:37 +08:00
parent 823feac7e0
commit 847bfc8df5
6 changed files with 558 additions and 31 deletions
+15
View File
@@ -171,7 +171,22 @@ test.describe('frontend CRUD smoke flows', () => {
await installLangBotApiMocks(page, { authenticated: true });
await page.goto('/home/agents?id=new');
const agentTypeCard = page.locator('[data-processor-kind="agent"]');
const pipelineTypeCard = page.locator('[data-processor-kind="pipeline"]');
await expect(agentTypeCard).toHaveAttribute('data-slot', 'card');
await expect(pipelineTypeCard).toHaveAttribute('data-slot', 'card');
await expect(
agentTypeCard.getByRole('button', { name: /^Agent/ }),
).toHaveAttribute('aria-pressed', 'true');
await expect(page.getByTestId('agent-diagram')).toBeVisible();
await expect(page.getByTestId('pipeline-diagram')).toHaveCount(0);
await page.getByRole('button', { name: /^Pipeline/ }).click();
await expect(
pipelineTypeCard.getByRole('button', { name: /^Pipeline/ }),
).toHaveAttribute('aria-pressed', 'true');
await expect(page.getByTestId('pipeline-diagram')).toBeVisible();
await expect(page.getByTestId('agent-diagram')).toHaveCount(0);
await expect(page.locator('input[name="name"]')).toBeVisible();
await page.locator('input[name="name"]').fill('Escalation Pipeline');