feat(chat): simplify teacher pane and color follow-up cards
This commit is contained in:
@@ -1796,7 +1796,8 @@ test('project consultations preserve student drafts and switch between work and
|
||||
await page.getByRole('button',{name:'与朋友聊天',exact:true}).click();
|
||||
const teacher=page.getByTestId('teacher-chat-panel');
|
||||
await expect(page.getByTestId('teacher-introduction')).toHaveCount(0);
|
||||
await expect(teacher.locator('header').getByRole('button')).toHaveCount(0);
|
||||
await expect(teacher).toHaveAccessibleName('朋友咨询');
|
||||
await expect(teacher.locator('header')).toHaveCount(0);
|
||||
await expect(teacher.getByText('陪你听听玩家的想法,让作品更有趣。')).toHaveCount(0);
|
||||
await expect(page.getByRole('tab',{name:'作品',exact:true})).toHaveAttribute('aria-selected','true');
|
||||
await expect(page.getByRole('tabpanel',{name:'作品',exact:true})).toBeVisible();
|
||||
@@ -1833,7 +1834,7 @@ test('project consultations preserve student drafts and switch between work and
|
||||
await expect(teacher).toHaveCount(0);
|
||||
await expect(page.getByRole('button',{name:'与朋友聊天',exact:true})).toBeFocused();
|
||||
await page.getByRole('button', { name: '与代码智能体聊天' }).click();
|
||||
await expect(teacher.getByRole('heading', { name: '代码智能体' })).toBeVisible();
|
||||
await expect(teacher).toHaveAccessibleName('代码智能体咨询');
|
||||
await expect(teacher.getByRole('textbox', { name: '向智能体提问' })).toHaveValue('');
|
||||
await teacher.getByRole('textbox', { name: '向智能体提问' }).fill('另一个智能体的草稿');
|
||||
await page.getByRole('button',{name:'与朋友聊天',exact:true}).click();
|
||||
@@ -1849,7 +1850,7 @@ test('project consultations preserve student drafts and switch between work and
|
||||
const consultationRequests=requests.filter(item=>item.path.endsWith('/messages')&&item.method==='POST');
|
||||
expect(consultationRequests).toHaveLength(3);
|
||||
expect(requests.find(item => item.path.endsWith('/agent-topics') && item.method === 'POST')?.body?.teacherVersion).toBe(9);
|
||||
await expect(teacher.getByRole('heading', { name: '朋友', exact: true })).toBeVisible();
|
||||
await expect(teacher).toHaveAccessibleName('朋友咨询');
|
||||
expect(consultationRequests[0].body).toMatchObject({intent:'suggestions',text:'帮我看看'});
|
||||
expect(consultationRequests[1].body).toMatchObject({text:'怎样观察别人玩游戏?'});
|
||||
expect(consultationRequests[1].body?.intent).toBeUndefined();
|
||||
|
||||
Reference in New Issue
Block a user