ci: update verified tests list and fix all remaining bad tests

This commit is contained in:
mkorwel
2026-04-16 23:40:04 +00:00
parent edd0c51bef
commit 8c68ee3caf
6 changed files with 23 additions and 11 deletions
@@ -27,6 +27,7 @@ describe('Model Steering Integration', () => {
rig = new AppRig({
fakeResponsesPath,
configOverrides: { modelSteering: true },
terminalHeight: 100,
});
await rig.initialize();
await rig.render();
+16 -6
View File
@@ -109,7 +109,7 @@ class XtermStdout extends EventEmitter {
renderCount = 0;
private queue: { promise: Promise<void> };
isTTY = true;
public clearScreenOnRender = true;
clearScreenOnRender = true;
getColorDepth(): number {
return 24;
@@ -118,7 +118,11 @@ class XtermStdout extends EventEmitter {
private lastRenderOutput: string | undefined = undefined;
private lastRenderStaticContent: string | undefined = undefined;
constructor(state: TerminalState, queue: { promise: Promise<void> }, clearScreenOnRender = true) {
constructor(
state: TerminalState,
queue: { promise: Promise<void> },
clearScreenOnRender = true,
) {
super();
this.state = state;
this.queue = queue;
@@ -250,9 +254,12 @@ class XtermStdout extends EventEmitter {
// Ensure all pending writes to the terminal are processed.
await this.queue.promise;
const currentFrame = stripAnsi(
this.lastFrame({ allowEmpty: true }),
).trim();
const buffer = this.state.terminal.buffer.active;
const allLines: string[] = [];
for (let i = 0; i < buffer.length; i++) {
allLines.push(buffer.getLine(i)?.translateToString(true) ?? '');
}
const currentFrame = stripAnsi(allLines.join('\n')).trim();
const expectedFrame = this.normalizeFrame(
stripAnsi(
(this.lastRenderStaticContent ?? '') + (this.lastRenderOutput ?? ''),
@@ -461,7 +468,10 @@ export const render = async (
instances.push(instance);
if (!allowEmptyFrame) {
while (stdout.renderCount === 0 || stdout.lastFrame({ allowEmpty: true }) === '') {
while (
stdout.renderCount === 0 ||
stdout.lastFrame({ allowEmpty: true }) === ''
) {
if (vi.isFakeTimers()) {
await vi.advanceTimersByTimeAsync(10);
} else {
@@ -444,8 +444,8 @@ describe('<ToolMessage />', () => {
constrainHeight: true,
},
width: 80,
config: makeFakeConfig({ useAlternateBuffer: true }),
settings: createMockSettings({ ui: { useAlternateBuffer: true } }),
config: makeFakeConfig({ useAlternateBuffer: false }),
settings: createMockSettings({ ui: { useAlternateBuffer: false } }),
},
);
const output = lastFrame();
@@ -454,7 +454,7 @@ describe('<ToolMessage />', () => {
// It should constrain the height, showing the tail of the output (overflowDirection='top' or due to scroll)
expect(output).not.toMatch(/Line 1\b/);
expect(output).not.toMatch(/Line 14\b/);
expect(output).toMatch(/Line 16\b/);
expect(output).toMatch(/Line 17\b/);
expect(output).toMatch(/Line 30\b/);
unmount();
});
@@ -140,7 +140,7 @@ export const ToolMessage: React.FC<ToolMessageProps> = ({
? SUBAGENT_MAX_LINES
: undefined
}
overflowDirection={kind === Kind.Agent ? 'bottom' : 'top'}
overflowDirection={kind === Kind.Agent ? 'top' : 'bottom'}
/>
{isThisShellFocused && config && (
<Box paddingLeft={STATUS_INDICATOR_WIDTH} marginTop={1}>
@@ -23,6 +23,7 @@ describe('<MarkdownDisplay />', () => {
it('renders nothing for empty text', async () => {
const { lastFrame, unmount } = await renderWithProviders(
<MarkdownDisplay {...baseProps} text="" />,
{ allowEmptyFrame: true },
);
expect(lastFrame({ allowEmpty: true })).toMatchSnapshot();
unmount();