Integrate project classroom with teacher and friend consultations
This commit is contained in:
@@ -76,7 +76,7 @@ describe('TitleBar platform behavior', () => {
|
||||
expect(invokeIpcMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('aligns the chat workspace title rail with the four-column layout', () => {
|
||||
it('aligns the classroom title bar with one project sidebar and no duplicate branding', () => {
|
||||
window.electron.platform = 'darwin';
|
||||
|
||||
render(<TitleBar integrated workspaceLayout />);
|
||||
@@ -89,9 +89,11 @@ describe('TitleBar platform behavior', () => {
|
||||
'basis-[256px]',
|
||||
);
|
||||
expect(screen.getByTestId('titlebar-main-surface')).toHaveClass('border-b-0');
|
||||
expect(screen.getByTestId('titlebar-conversation-surface')).toHaveClass('w-[256px]', 'bg-surface-tertiary', 'border-r');
|
||||
expect(screen.getByTestId('titlebar-conversation-surface')).toHaveStyle({ left: '0px' });
|
||||
expect(screen.queryByTestId('titlebar-conversation-surface')).not.toBeInTheDocument();
|
||||
expect(screen.queryByTestId('titlebar-logo')).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole('img', { name: 'Makelore logo' })).not.toBeInTheDocument();
|
||||
expect(screen.queryByTestId('titlebar-project-context')).not.toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '折叠侧栏' })).toBeEnabled();
|
||||
});
|
||||
|
||||
it('renders the painting title bar as a transparent overlay with the logo at the window edge', () => {
|
||||
@@ -174,18 +176,28 @@ describe('TitleBar platform behavior', () => {
|
||||
expect(useSettingsStore.getState().sidebarCollapsed).toBe(false);
|
||||
});
|
||||
|
||||
it('keeps the chat titlebar rail fixed while the collapsed sidebar previews', () => {
|
||||
it('keeps the classroom sidebar safe area fixed during preview and lets the student pin it', () => {
|
||||
window.electron.platform = 'darwin';
|
||||
useSettingsStore.setState({ sidebarCollapsed: true });
|
||||
|
||||
const { rerender } = render(<TitleBar integrated workspaceLayout sidebarPeekOpen={false} />);
|
||||
expect(screen.getByTestId('titlebar-sidebar-surface')).toHaveClass('w-[132px]');
|
||||
expect(screen.getByTestId('titlebar-conversation-surface')).toHaveStyle({ left: '-132px' });
|
||||
expect(screen.queryByTestId('titlebar-conversation-surface')).not.toBeInTheDocument();
|
||||
expect(screen.queryByTestId('titlebar-logo')).not.toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: '展开侧栏' })).toHaveAttribute('aria-expanded', 'false');
|
||||
|
||||
rerender(<TitleBar integrated workspaceLayout sidebarPeekOpen />);
|
||||
|
||||
expect(screen.getByTestId('titlebar-sidebar-surface')).toHaveClass('w-[132px]');
|
||||
expect(screen.getByTestId('titlebar-conversation-surface')).toHaveStyle({ left: '-132px' });
|
||||
expect(screen.queryByTestId('titlebar-conversation-surface')).not.toBeInTheDocument();
|
||||
expect(screen.queryByTestId('titlebar-logo')).not.toBeInTheDocument();
|
||||
const pinButton = screen.getByRole('button', { name: '固定侧栏' });
|
||||
expect(pinButton).toBeEnabled();
|
||||
expect(pinButton).toHaveAttribute('aria-expanded', 'true');
|
||||
fireEvent.click(pinButton);
|
||||
expect(useSettingsStore.getState().sidebarCollapsed).toBe(false);
|
||||
expect(screen.getByTestId('titlebar-sidebar-surface')).toHaveClass('w-[256px]', 'min-w-[256px]', 'basis-[256px]');
|
||||
expect(screen.getByRole('button', { name: '折叠侧栏' })).toBeEnabled();
|
||||
});
|
||||
|
||||
it('extends the ordinary titlebar sidebar surface during a hover preview', () => {
|
||||
|
||||
Reference in New Issue
Block a user