自动补充 MLS 一次性密钥包
This commit is contained in:
1 parent
6b728a0996
commit
cf8129f4aa
8 files changed
+69
-11
No files matched your search
@@ -89,6 +89,8 @@ test('Web 与 Windows 安全码校验、加密互发、离线接收和状态恢
|
||||
assert.match(webCode, /^[0-9a-f]{64}$/)
|
||||
assert.match(desktopCode, /^[0-9a-f]{64}$/)
|
||||
assert.notEqual(webCode, desktopCode)
|
||||
const packageRefill = windows.waitForResponse((response) => response.request().method() === 'POST' &&
|
||||
response.url().endsWith('/api/v1/key-packages') && response.status() === 204)
|
||||
await web.getByRole('button', { name: '刷新' }).click()
|
||||
await windows.getByRole('button', { name: '刷新' }).click()
|
||||
await web.getByLabel('对方安全码').fill('0'.repeat(64))
|
||||
@@ -109,6 +111,7 @@ test('Web 与 Windows 安全码校验、加密互发、离线接收和状态恢
|
||||
assert.ok(!Buffer.from(packet.ciphertext, 'base64').includes(Buffer.from(text)))
|
||||
assert.deepEqual(Object.keys(packet).sort(), ['ciphertext', 'messageId', 'recipientDevice'])
|
||||
await windows.getByText(text, { exact: true }).waitFor()
|
||||
await packageRefill
|
||||
const sentLine = web.getByRole('listitem').filter({ hasText: text })
|
||||
assert.equal(await sentLine.getByText('已读', { exact: true }).count(), 0)
|
||||
assert.equal(await windows.getByLabel('发送已读回执').isChecked(), false)
|
||||
|
||||
Reference in new issue
Block a user