mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	This commit extracts the key UI elements of updating the buddy list for compose fade into a configuration, and we interact with the buddy_list API.
		
			
				
	
	
		
			15 lines
		
	
	
		
			366 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			366 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
set_global('$', global.make_zjquery());
 | 
						|
zrequire('buddy_list');
 | 
						|
 | 
						|
(function test_get_items() {
 | 
						|
    const alice_li = $.create('alice stub');
 | 
						|
    const sel = 'li.user_sidebar_entry';
 | 
						|
 | 
						|
    buddy_list.container.set_find_results(sel, {
 | 
						|
        map: (f) => [f(0, alice_li)],
 | 
						|
    });
 | 
						|
    const items = buddy_list.get_items();
 | 
						|
 | 
						|
    assert.deepEqual(items, [alice_li]);
 | 
						|
}());
 |