22 lines
965 B
TypeScript
22 lines
965 B
TypeScript
import { test, expect } from '@playwright/test'
|
|
import { uiLogin } from '../utils/auth'
|
|
|
|
test.describe('工作台 Agent 快捷指令执行面板', () => {
|
|
test('执行「生成本周报告」打开执行流面板并渲染 SSE 事件', async ({ page }) => {
|
|
await uiLogin(page)
|
|
await page.goto('/dashboard')
|
|
await expect(page.getByText('Agent 快捷指令')).toBeVisible()
|
|
|
|
const input = page.getByPlaceholder(/例如:查找知识库/)
|
|
await input.fill('生成本周指摘处理统计报告')
|
|
await page.getByRole('button', { name: /执\s*行/ }).click()
|
|
|
|
await expect(page.getByText(/Agent 执行流/)).toBeVisible({ timeout: 30000 })
|
|
await expect(page.getByText(/指令已提交,正在连接执行流/)).toBeVisible({ timeout: 30000 })
|
|
|
|
await expect(page.getByText(/已连接执行流/)).toBeVisible({ timeout: 60000 })
|
|
|
|
const execBox = page.getByText(/Agent 执行流/)
|
|
await expect(execBox).toBeVisible()
|
|
})
|
|
}) |