char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
92d1bb0c9
char/aliceai-t5-moe
1// Regression test: opening a chat-form picker must not scroll the 2// conversation to the top. Root cause: the list's scroll effect fired 3// scrollIntoView on the initial mount, before the popover was positioned, 4// so the browser scrolled every scrollable ancestor to reveal the row. 5 6import PickerListScrollHarness from './components/PickerListScrollHarness.svelte' ; 7import { tick } from 'svelte' ; 8import { describe , expect , it } from 'vitest' ; 9import { render } from 'vitest-browser-svelte' ; 10 11describe ( 'ChatFormPickerList mount scroll' , () => { 12it ( 'does not scroll documentElement when the picker mounts' , async () => { 13const screen = render ( PickerListScrollHarness ); 14 15await tick (); 16 17document . documentElement . scrollTop = document . documentElement . scrollHeight ; 18await tick (); 19const before = document . documentElement . scrollTop ; 20 21expect ( before ). toBeGreaterThan ( 0 ); 22 23screen . component . openPicker (); 24await tick (); 25await new Promise (( r ) => setTimeout ( r , 100 )); 26await tick (); 27 28const after = document . documentElement . scrollTop ; 29 30expect ( after ). toBe ( before ); 31}); 32});