test(grid): update cell detail action tests to use displayIndex for consistency

This commit is contained in:
t8y2
2026-05-23 12:58:23 +08:00
parent 8845ac061d
commit 11117eca8e
2 changed files with 4 additions and 4 deletions
@@ -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\)"/);
});
+2 -2
View File
@@ -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/);
});