fix: unit tests

This commit is contained in:
Yourz
2026-02-18 17:32:07 +08:00
parent b52785a8a0
commit 4754be7567

View File

@@ -133,7 +133,7 @@ describe('EssentialNodesPanel', () => {
})
describe('default expansion', () => {
it('should expand first two folders by default when expandedKeys is empty', async () => {
it('should expand all folders by default when expandedKeys is empty', async () => {
const wrapper = mountComponent(createMockRoot(), [])
await nextTick()
await flushPromises()
@@ -142,7 +142,7 @@ describe('EssentialNodesPanel', () => {
const roots = wrapper.findAll('.collapsible-root')
expect(roots[0].attributes('data-state')).toBe('open')
expect(roots[1].attributes('data-state')).toBe('open')
expect(roots[2].attributes('data-state')).toBe('closed')
expect(roots[2].attributes('data-state')).toBe('open')
})
it('should respect provided expandedKeys', async () => {