diff --git a/src/main/export-html-template.ts b/src/main/export-html-template.ts index 82e957a..7666dfd 100644 --- a/src/main/export-html-template.ts +++ b/src/main/export-html-template.ts @@ -427,9 +427,11 @@ body { } .message.system .avatar { display: none; } .message.system .message-stack { - max-width: 92%; + width: max-content; + max-width: 100%; } .message.system .bubble { + width: max-content; max-width: 100%; padding: 5px 10px; border: 0; diff --git a/tests/e2e/export-archive.spec.ts b/tests/e2e/export-archive.spec.ts index 1500268..ac2321a 100644 --- a/tests/e2e/export-archive.spec.ts +++ b/tests/e2e/export-archive.spec.ts @@ -805,6 +805,17 @@ test('EXPORT-ARCHIVE-03 renders shares and locations, and groups payments under await expect(recallNotices).toHaveCount(2) await expect(recallNotices.locator('.avatar')).toHaveCount(0) await expect(recallNotices.locator('.sender').first()).toBeHidden() + const recallLineMetrics = await recallNotices + .first() + .locator('.content') + .evaluate((element) => { + const styles = window.getComputedStyle(element) + return { + height: element.getBoundingClientRect().height, + lineHeight: Number.parseFloat(styles.lineHeight) + } + }) + expect(recallLineMetrics.height).toBeLessThanOrEqual(recallLineMetrics.lineHeight + 1) const locationNotice = systemNotices.filter({ hasText: '位置共享已经结束' }) await expect(locationNotice).toHaveCount(1) await expect(locationNotice.locator('.avatar')).toHaveCount(0)