chore: refs #8078 fiz tests
gitea/salix-front/pipeline/pr-dev This commit looks good Details

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()', () => { describe('handleSelection()', () => {
const rows = [{ $index: 0 }, { $index: 1 }, { $index: 2 }]; const rows = [{ $index: 0 }, { $index: 1 }, { $index: 2 }];
const selectedRows = [{ $index: 1 }]; 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( vm.handleSelection(
{ evt: { shiftKey: true }, added: true, rows: selectedRows }, { evt: { shiftKey: true }, added: true, rows: selectedRows },
rows 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', () => { it('should not add rows to selected when shift key is not pressed', () => {