5673-claim-development & crudModel #71

Merged
alexm merged 33 commits from 5673-claim-development into dev 2023-09-28 07:46:02 +00:00
1 changed files with 17 additions and 17 deletions
Showing only changes of commit ea346cdca2 - Show all commits

View File

@ -96,26 +96,26 @@ describe.only('CrudModel', () => {
});
// TODO: remove test
Outdated
Review

Soles me ha faltat este test. Pq com es el dialogo al donarli a Acceptar qui borra. Hi ha que mockejar el componente de dialogo i tal i no me ha donat temps.

Soles me ha faltat este test. Pq com es el dialogo al donarli a Acceptar qui borra. Hi ha que mockejar el componente de dialogo i tal i no me ha donat temps.
// describe('remove()', () => {
// it('should remove', async () => {
// vi.spyOn(vm.quasar, 'dialog');
describe.skip('remove()', () => {
it('should remove', async () => {
vi.spyOn(vm.quasar, 'dialog');
// vm.originalData = [
// { id: 1, name: 'Tony Starks', $index: 1 },
// { id: 2, name: 'Jessica Jones', $index: 2 },
// { id: 3, name: 'Bruce Wayne', $index: 3 },
// ];
// vm.state.set('crudModel', [
// { id: 1, name: 'New name one', $index: 1 },
// { id: 2, name: 'New name two', $index: 2 },
// { id: 3, name: 'Bruce Wayne', $index: 3 },
// ]);
vm.originalData = [
{ id: 1, name: 'Tony Starks', $index: 1 },
{ id: 2, name: 'Jessica Jones', $index: 2 },
{ id: 3, name: 'Bruce Wayne', $index: 3 },
];
vm.state.set('crudModel', [
{ id: 1, name: 'New name one', $index: 1 },
{ id: 2, name: 'New name two', $index: 2 },
{ id: 3, name: 'Bruce Wayne', $index: 3 },
]);
// vm.remove([{ id: 1 }]);
vm.remove([{ id: 1 }]);
// expect(vm.quasar.dialog).toHaveBeenCalled();
// });
// });
expect(vm.quasar.dialog).toHaveBeenCalled();
});
});
describe('getDifferences()', () => {
it('should return the differences between two objects', async () => {