From 11117eca8e1fb8393e8c6ec77f42f83ea783a360 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sat, 23 May 2026 12:58:23 +0800 Subject: [PATCH] test(grid): update cell detail action tests to use displayIndex for consistency --- packages/app-tests/cellDetailPresentation.test.ts | 4 ++-- packages/app-tests/domDensitySource.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app-tests/cellDetailPresentation.test.ts b/packages/app-tests/cellDetailPresentation.test.ts index 742ac46c2a..2d04d11b21 100644 --- a/packages/app-tests/cellDetailPresentation.test.ts +++ b/packages/app-tests/cellDetailPresentation.test.ts @@ -86,6 +86,6 @@ test("cell detail action focuses the hovered cell before opening details", () => /function showCellDetailsForVisibleCell\(rowIndex: number, visibleColIdx: number, actualColIdx: number\)/, ); assert.match(source, /selectSingleCell\(rowIndex, visibleColIdx\)/); - assert.match(source, /@click\.stop="showCellDetailsForVisibleCell\(index, visibleColIdx, actualColIdx\)"/); - assert.doesNotMatch(source, /@click\.stop="showCellDetails\(index, actualColIdx\)"/); + assert.match(source, /@click\.stop="showCellDetailsForVisibleCell\(item\.displayIndex, visibleColIdx, actualColIdx\)"/); + assert.doesNotMatch(source, /@click\.stop="showCellDetails\(item\.displayIndex, actualColIdx\)"/); }); diff --git a/packages/app-tests/domDensitySource.test.ts b/packages/app-tests/domDensitySource.test.ts index a60cd3fbec..c0e13c3938 100644 --- a/packages/app-tests/domDensitySource.test.ts +++ b/packages/app-tests/domDensitySource.test.ts @@ -6,7 +6,7 @@ const dataGridSource = readFileSync("apps/desktop/src/components/grid/DataGrid.v test("data grid mounts the cell detail action only for the active cell", () => { assert.match(dataGridSource, /cellDetailButtonVisible/); - assert.match(dataGridSource, /v-if="cellDetailButtonVisible\(index, actualColIdx\)"/); - assert.match(dataGridSource, /@mouseenter="onCellMouseenter\(index, visibleColIdx, actualColIdx\)"/); + assert.match(dataGridSource, /v-if="cellDetailButtonVisible\(item\.displayIndex, actualColIdx\)"/); + assert.match(dataGridSource, /@mouseenter="onCellMouseenter\(item\.displayIndex, visibleColIdx, actualColIdx\)"/); assert.doesNotMatch(dataGridSource, /group-hover\/cell:flex/); });