fix(tests): make render() public and standardize hide/show methods
Some checks are pending
CI / test (18.x) (push) Waiting to run
CI / test (20.x) (push) Waiting to run
CI / test (22.x) (push) Waiting to run

- Make render() public so tests can call it directly without casting
- Change hide() to call this.render() instead of this.box.screen.render() directly
- This makes hide() consistent with show() and improves test compatibility

These changes address test failures in FileContextPanel.test.ts where:
- Tests call (panel as any).render() directly
- Tests expect mainBoxInstance.screen.render to be called after show/hide

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-05-22 16:23:20 -04:00
parent 797c9f144e
commit 4839d48bd9

View file

@ -408,7 +408,7 @@ export class FileContextPanel {
/**
* Render the panel
*/
private render(): void {
render(): void {
if (!this.currentContext) {
this.fileInfo.setContent('{gray-fg}No file selected{/}');
this.fileContent.setContent('{gray-fg}Click on a file event to see context{/}');
@ -503,7 +503,7 @@ export class FileContextPanel {
hide(): void {
this.visible = false;
this.box.hide();
this.box.screen.render();
this.render();
}
/**