From 449be615ab5a606a40af03ac447585198e5e30df Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期二, 08 九月 2026 16:02:00 +0800
Subject: [PATCH] 适配来源详情表的模板打印验收定位
---
tests/e2e/compare-field-templates.spec.ts | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/e2e/compare-field-templates.spec.ts b/tests/e2e/compare-field-templates.spec.ts
index dd14444..937a3ec 100644
--- a/tests/e2e/compare-field-templates.spec.ts
+++ b/tests/e2e/compare-field-templates.spec.ts
@@ -132,9 +132,10 @@
const popupWait = page.waitForEvent('popup')
await page.getByRole('button', { name: '打印 / 另存 PDF', exact: true }).click()
const popup = await popupWait
- await expect(popup.locator('.detail-table')).toContainText('乙温升摘要 (℃)')
- await expect(popup.locator('.detail-table')).toContainText('样品质量 (g)')
- await expect(popup.locator('.detail-table')).toContainText('20')
+ const printedFields = popup.locator('.detail-table').filter({ hasText: '乙温升摘要 (℃)' })
+ await expect(printedFields).toContainText('乙温升摘要 (℃)')
+ await expect(printedFields).toContainText('样品质量 (g)')
+ await expect(printedFields).toContainText('20')
await expect(popup.locator('.chart-card')).toContainText('mA')
await popup.close()
await page.goto(`/report-compare/${fresh.id}/edit?mode=edit`)
--
Gitblit v1.7.1