mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 18:39:33 +01:00
test(terminal): restore reversal assertion and clarify scrolling guidance (#7)
This commit is contained in:
1 parent
dbb41c70cf
commit
131ee1a31e
5 files changed
+8
-7
No files matched your search
@@ -694,8 +694,8 @@ describe('pageKeysForGesture, the pure gesture rules both panes share', () => {
|
||||
expect(steps.map((s) => s.keys)).toEqual([UP, '', '', UP]);
|
||||
});
|
||||
|
||||
it('responds immediately to a notch without paging for every later notch', () => {
|
||||
// Five 4-row notches 400ms apart share the pre-paid page debt.
|
||||
it('accumulates a notch-sized opening event, and carries plain travel across notches', () => {
|
||||
// Five 4-row notches 400 ms apart: each is a new gesture, none pages alone.
|
||||
const steps = run([
|
||||
[-4, 0],
|
||||
[-4, 400],
|
||||
|
||||
@@ -660,7 +660,7 @@ describe("gesture handling is the primary pane's, through the shared pure helper
|
||||
};
|
||||
}
|
||||
|
||||
it('pages a Codex tile, which draws on the alternate screen and ignores SGR wheel reports', async () => {
|
||||
it('pages an untracked Codex tile through the hollow-pane fallback', async () => {
|
||||
const { ws, mount } = await connectTile(makeApp({ 's-tile': { mode: 'codex' } }), { mode: 'codex' });
|
||||
|
||||
mount.fire('wheel', wheelLines(-18));
|
||||
@@ -765,6 +765,7 @@ describe("gesture handling is the primary pane's, through the shared pure helper
|
||||
primary._flushWheelSgrQueue();
|
||||
|
||||
expect(tileBytes).toContain(PAGE_UP);
|
||||
expect(tileBytes).toContain(PAGE_DOWN);
|
||||
expect(tileBytes).toBe(sent.join(''));
|
||||
});
|
||||
|
||||
@@ -792,7 +793,7 @@ describe("gesture handling is the primary pane's, through the shared pure helper
|
||||
const tileBytes = flushed(ws)
|
||||
.map((f) => f.d)
|
||||
.join('');
|
||||
// One page for the slow ticks, one for the wobble's opening event, nothing more.
|
||||
// One page for the slow ticks; the wobble cancels its unsent opening page on reversal.
|
||||
expect(tileBytes).toBe(PAGE_UP); // the first slow tick flushed before the later wobble
|
||||
|
||||
const primary = makeApp({ other: { mode: 'codex' } }, 'other') as App & {
|
||||
|
||||
@@ -853,7 +853,7 @@ describe('terminal touch tap mouse guard', () => {
|
||||
expect(app._wheelScrollLinesFloat({ shiftKey: true, deltaX: -5, deltaY: 0 })).toBe(-0.2);
|
||||
});
|
||||
|
||||
it('wheel: encodes SGR 64/65 ticks, caps per event, and coalesces into one flush', () => {
|
||||
it('wheel: encodes SGR 64/65 ticks, caps per event, and sends the first report before batching the rest', () => {
|
||||
const { app } = loadTerminalUiHarness();
|
||||
const sent: Array<{ id: string; data: string }> = [];
|
||||
app.activeSessionId = 'sess-1';
|
||||
|
||||
Reference in new issue
Block a user