feat: add creative welcome and external works square links
This commit is contained in:
@@ -29,7 +29,7 @@ test('retry stickers stay readable and preserve drafts in a 319px consultation',
|
||||
const panel = page.getByTestId('teacher-chat-panel');
|
||||
const retry = panel.locator('.consultation-retry');
|
||||
await expect(retry).toBeEnabled();
|
||||
await expect(retry).toHaveText('不知道问什么,你先帮我看看👀');
|
||||
await expect(retry).toHaveText('帮我整体看🧠');
|
||||
expect(await retry.evaluate(el => el.scrollWidth <= el.clientWidth)).toBe(true);
|
||||
const [panelBounds, retryBounds] = await Promise.all([panel.boundingBox(), retry.boundingBox()]);
|
||||
expect(retryBounds!.x).toBeGreaterThanOrEqual(panelBounds!.x);
|
||||
@@ -41,7 +41,7 @@ test('retry stickers stay readable and preserve drafts in a 319px consultation',
|
||||
await expect(page.getByText('我们可以先从一个小地方开始。')).toBeVisible();
|
||||
await expect(input).toHaveValue('我还有一点自己的想法');
|
||||
expect(await page.evaluate(() => (window as unknown as { __teacherReplyInputs: unknown[] }).__teacherReplyInputs)).toEqual([
|
||||
{ requestId: expect.any(String), text: '不知道问什么,你先帮我看看👀', intent: 'suggestions', references: [], projectId: 'fixture', sourceConversationId: 'source' },
|
||||
{ requestId: expect.any(String), text: '帮我整体看🧠', intent: 'suggestions', references: [], projectId: 'fixture', sourceConversationId: 'source' },
|
||||
]);
|
||||
}
|
||||
});
|
||||
@@ -89,7 +89,7 @@ for (const width of [319, 508]) {
|
||||
const send = page.getByRole('button', { name: '提问', exact: true });
|
||||
const sent = () => page.evaluate(() => (window as unknown as { __teacherReplyInputs: unknown[] }).__teacherReplyInputs);
|
||||
await expect(hint).toBeEnabled();
|
||||
await expect(hint).toHaveText('不知道问什么,你先帮我看看👀');
|
||||
await expect(hint).toHaveText('帮我整体看🧠');
|
||||
expect(await hint.evaluate(el => el.scrollWidth <= el.clientWidth && el.scrollHeight <= el.clientHeight)).toBe(true);
|
||||
await expect(hint).toHaveCSS('background-color', 'rgb(255, 242, 201)');
|
||||
const initialSend = (await send.boundingBox())!;
|
||||
@@ -110,9 +110,9 @@ for (const width of [319, 508]) {
|
||||
expect(await sent()).toEqual([]);
|
||||
await hint.click();
|
||||
await expect(page.getByText('我们可以先从一个小地方开始。')).toBeVisible();
|
||||
expect(await sent()).toEqual([{ requestId: expect.any(String), text: '不知道问什么,你先帮我看看👀', intent: 'suggestions', references: [], projectId: 'fixture', sourceConversationId: 'source' }]);
|
||||
expect(await sent()).toEqual([{ requestId: expect.any(String), text: '帮我整体看🧠', intent: 'suggestions', references: [], projectId: 'fixture', sourceConversationId: 'source' }]);
|
||||
await expect(page.getByRole('button', { name: '我也说不清,你带我看看', exact: true })).toHaveCount(0);
|
||||
await expect(page.locator('.consultation-messages').getByRole('button', { name: '不知道问什么,你先帮我看看👀', exact: true })).toHaveCount(0);
|
||||
await expect(page.locator('.consultation-messages').getByRole('button', { name: '帮我整体看🧠', exact: true })).toHaveCount(0);
|
||||
const card = page.getByRole('button', { name: '可以从哪个小地方开始?' });
|
||||
await expect(card).toBeVisible();
|
||||
await input.fill('留着我自己的草稿');
|
||||
|
||||
Reference in New Issue
Block a user