0
0
Fork 0

chore: refs #8078 fiz tests

This commit is contained in:
Jorge Penadés 2024-11-05 10:37:35 +01:00
parent a4a4190e4e
commit 86e6bef90f
1 changed files with 2 additions and 2 deletions

View File

@ -20,12 +20,12 @@ describe('VnTable', () => {
describe('handleSelection()', () => {
const rows = [{ $index: 0 }, { $index: 1 }, { $index: 2 }];
const selectedRows = [{ $index: 1 }];
it('should add rows to selected when shift key is pressed and rows are added', () => {
it('should add rows to selected when shift key is pressed and rows are added except last one', () => {
vm.handleSelection(
{ evt: { shiftKey: true }, added: true, rows: selectedRows },
rows
);
expect(vm.selected).toEqual([{ $index: 0 }, { $index: 1 }]);
expect(vm.selected).toEqual([{ $index: 0 }]);
});
it('should not add rows to selected when shift key is not pressed', () => {