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