fix(canvas): restore left project sidebar
This commit is contained in:
1 parent
918f8f80dc
commit
b95f1b4df5
8 files changed
+116
-62
No files matched your search
@@ -125,16 +125,12 @@ describe('AI Design Canvas page', () => {
|
||||
expect(screen.queryByText(/规格版本|编译器|生成策略|字段决策/)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders the Workspace list as a full-height right Works rail on desktop', () => {
|
||||
it('leaves desktop Workspace navigation to the shared left project sidebar', () => {
|
||||
setViewport(true);
|
||||
prepareWorkspace();
|
||||
render(<ImageCanvas />);
|
||||
|
||||
const rail = screen.getByTestId('image-workspace-works-rail');
|
||||
expect(rail).toBeInTheDocument();
|
||||
expect(within(rail).getByRole('heading', { name: '我的作品' })).toBeInTheDocument();
|
||||
expect(within(rail).getByRole('button', { name: '打开作品 咖啡机新品主视觉' })).toBeInTheDocument();
|
||||
expect(within(rail).getByRole('button', { name: '新建作品' })).toBeInTheDocument();
|
||||
expect(screen.queryByTestId('image-workspace-works-rail')).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole('button', { name: '作品' })).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -146,16 +142,19 @@ describe('AI Design Canvas page', () => {
|
||||
render(<ImageCanvas />);
|
||||
|
||||
expect(screen.getByText(/制作方案已准备好,确认前仍可修改/)).toBeInTheDocument();
|
||||
expect(within(screen.getByTestId('image-workspace-works-rail')).getByText('待确认')).toBeInTheDocument();
|
||||
expect(screen.queryByTestId('image-workspace-works-rail')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('opens the Works rail as a right sheet on compact layouts', () => {
|
||||
it('opens the Works rail as a left sheet on compact layouts', () => {
|
||||
prepareWorkspace();
|
||||
render(<ImageCanvas />);
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '作品' }));
|
||||
expect(screen.getByTestId('image-workspace-works-rail')).toBeInTheDocument();
|
||||
expect(within(screen.getByTestId('image-workspace-works-rail')).getByRole('heading', { name: '我的作品' })).toBeInTheDocument();
|
||||
const rail = screen.getByTestId('image-workspace-works-rail');
|
||||
expect(rail).toBeInTheDocument();
|
||||
expect(within(rail).getByRole('heading', { name: '我的作品' })).toBeInTheDocument();
|
||||
expect(rail.closest('[role="dialog"]')).toHaveClass('left-0');
|
||||
expect(rail.closest('[role="dialog"]')).not.toHaveClass('right-0');
|
||||
});
|
||||
|
||||
it('shows one unfinished assistant reply incrementally and replaces it with the canonical turn', async () => {
|
||||
|
||||
Reference in new issue
Block a user