mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-21 15:41:17 +00:00
* improve SFTP sorting and keyboard navigation * fix SFTP keyboard actions for empty views * fix SFTP file row context menu * fix folders-first kind sorting
22 lines
608 B
TypeScript
22 lines
608 B
TypeScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { getSftpVirtualListScrollTop } from './sftpVirtualList';
|
|
|
|
test('SFTP typeahead can reveal an item outside a large virtualized viewport', () => {
|
|
assert.equal(getSftpVirtualListScrollTop({
|
|
itemIndex: 75,
|
|
rowHeight: 28,
|
|
currentScrollTop: 0,
|
|
viewportHeight: 280,
|
|
}), 1848);
|
|
});
|
|
|
|
test('SFTP virtualized list keeps an already visible selection in place', () => {
|
|
assert.equal(getSftpVirtualListScrollTop({
|
|
itemIndex: 12,
|
|
rowHeight: 28,
|
|
currentScrollTop: 280,
|
|
viewportHeight: 280,
|
|
}), 280);
|
|
});
|