mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-06 16:36:45 -03:00
fix(recipes): preserve scroll on in-place reloads
This commit is contained in:
@@ -212,6 +212,19 @@ describe('RecipeManager', () => {
|
||||
expect(refreshVirtualScrollMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('supports preserve-scroll options while keeping boolean compatibility', async () => {
|
||||
const manager = new RecipeManager();
|
||||
|
||||
await manager.loadRecipes({ preserveScroll: true });
|
||||
expect(refreshVirtualScrollMock).toHaveBeenNthCalledWith(1, { preserveScroll: true });
|
||||
|
||||
await manager.loadRecipes(false);
|
||||
expect(refreshVirtualScrollMock).toHaveBeenCalledTimes(1);
|
||||
|
||||
await manager.loadRecipes({ resetPage: true, preserveScroll: false });
|
||||
expect(refreshVirtualScrollMock).toHaveBeenNthCalledWith(2, { preserveScroll: false });
|
||||
});
|
||||
|
||||
it('proxies duplicate management and refresh helpers', async () => {
|
||||
const manager = new RecipeManager();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user