fix(canvas): soften design conversation
This commit is contained in:
1 parent
6a05992e18
commit
bb8a19eecf
6 files changed
+90
-65
No files matched your search
@@ -115,6 +115,10 @@ describe('AI Design Canvas page', () => {
|
||||
render(<ImageCanvas />);
|
||||
|
||||
const conversation = screen.getByTestId('image-workspace-conversation');
|
||||
expect(conversation).toHaveClass('bg-background');
|
||||
expect(conversation).not.toHaveClass('bg-surface-subtle/45');
|
||||
expect(within(conversation).getByTestId('design-message-composer')).toHaveClass('max-w-[50rem]');
|
||||
expect(within(conversation).getByTestId('design-message-composer-surface')).toHaveClass('chat-composer-surface');
|
||||
expect(within(conversation).queryByRole('heading', { name: '和 AI 一起完善创作' })).not.toBeInTheDocument();
|
||||
expect(within(conversation).getByRole('heading', { name: '制作方案' })).toBeInTheDocument();
|
||||
expect(within(conversation).getByRole('textbox', { name: '创作提示词' })).toHaveValue(
|
||||
@@ -317,7 +321,7 @@ describe('AI Design Canvas page', () => {
|
||||
render(<ImageCanvas />);
|
||||
|
||||
const conversation = screen.getByTestId('image-workspace-conversation');
|
||||
expect(within(conversation).getByRole('heading', { name: '先把脑中的画面说出来' })).toBeInTheDocument();
|
||||
expect(within(conversation).getByRole('heading', { name: '你想让麦洛和你一起创作什么?' })).toBeInTheDocument();
|
||||
expect(within(conversation).queryByText('画面想要什么感觉?')).not.toBeInTheDocument();
|
||||
fireEvent.click(within(conversation).getByRole('button', { name: '我想做一张热闹的社团招新海报' }));
|
||||
expect(within(conversation).getByRole('textbox', { name: '告诉 AI 你想创作什么' })).toHaveValue(
|
||||
@@ -381,7 +385,7 @@ describe('AI Design Canvas page', () => {
|
||||
fireEvent.change(screen.getByRole('textbox', { name: '告诉 AI 你想创作什么' }), {
|
||||
target: { value: '画一只会做饭的机器人' },
|
||||
});
|
||||
fireEvent.click(screen.getByRole('button', { name: '发送消息' }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '发送' }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(toastErrorMock).toHaveBeenCalledWith(
|
||||
|
||||
Reference in new issue
Block a user