File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
packages/virtual-list/test/visual/lumo
screenshots/virtual-list/baseline Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 55 < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
66 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
77 < title > Virtual list</ title >
8+ < link rel ="stylesheet " href ="/packages/vaadin-lumo-styles/lumo.css " />
89 < script type ="module " src ="./common.js "> </ script >
910
1011 < script type ="module ">
Original file line number Diff line number Diff line change 1+ import { fixtureSync , nextRender } from '@vaadin/testing-helpers' ;
2+ import { visualDiff } from '@web/test-runner-visual-regression' ;
3+ import '@vaadin/vaadin-lumo-styles/props.css' ;
4+ import '../../../vaadin-virtual-list.js' ;
5+
6+ describe ( 'virtual-list' , ( ) => {
7+ let div , element ;
8+
9+ beforeEach ( async ( ) => {
10+ div = document . createElement ( 'div' ) ;
11+ div . style . padding = '10px' ;
12+ element = fixtureSync (
13+ `
14+ <vaadin-virtual-list style="height: 200px"></vaadin-virtual-list>
15+ ` ,
16+ div ,
17+ ) ;
18+ element . items = Array . from ( { length : 100000 } ) . map ( ( _ , i ) => {
19+ return { label : `Item ${ i } ` } ;
20+ } ) ;
21+ element . renderer = ( root , _ , { item } ) => {
22+ root . innerHTML = `<div>${ item . label } </div>` ;
23+ } ;
24+ await nextRender ( ) ;
25+ } ) ;
26+
27+ it ( 'basic' , async ( ) => {
28+ await visualDiff ( div , 'basic' ) ;
29+ } ) ;
30+ } ) ;
You can’t perform that action at this time.
0 commit comments