Files
windmill/frontend/src/lib/components/home/treeViewUtils.test.ts
T
GuilhemandClaude Opus 5.5 e68ff0d969 feat: add tree view to the schedules page (#11360)
* 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>
2026-09-29 10:54:46 +02:00

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'
])
})
})