mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-22 00:03:35 +00:00
* feat: add tree view to the schedules page Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix: keep schedule job previews visible inside tree folders Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix: keep job preview loading while hovered and close it on scroll Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix: keep schedules outside u/ and f/ in the tree view Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat: add tree view to the trigger list pages (#11400) * feat: add tree view to the trigger list pages Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * refactor: let a TreeViewState own the tree view setting Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix: drop the doubled bottom border at the end of a tree Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
16 lines
532 B
TypeScript
16 lines
532 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { groupItems, type ItemType } from './treeViewUtils'
|
|
|
|
const item = (path: string) => ({ path }) as unknown as ItemType
|
|
|
|
describe('groupItems', () => {
|
|
it('keeps a path outside u/ and f/ as a top-level leaf after users and folders', () => {
|
|
const grouped = groupItems([item('g/all/hub_sync'), item('f/ops/a'), item('u/admin/b')])
|
|
expect(grouped.map((n) => ('username' in n ? 'u' : 'folderName' in n ? 'f' : n.path))).toEqual([
|
|
'u',
|
|
'f',
|
|
'g/all/hub_sync'
|
|
])
|
|
})
|
|
})
|