fix(canvas): block invalid video duration confirmation
This commit is contained in:
@@ -544,6 +544,15 @@ describe('ImageCanvas Workspace-first design experience', () => {
|
||||
expect(durationSelect).toHaveValue('');
|
||||
expect(within(durationSelect).getAllByRole('option').map((option) => option.getAttribute('value')))
|
||||
.toEqual(['', '2', '6']);
|
||||
expect(screen.getByRole('button', { name: '确认并开始生成' })).toBeDisabled();
|
||||
|
||||
fireEvent.change(screen.getByLabelText('设计需求'), {
|
||||
target: { value: '确认生成' },
|
||||
});
|
||||
fireEvent.click(screen.getByRole('button', { name: '发送给设计 Agent' }));
|
||||
|
||||
expect(confirmImageWorkspaceGenerationMock).not.toHaveBeenCalled();
|
||||
expect(await screen.findByRole('alert')).toHaveTextContent('请选择 2 至 6 秒的视频时长');
|
||||
|
||||
fireEvent.change(durationSelect, { target: { value: '6' } });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user