diff --git a/packages/vtable/__tests__/visual/cases/table/list-basic.mjs b/packages/vtable/__tests__/visual/cases/table/list-basic.mjs index eb6dd00c49..e1653bd82b 100644 --- a/packages/vtable/__tests__/visual/cases/table/list-basic.mjs +++ b/packages/vtable/__tests__/visual/cases/table/list-basic.mjs @@ -1,4 +1,5 @@ /** + * BugServer case IDs: 7a7161a9fe2c41c789d8260d * 验证目的:列表表头和固定数据能正确创建、绘制与读取。 * 来源:VTable 公共 ListTable API 独立样例。 * 覆盖边界:不测试排序、编辑或虚拟滚动。 @@ -15,6 +16,9 @@ export default { // 同时检查数据语义和可见单元格位置,图片比较负责像素布局。 await page.evaluate(() => { const table = window.__visualTable; + if (table.colCount !== 2 || table.rowCount !== 3) throw new Error('列表行列数量不正确'); + if (table.getCellValue(0, 0) !== 'Name' || table.getCellValue(1, 0) !== 'Value') + throw new Error('列表表头不正确'); if (table.getCellValue(0, 1) !== 'Alpha' || table.getCellValue(1, 2) !== 20) throw new Error('列表数据不正确'); const rect = table.getCellRect(0, 1)?.bounds;