mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-17 03:27:00 +08:00
fix: 优化移动端导出消息布局与计数
- 调整移动端消息栈宽度,统一约束来源标签与消息内容\n- 精简档案计数文案,移除虚拟窗口已显示数量\n- 补充搜索前后消息保持单行展示的移动端回归测试
This commit is contained in:
@@ -256,6 +256,21 @@ test('EXPORT-ARCHIVE-01 merged v2 archive is usable offline on desktop and mobil
|
||||
).toBeLessThanOrEqual(1)
|
||||
expect(compactControlBounds.searchWidth).toBeGreaterThan(compactControlBounds.conversationWidth)
|
||||
expect(compactControlBounds.searchFontSize).toBe('16px')
|
||||
const personalMessageContent = page
|
||||
.locator('.message')
|
||||
.filter({ hasText: '个人聊天消息' })
|
||||
.locator('.content')
|
||||
const expectPersonalMessageOnOneLine = async (): Promise<void> => {
|
||||
const metrics = await personalMessageContent.evaluate((element) => {
|
||||
const styles = getComputedStyle(element)
|
||||
return {
|
||||
height: element.getBoundingClientRect().height,
|
||||
lineHeight: Number.parseFloat(styles.lineHeight)
|
||||
}
|
||||
})
|
||||
expect(metrics.height).toBeLessThanOrEqual(metrics.lineHeight + 1)
|
||||
}
|
||||
await expectPersonalMessageOnOneLine()
|
||||
await expect(conversationTrigger.locator('.conversation-switch-icon')).toHaveCSS(
|
||||
'width',
|
||||
'13px'
|
||||
@@ -276,6 +291,7 @@ test('EXPORT-ARCHIVE-01 merged v2 archive is usable offline on desktop and mobil
|
||||
await expect(searchInput).toBeVisible()
|
||||
await searchInput.fill('个人聊天消息')
|
||||
await expect(page.locator('.search-highlight')).toHaveText('个人聊天消息')
|
||||
await expectPersonalMessageOnOneLine()
|
||||
const mobileSearchResult = page.locator('.message')
|
||||
const mobileLocateButton = mobileSearchResult.getByRole('button', {
|
||||
name: '定位到聊天位置'
|
||||
|
||||
Reference in New Issue
Block a user