增加加密引用回复和本机消息管理

This commit is contained in:
xhgit committed 2026-11-13 19:17:13 +08:00
1 parent c24960d22a
commit c27ad52dab
7 files changed
+121 -8

No files matched your search

+15
View File
@@ -103,8 +103,23 @@ test('Web 与 Windows 安全码校验、加密互发、离线接收和状态恢
assert.deepEqual(Object.keys(packet).sort(), ['ciphertext', 'messageId', 'recipientDevice'])
await windows.getByText(text, { exact: true }).waitFor()
const reply = 'Windows 到 Web ' + randomBytes(8).toString('hex')
await windows.getByRole('listitem').filter({ hasText: text }).getByRole('button', { name: '引用', exact: true }).click()
await send(windows, reply)
await web.getByText(reply, { exact: true }).waitFor()
await web.getByRole('listitem').filter({ hasText: reply }).locator('blockquote').getByText(text, { exact: true }).waitFor()
const original = web.getByRole('listitem').filter({ has: web.getByText(text, { exact: true }) }).filter({ hasNot: web.locator('blockquote') })
await original.getByRole('button', { name: '收藏', exact: true }).click()
await original.getByRole('button', { name: '取消收藏' }).waitFor()
await web.getByLabel('只看收藏').check()
assert.equal(await web.getByRole('listitem').count(), 1)
await web.getByLabel('搜索本机消息').fill('无匹配的搜索词')
await web.getByText('没有匹配的消息。').waitFor()
await web.getByLabel('搜索本机消息').clear()
await web.getByLabel('只看收藏').uncheck()
await original.getByRole('button', { name: '本机删除' }).click()
await web.getByRole('button', { name: '确认删除' }).click()
await original.waitFor({ state: 'detached' })
await windows.getByRole('listitem').filter({ hasText: text }).filter({ hasNot: windows.locator('blockquote') }).waitFor()
const contents = Buffer.from('端到端文件 ' + randomBytes(32).toString('hex'))
const fileName = '跨端验收.txt'