feat: organize project conversations and add coding teacher side chat
This commit is contained in:
@@ -252,26 +252,12 @@ describe('PI-130 feature-complete Coding UI', () => {
|
||||
it('uses the custom title bar for the full-height Conversation columns', async () => {
|
||||
const originalPlatform = window.electron.platform;
|
||||
const { useSettingsStore } = await import('@/stores/settings');
|
||||
const { CodingConversationSidebar } = await import('@/pages/Chat/CodingConversationSidebar');
|
||||
const { CodingConversationHeader } = await import('@/pages/Chat/CodingConversationHeader');
|
||||
window.electron.platform = 'darwin';
|
||||
useSettingsStore.setState({ sidebarCollapsed: true });
|
||||
|
||||
render(
|
||||
<>
|
||||
<CodingConversationSidebar
|
||||
projectName="Layout project"
|
||||
agents={[]}
|
||||
conversations={[]}
|
||||
conversationSummaries={{}}
|
||||
selectedAgentId={null}
|
||||
selectedConversationId={null}
|
||||
creatingAgentIds={{}}
|
||||
onSelectAgent={vi.fn()}
|
||||
onSelectConversation={vi.fn()}
|
||||
onCreateConversation={vi.fn()}
|
||||
onOpenProjectSettings={vi.fn()}
|
||||
/>
|
||||
<CodingConversationHeader
|
||||
conversation={null}
|
||||
snapshot={null}
|
||||
@@ -282,13 +268,9 @@ describe('PI-130 feature-complete Coding UI', () => {
|
||||
</>,
|
||||
);
|
||||
|
||||
expect(screen.getByTestId('coding-conversation-sidebar-titlebar')).toHaveClass('fixed', 'top-0', 'h-10');
|
||||
expect(screen.getByTestId('coding-conversation-sidebar-titlebar')).toHaveStyle({ left: '0px' });
|
||||
expect(screen.getByTestId('coding-conversation-header-titlebar')).toHaveClass('fixed', 'top-0', 'h-10');
|
||||
expect(screen.getByTestId('coding-conversation-header-titlebar')).toHaveStyle({ left: '256px' });
|
||||
expect(screen.queryByText('Pi 本地对话')).not.toBeInTheDocument();
|
||||
expect(within(screen.getByTestId('coding-conversation-sidebar'))
|
||||
.queryByTestId('coding-conversation-sidebar-header')).not.toBeInTheDocument();
|
||||
expect(screen.getByTestId('coding-conversation-header-titlebar')).toHaveStyle({ left: '132px' });
|
||||
expect(screen.queryByTestId('coding-conversation-sidebar')).not.toBeInTheDocument();
|
||||
|
||||
window.electron.platform = originalPlatform;
|
||||
useSettingsStore.setState({ sidebarCollapsed: false });
|
||||
|
||||
Reference in New Issue
Block a user