支持向已核验设备加密转发文字和附件
This commit is contained in:
1 parent
f5f116a266
commit
0b89634af2
6 files changed
+81
-6
No files matched your search
@@ -157,6 +157,14 @@ test('Web 与 Windows 安全码校验、加密互发、离线接收和状态恢
|
||||
const file = await downloaded
|
||||
assert.equal(file.suggestedFilename(), fileName)
|
||||
assert.deepEqual(await readFile(await file.path()), contents)
|
||||
const forwardedRequest = web.waitForRequest((req) => req.method() === 'POST' && req.url().includes('/api/v1/attachments/'))
|
||||
await web.getByRole('listitem').filter({ hasText: fileName }).getByRole('button', { name: '转发', exact: true }).click()
|
||||
await web.getByLabel('转发给').selectOption({ label: b })
|
||||
await web.getByRole('button', { name: '确认转发' }).click()
|
||||
const forwarded = await forwardedRequest
|
||||
assert.notEqual(new URL(forwarded.url()).pathname, fileURL.pathname)
|
||||
assert.notDeepEqual(forwarded.postDataBuffer(), uploaded)
|
||||
await windows.getByRole('button', { name: '下载 ' + fileName, exact: true }).nth(1).waitFor()
|
||||
|
||||
await windows.getByRole('button', { name: '退出登录' }).click()
|
||||
await windows.getByRole('heading', { name: '登录 XHChat' }).waitFor()
|
||||
|
||||
Reference in new issue
Block a user