forked from verdnatura/salix-front
Merge branch '7001-fixStyles' of https://gitea.verdnatura.es/verdnatura/salix-front into 7001-fixStyles
This commit is contained in:
commit
12efc8dc11
|
@ -2,7 +2,7 @@ import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
|
|
||||||
describe.skip('VnPaginate', () => {
|
describe('VnPaginate', () => {
|
||||||
const expectedUrl = '/api/customers';
|
const expectedUrl = '/api/customers';
|
||||||
|
|
||||||
let vm;
|
let vm;
|
||||||
|
@ -49,6 +49,8 @@ describe.skip('VnPaginate', () => {
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
vm.arrayData.hasMoreData.value = true;
|
vm.arrayData.hasMoreData.value = true;
|
||||||
|
await vm.$nextTick();
|
||||||
|
|
||||||
vm.store.data = [
|
vm.store.data = [
|
||||||
{ id: 1, name: 'Tony Stark' },
|
{ id: 1, name: 'Tony Stark' },
|
||||||
{ id: 2, name: 'Jessica Jones' },
|
{ id: 2, name: 'Jessica Jones' },
|
||||||
|
@ -57,13 +59,13 @@ describe.skip('VnPaginate', () => {
|
||||||
|
|
||||||
await vm.paginate();
|
await vm.paginate();
|
||||||
|
|
||||||
expect(vm.store.skip).toEqual(6);
|
expect(vm.store.skip).toEqual(3);
|
||||||
expect(vm.store.data.length).toEqual(9);
|
expect(vm.store.data.length).toEqual(6);
|
||||||
|
|
||||||
await vm.paginate();
|
await vm.paginate();
|
||||||
|
|
||||||
expect(vm.store.skip).toEqual(9);
|
expect(vm.store.skip).toEqual(6);
|
||||||
expect(vm.store.data.length).toEqual(12);
|
expect(vm.store.data.length).toEqual(9);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue