|
|
@@ -194,41 +194,41 @@ test('edits every protocol v5 Agent setting with one inspector close control', a
|
|
|
await expect(page.getByRole('button', { name: '关闭团队管理' })).toHaveCount(1)
|
|
|
await expect(page.getByRole('button', { name: '关闭预览' })).toHaveCount(0)
|
|
|
await expect(page.getByLabel('最多回复轮数')).toHaveValue('-1')
|
|
|
- await page.getByRole('button', { name: '设置夭夭' }).click()
|
|
|
+ await page.getByRole('button', { name: '设置瑶儿' }).click()
|
|
|
|
|
|
- const editor = page.getByRole('dialog', { name: '夭夭 Agent 设置' })
|
|
|
+ const editor = page.getByRole('dialog', { name: '瑶儿 Agent 设置' })
|
|
|
await expect(page.locator('.group-manager .agent-editor')).toHaveCount(0)
|
|
|
- await expect(editor.getByLabel('显示名称')).toHaveValue('夭夭')
|
|
|
- await expect(editor.getByLabel('职责说明')).toHaveValue('主 Agent')
|
|
|
+ await expect(editor.getByLabel('群内名称')).toHaveValue('瑶儿')
|
|
|
+ await expect(editor.getByLabel('职责说明')).toHaveValue('评审 Agent')
|
|
|
await expect(editor.getByLabel('模型')).toHaveValue(JSON.stringify(['openai', 'gpt-5.6']))
|
|
|
- await expect(editor.getByLabel('推理强度')).toHaveValue('high')
|
|
|
- await expect(editor.getByLabel('快速模式')).toHaveValue('true')
|
|
|
+ await expect(editor.getByLabel('推理强度')).toHaveValue('medium')
|
|
|
+ await expect(editor.getByLabel('快速模式')).toHaveValue('false')
|
|
|
|
|
|
- await editor.getByLabel('显示名称').fill('所有人')
|
|
|
+ await editor.getByLabel('群内名称').fill('所有人')
|
|
|
const rejectedResponse = page.waitForResponse(response => response.request().method() === 'PATCH' && /\/api\/app\/groups\/rooms\/[^/]+\/agents\/[^/]+$/.test(new URL(response.url()).pathname))
|
|
|
await editor.getByRole('button', { name: '保存 Agent 设置' }).click()
|
|
|
expect((await rejectedResponse).status()).toBe(409)
|
|
|
await expect(editor.getByRole('alert')).toContainText('成员名称不能使用“所有人”')
|
|
|
await editor.getByRole('button', { name: '关闭 Agent 设置' }).click()
|
|
|
- await page.getByRole('button', { name: '设置夭夭' }).click()
|
|
|
- await expect(editor.getByLabel('显示名称')).toHaveValue('所有人')
|
|
|
- await editor.getByLabel('显示名称').fill('夭夭')
|
|
|
+ await page.getByRole('button', { name: '设置瑶儿' }).click()
|
|
|
+ await expect(editor.getByLabel('群内名称')).toHaveValue('所有人')
|
|
|
+ await editor.getByLabel('群内名称').fill('瑶儿')
|
|
|
|
|
|
await editor.getByLabel('模型').selectOption(JSON.stringify(['openai', 'gpt-5.5']))
|
|
|
await editor.getByLabel('推理强度').selectOption('xhigh')
|
|
|
- await editor.getByLabel('快速模式').selectOption('false')
|
|
|
- await editor.getByLabel('无需 @ 也回复').uncheck()
|
|
|
+ await editor.getByLabel('快速模式').selectOption('true')
|
|
|
+ await editor.getByLabel('无需 @ 也回复').check()
|
|
|
const updateRequest = page.waitForRequest(request => request.method() === 'PATCH' && /\/api\/app\/groups\/rooms\/[^/]+\/agents\/[^/]+$/.test(new URL(request.url()).pathname))
|
|
|
await editor.getByRole('button', { name: '保存 Agent 设置' }).click()
|
|
|
expect((await updateRequest).postDataJSON()).toMatchObject({
|
|
|
- model: 'gpt-5.5', provider: 'openai', reasoningEffort: 'xhigh', fastMode: false, replyWithoutMention: false,
|
|
|
+ model: 'gpt-5.5', provider: 'openai', reasoningEffort: 'xhigh', fastMode: true, replyWithoutMention: true,
|
|
|
})
|
|
|
await expect(editor.getByLabel('模型')).toHaveValue(JSON.stringify(['openai', 'gpt-5.5']))
|
|
|
|
|
|
await editor.getByLabel('模型').selectOption(JSON.stringify(['openai', 'gpt-5.6']))
|
|
|
- await editor.getByLabel('推理强度').selectOption('high')
|
|
|
- await editor.getByLabel('快速模式').selectOption('true')
|
|
|
- await editor.getByLabel('无需 @ 也回复').check()
|
|
|
+ await editor.getByLabel('推理强度').selectOption('medium')
|
|
|
+ await editor.getByLabel('快速模式').selectOption('false')
|
|
|
+ await editor.getByLabel('无需 @ 也回复').uncheck()
|
|
|
const restoreResponse = page.waitForResponse(response => response.request().method() === 'PATCH' && /\/api\/app\/groups\/rooms\/[^/]+\/agents\/[^/]+$/.test(new URL(response.url()).pathname))
|
|
|
await editor.getByRole('button', { name: '保存 Agent 设置' }).click()
|
|
|
expect((await restoreResponse).status()).toBe(200)
|
|
|
@@ -758,8 +758,9 @@ test('renders context compaction as a collapsed timeline event', async ({ page }
|
|
|
|
|
|
test('renders model changes as a collapsed system event', async ({ page }) => {
|
|
|
await page.goto('/chat/session-demo')
|
|
|
- await expect(page.getByText('模型已切换:gpt-5.6-terra', { exact: true })).toBeVisible()
|
|
|
- await expect(page.locator('.system-event')).not.toHaveAttribute('open', '')
|
|
|
+ const modelEvent = page.locator('.system-event').filter({ hasText: '模型已切换:gpt-5.6-terra' })
|
|
|
+ await expect(modelEvent.getByText('模型已切换:gpt-5.6-terra', { exact: true })).toBeVisible()
|
|
|
+ await expect(modelEvent).not.toHaveAttribute('open', '')
|
|
|
})
|
|
|
|
|
|
test('opens a local message file link as a floating preview card', async ({ page }) => {
|