mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
feat(ui): add hideFooter setting to hide footer from UI (#6505)
This commit is contained in:
@@ -864,6 +864,58 @@ describe('App UI', () => {
|
||||
expect(vi.mocked(Header)).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should display Footer component by default', async () => {
|
||||
const { lastFrame, unmount } = renderWithProviders(
|
||||
<App
|
||||
config={mockConfig as unknown as ServerConfig}
|
||||
settings={mockSettings}
|
||||
version={mockVersion}
|
||||
/>,
|
||||
);
|
||||
currentUnmount = unmount;
|
||||
await Promise.resolve();
|
||||
// Footer should render - look for target directory which is always shown
|
||||
expect(lastFrame()).toContain('/test/dir');
|
||||
});
|
||||
|
||||
it('should not display Footer component when hideFooter is true', async () => {
|
||||
mockSettings = createMockSettings({
|
||||
user: { hideFooter: true },
|
||||
});
|
||||
|
||||
const { lastFrame, unmount } = renderWithProviders(
|
||||
<App
|
||||
config={mockConfig as unknown as ServerConfig}
|
||||
settings={mockSettings}
|
||||
version={mockVersion}
|
||||
/>,
|
||||
);
|
||||
currentUnmount = unmount;
|
||||
await Promise.resolve();
|
||||
// Footer should not render - target directory should not appear
|
||||
expect(lastFrame()).not.toContain('/test/dir');
|
||||
});
|
||||
|
||||
it('should show footer if system says show, but workspace and user settings say hide', async () => {
|
||||
mockSettings = createMockSettings({
|
||||
system: { hideFooter: false },
|
||||
user: { hideFooter: true },
|
||||
workspace: { hideFooter: true },
|
||||
});
|
||||
|
||||
const { lastFrame, unmount } = renderWithProviders(
|
||||
<App
|
||||
config={mockConfig as unknown as ServerConfig}
|
||||
settings={mockSettings}
|
||||
version={mockVersion}
|
||||
/>,
|
||||
);
|
||||
currentUnmount = unmount;
|
||||
await Promise.resolve();
|
||||
// Footer should render because system overrides - look for target directory
|
||||
expect(lastFrame()).toContain('/test/dir');
|
||||
});
|
||||
|
||||
it('should show tips if system says show, but workspace and user settings say hide', async () => {
|
||||
mockSettings = createMockSettings({
|
||||
system: { hideTips: false },
|
||||
|
||||
Reference in New Issue
Block a user