fix: Restore footer configuration settings (#8041) (#8053)

Co-authored-by: Miguel Solorio <miguelsolorio@google.com>
Co-authored-by: Miguel Solorio <miguel.solorio07@gmail.com>
This commit is contained in:
Keith Lyons
2025-09-11 20:16:09 -04:00
committed by GitHub
parent 68035591da
commit 0d460bbf77
4 changed files with 180 additions and 81 deletions
@@ -156,4 +156,56 @@ describe('<Footer />', () => {
vi.unstubAllEnvs();
});
});
describe('footer configuration filtering (golden snapshots)', () => {
it('renders complete footer with all sections visible (baseline)', () => {
const { lastFrame } = renderWithWidth(120, {
...defaultProps,
hideCWD: false,
hideSandboxStatus: false,
hideModelInfo: false,
});
expect(lastFrame()).toMatchSnapshot('complete-footer-wide');
});
it('renders footer with all optional sections hidden (minimal footer)', () => {
const { lastFrame } = renderWithWidth(120, {
...defaultProps,
hideCWD: true,
hideSandboxStatus: true,
hideModelInfo: true,
});
expect(lastFrame()).toMatchSnapshot('footer-minimal');
});
it('renders footer with only model info hidden (partial filtering)', () => {
const { lastFrame } = renderWithWidth(120, {
...defaultProps,
hideCWD: false,
hideSandboxStatus: false,
hideModelInfo: true,
});
expect(lastFrame()).toMatchSnapshot('footer-no-model');
});
it('renders footer with CWD and model info hidden to test alignment (only sandbox visible)', () => {
const { lastFrame } = renderWithWidth(120, {
...defaultProps,
hideCWD: true,
hideSandboxStatus: false,
hideModelInfo: true,
});
expect(lastFrame()).toMatchSnapshot('footer-only-sandbox');
});
it('renders complete footer in narrow terminal (baseline narrow)', () => {
const { lastFrame } = renderWithWidth(79, {
...defaultProps,
hideCWD: false,
hideSandboxStatus: false,
hideModelInfo: false,
});
expect(lastFrame()).toMatchSnapshot('complete-footer-narrow');
});
});
});