feat(chat): add sidebar search for conversations
All checks were successful
Build and Release FEDEO / verify (push) Successful in 1m2s
Build and Release FEDEO / build-and-release (push) Successful in 6m4s

This commit is contained in:
2026-10-15 17:54:22 +02:00
parent 7b61857fb8
commit f56a07f8e3
2 changed files with 51 additions and 5 deletions

View File

@@ -72,6 +72,34 @@ test('only member rooms enter normal chat, with separate keys, groups and unread
assert.equal(ui.run('decoratedRooms.value.some(r => r.id === "admin-only")'), false)
})
test('searching the sidebar preserves the open conversation and draft, including hidden-room matches', async t => {
const ui = setup(fixture(url => {
if (url.endsWith('/project-rooms')) return { rooms: [{ key: 'project_1', name: 'Büro Süd', projectNumber: 'P-2026-42', exists: true, type: 'project' }] }
if (url.endsWith('/direct-rooms')) return { rooms: [{ key: 'direct_1', name: 'Anna Müller', email: 'anna@example.test', exists: true, type: 'direct' }] }
}))
t.after(ui.close)
ui.mount()
await settle()
ui.run('draft.value = "Noch nicht gesendet"; roomSearch.value = " BÜRO 2026-42 "')
assert.equal(ui.run('groupedRooms.value.length'), 1)
assert.equal(ui.run('groupedRooms.value[0].rooms[0].key'), 'project_1')
ui.run('roomSearch.value = "muller ANNA@"')
assert.equal(ui.run('groupedRooms.value[0].rooms[0].key'), 'direct_1')
await ui.run('setRoomHidden(decoratedRooms.value.find(room => room.key === "direct_1"), true)')
assert.equal(ui.run('groupedRooms.value.length'), 0)
assert.equal(ui.run('filteredHiddenRooms.value[0].key'), 'direct_1')
ui.run('roomSearch.value = "kein Treffer"')
await settle()
assert.equal(ui.run('filteredRooms.value.length'), 0)
assert.equal(ui.run('filteredHiddenRooms.value.length'), 0)
assert.equal(ui.run('activeRoom.value.key'), 'allgemein')
assert.equal(ui.run('messages.value[0].body'), 'Interne Nachricht')
assert.equal(ui.run('draft.value'), 'Noch nicht gesendet')
ui.run('roomSearch.value = ""')
assert.equal(ui.run('groupedRooms.value.length'), 3)
assert.equal(ui.run('hiddenRooms.value[0].key'), 'direct_1')
})
test('opening a collaboration deep link never provisions, reads or sends through native chat APIs', async t => {
const ui = setup(fixture(), { room: 'collaboration:shared-room' })
t.after(ui.close)