mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-03 06:27:57 +00:00
fix(table): harden queue and row interaction lifecycles
- fence column resize and queue lost-capture handlers to the active pointer - keep staged bulk actions and RTL submenu keyboard navigation truthful - add deterministic selection, resize, action-count, and keyboard regressions
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { updateDownloadSelection } from './downloadSelection';
|
||||
import { selectContextMenuTarget, updateDownloadSelection } from './downloadSelection';
|
||||
|
||||
const orderedIds = ['a', 'b', 'c', 'd'];
|
||||
|
||||
describe('download selection', () => {
|
||||
it('selects an unselected context-menu target without losing an existing selected target', () => {
|
||||
expect(selectContextMenuTarget({
|
||||
selectedIds: new Set(['a', 'b']),
|
||||
lastSelectedId: 'b',
|
||||
targetId: 'c',
|
||||
})).toEqual({ selectedIds: new Set(['c']), lastSelectedId: 'c' });
|
||||
|
||||
expect(selectContextMenuTarget({
|
||||
selectedIds: new Set(['a', 'b']),
|
||||
lastSelectedId: 'b',
|
||||
targetId: 'b',
|
||||
})).toEqual({ selectedIds: new Set(['a', 'b']), lastSelectedId: 'b' });
|
||||
});
|
||||
|
||||
it('collapses select-all to the clicked row', () => {
|
||||
const result = updateDownloadSelection({
|
||||
orderedIds,
|
||||
|
||||
Reference in New Issue
Block a user