支持私聊附件多选拖拽和批量重试
This commit is contained in:
1 parent
ec2679b991
commit
2931383906
8 files changed
+166
-35
No files matched your search
@@ -628,12 +628,11 @@ test('Windows 与 Web 加密群聊支持消息操作、附件、语音和成员
|
||||
await windows.getByRole('link', { name: names[0] }).click()
|
||||
await windows.getByRole('button', { name: '启用本机加密聊天' }).click()
|
||||
const privateFile = '私聊文件-' + id() + '.txt'
|
||||
const privateAttachments = windows.getByRole('region', { name: '私聊附件发送区' })
|
||||
await privateAttachments.locator('input:enabled').setInputFiles({ name: privateFile, mimeType: 'text/plain', buffer: contents })
|
||||
const originalUpload = windows.waitForResponse((item) => /\/api\/v1\/attachments\//.test(item.url()) && item.request().method() === 'POST')
|
||||
const attachmentInput = windows.locator('input[type=file]:enabled')
|
||||
const [originalFile] = await Promise.all([
|
||||
originalUpload,
|
||||
attachmentInput.setInputFiles({ name: privateFile, mimeType: 'text/plain', buffer: contents }),
|
||||
])
|
||||
await privateAttachments.getByRole('button', { name: '发送私聊附件', exact: true }).click()
|
||||
const originalFile = await originalUpload
|
||||
assert.equal(originalFile.status(), 204)
|
||||
const originalBytes = originalFile.request().postDataBuffer()
|
||||
assert.ok(originalBytes && originalBytes.length === contents.length + 16)
|
||||
|
||||
Reference in new issue
Block a user