汇总私聊与群聊本机收藏
This commit is contained in:
1 parent
a7d85f183c
commit
e08c990cc7
12 files changed
+314
-24
No files matched your search
@@ -638,6 +638,9 @@ test('Windows 与 Web 加密群聊支持消息操作、附件、语音和成员
|
||||
assert.ok(originalBytes && originalBytes.length === contents.length + 16)
|
||||
|
||||
await windows.getByRole('listitem').filter({ hasText: privateFile }).getByRole('button', { name: '转发', exact: true }).click()
|
||||
const privateLine = windows.getByRole('list', { name: '消息记录' }).getByRole('listitem').filter({ hasText: privateFile })
|
||||
await privateLine.getByRole('button', { name: '收藏', exact: true }).click()
|
||||
await privateLine.getByRole('button', { name: '取消收藏', exact: true }).waitFor()
|
||||
const desktopForward = windows.getByRole('form', { name: '转发私聊消息' })
|
||||
const writes = []
|
||||
const recordWrite = (req) => { if (req.method() === 'POST' && req.url().includes('/groups/')) writes.push(req.url()) }
|
||||
@@ -710,6 +713,23 @@ test('Windows 与 Web 加密群聊支持消息操作、附件、语音和成员
|
||||
}
|
||||
await windows.getByRole('button', { name: '消息系统通知', pressed: true }).click()
|
||||
await windows.getByText('已在本设备关闭消息系统通知', { exact: true }).waitFor()
|
||||
|
||||
await work(windows).getByRole('link', { name: '群组', exact: true }).click()
|
||||
await windows.getByRole('link', { name: new RegExp(targetGroup) }).click()
|
||||
await chat(windows).getByRole('button', { name: '启用本机群聊' }).click()
|
||||
const groupFile = chat(windows).getByRole('listitem').filter({ has: windows.getByRole('button', { name: '下载 ' + privateFile, exact: true }) })
|
||||
await groupFile.getByRole('button', { name: '收藏', exact: true }).click()
|
||||
await groupFile.getByRole('button', { name: '取消收藏', exact: true }).waitFor()
|
||||
await work(windows).getByRole('link', { name: '收藏', exact: true }).click()
|
||||
const collection = windows.getByRole('list', { name: '本机收藏' })
|
||||
await windows.getByRole('searchbox', { name: '搜索本机收藏' }).fill(privateFile)
|
||||
const downloads = collection.getByRole('button', { name: '下载 ' + privateFile, exact: true })
|
||||
await downloads.nth(1).waitFor()
|
||||
await windows.getByLabel('来源', { exact: true }).selectOption('group')
|
||||
assert.equal(await downloads.count(), 1)
|
||||
await collection.getByText(new RegExp(targetGroup)).waitFor()
|
||||
await windows.getByLabel('来源', { exact: true }).selectOption('private')
|
||||
assert.equal(await downloads.count(), 1)
|
||||
} catch (error) {
|
||||
const status = await Promise.all(pages.map((page) => page.locator('[role=alert], .group-chat [role=status]').allTextContents()))
|
||||
throw new Error(JSON.stringify(status), { cause: error })
|
||||
|
||||
Reference in new issue
Block a user