File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ describe('InfiniteLoading.vue', () => {
1919 isCustomSpinner : false ,
2020 listContainerHeight : 200 ,
2121 listItemHeight : 20 ,
22+ direction : 'bottom' ,
2223 } ;
2324 } ,
2425 render ( createElement ) {
@@ -46,6 +47,7 @@ describe('InfiniteLoading.vue', () => {
4647 props : {
4748 distance : this . distance ,
4849 onInfinite : this . onInfinite ,
50+ direction : this . direction ,
4951 } ,
5052 ref : 'infiniteLoading' ,
5153 } ,
@@ -217,4 +219,16 @@ describe('InfiniteLoading.vue', () => {
217219
218220 expect ( vm . $el . querySelector ( '.custom-spinner' ) ) . to . be . ok ;
219221 } ) ;
222+
223+ it ( 'should load data when scroll top (direction attribute)' , ( done ) => {
224+ vm . direction = 'top' ;
225+ vm . onInfinite = function test ( ) {
226+ Vue . nextTick ( ( ) => {
227+ expect ( isShow ( vm . $el . querySelector ( '.loading-default' ) ) ) . to . be . true ;
228+ done ( ) ;
229+ } ) ;
230+ } ;
231+
232+ vm . $mount ( '#app' ) ;
233+ } ) ;
220234} ) ;
You can’t perform that action at this time.
0 commit comments