Migrate core render util to use xterm.js as part of the rendering loop. (#19044)

This commit is contained in:
Jacob Richman
2026-02-18 16:46:50 -08:00
committed by GitHub
parent 04c52513e7
commit 04f65f3d55
213 changed files with 7065 additions and 3852 deletions

View File

@@ -101,12 +101,14 @@ describe('DialogManager', () => {
selectedAgentDefinition: undefined,
};
it('renders nothing by default', () => {
const { lastFrame } = renderWithProviders(
it('renders nothing by default', async () => {
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<DialogManager {...defaultProps} />,
{ uiState: baseUiState as Partial<UIState> as UIState },
);
expect(lastFrame()).toBe('');
await waitUntilReady();
expect(lastFrame({ allowEmpty: true })).toBe('');
unmount();
});
const testCases: Array<[Partial<UIState>, string]> = [
@@ -190,8 +192,8 @@ describe('DialogManager', () => {
it.each(testCases)(
'renders %s when state is %o',
(uiStateOverride, expectedComponent) => {
const { lastFrame } = renderWithProviders(
async (uiStateOverride, expectedComponent) => {
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<DialogManager {...defaultProps} />,
{
uiState: {
@@ -200,7 +202,9 @@ describe('DialogManager', () => {
} as Partial<UIState> as UIState,
},
);
await waitUntilReady();
expect(lastFrame()).toContain(expectedComponent);
unmount();
},
);
});