feat(communication): add chat reactions emojis and images

This commit is contained in:
2026-10-03 17:56:07 +02:00
parent 59538f46b7
commit 29a9ec2242
25 changed files with 737 additions and 57 deletions

View File

@@ -356,3 +356,24 @@ test('returning to chat immediately reflects a disabled or re-enabled project wi
await settle()
assert.equal(ui.run('groupedRooms.value.find(group => group.label === "Projekte").rooms[0].key'), 'project_1')
})
test('native image-only sends retain the draft after an error and clear it after success', async t => {
let fail = true
const ui = setup(fixture((url, options) => {
if (url.endsWith('/messages') && options?.method === 'POST') {
if (fail) throw { status: 503, data: { message: 'Offline' } }
return { id: 2, body: '', image: { name: 'Bild', width: 80, height: 40 }, own: true }
}
}))
t.after(ui.close)
await ui.run('initialize()')
ui.run('draftImage.value = { dataUrl: "data:image/webp;base64,AAAA", name: "Bild" }')
await ui.run('sendMessage()')
assert.equal(ui.run('draftImage.value.name'), 'Bild')
fail = false
await ui.run('sendMessage()')
assert.equal(ui.run('messages.value.at(-1).image.name'), 'Bild')
assert.equal(ui.run('draftImage.value'), null)
assert.ok(ui.calls.some(c => c.options?.body?.image?.name === 'Bild'))
})