fix(tests): make render() public and standardize hide/show methods
- 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:
parent
797c9f144e
commit
4839d48bd9
1 changed files with 2 additions and 2 deletions
|
|
@ -408,7 +408,7 @@ export class FileContextPanel {
|
||||||
/**
|
/**
|
||||||
* Render the panel
|
* Render the panel
|
||||||
*/
|
*/
|
||||||
private render(): void {
|
render(): void {
|
||||||
if (!this.currentContext) {
|
if (!this.currentContext) {
|
||||||
this.fileInfo.setContent('{gray-fg}No file selected{/}');
|
this.fileInfo.setContent('{gray-fg}No file selected{/}');
|
||||||
this.fileContent.setContent('{gray-fg}Click on a file event to see context{/}');
|
this.fileContent.setContent('{gray-fg}Click on a file event to see context{/}');
|
||||||
|
|
@ -503,7 +503,7 @@ export class FileContextPanel {
|
||||||
hide(): void {
|
hide(): void {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.box.hide();
|
this.box.hide();
|
||||||
this.box.screen.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue