fix(canvas): soften design conversation
This commit is contained in:
@@ -356,6 +356,9 @@ test.describe('AI Design V2 workspace', () => {
|
||||
await page.getByTestId('ai-module-option-painting').click();
|
||||
await expect(page.getByTestId('image-workspace')).toBeVisible();
|
||||
await expect(page.getByTestId('image-workspace-conversation')).toBeVisible();
|
||||
await expect(page.getByTestId('image-workspace-conversation')).toHaveClass(/bg-background/);
|
||||
await expect(page.getByTestId('design-message-composer')).toHaveClass(/max-w-\[50rem\]/);
|
||||
await expect(page.getByTestId('design-message-composer-surface')).toHaveClass(/chat-composer-surface/);
|
||||
await expect(page.getByTestId('sidebar-image-workspace')).toBeVisible();
|
||||
await expect(page.getByTestId('image-workspace-history-rail')).toBeVisible();
|
||||
await expect(page.getByTestId('image-workspace-works-rail')).toHaveCount(0);
|
||||
@@ -365,6 +368,7 @@ test.describe('AI Design V2 workspace', () => {
|
||||
await expect(page.getByText('实时同步')).toHaveCount(0);
|
||||
await expect(page.getByRole('button', { name: '刷新作品' })).toHaveCount(0);
|
||||
await expect(page.getByRole('heading', { name: '制作方案' })).toBeVisible();
|
||||
await expect(page.getByTestId('youth-creation-card')).not.toHaveClass(/border|shadow-sm/);
|
||||
await expect(page.getByRole('textbox', { name: '创作提示词' })).toHaveValue(
|
||||
'把便携咖啡机呈现为城市通勤中的精密工具',
|
||||
);
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -120,9 +120,11 @@ describe('YouthCreationCard', () => {
|
||||
useImageWorkspaceStore.getState().reset();
|
||||
});
|
||||
|
||||
it('puts the editable creator prompt and compact visible parameters in one plan card', () => {
|
||||
it('keeps the editable prompt and visible parameters in a lightweight inline plan', () => {
|
||||
renderCard();
|
||||
|
||||
expect(screen.getByTestId('youth-creation-card')).toHaveClass('py-2');
|
||||
expect(screen.getByTestId('youth-creation-card')).not.toHaveClass('border', 'shadow-sm');
|
||||
expect(screen.getByRole('heading', { name: '制作方案' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('textbox', { name: '创作提示词' })).toHaveValue(
|
||||
'把便携咖啡机呈现为城市通勤中的精密工具',
|
||||
@@ -131,6 +133,7 @@ describe('YouthCreationCard', () => {
|
||||
expect(screen.getByRole('combobox', { name: '画幅' })).toHaveValue('3:4');
|
||||
expect(screen.getByRole('button', { name: '增加数量' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '准备制作方案' })).toBeInTheDocument();
|
||||
expect(screen.queryByRole('region', { name: '参考图' })).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('查看画面细节')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('手动调整')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user