Skip to content

Commit f6c4380

Browse files
committed
Confirm that clicking where the accessibility cell works
- Should write a proper utility script for this
1 parent ad45b6d commit f6c4380

4 files changed

Lines changed: 24 additions & 0 deletions

File tree

tests/grid-accessibility.spec.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,30 @@ test.describe('grid accessibility layer', () => {
108108
// In simple_table, row headers should NOT be present since rowHeaderWidth is 0
109109
await expect(rowHeader0).not.toBeAttached();
110110
});
111+
112+
test('can click on third row cell using accessibility layer position', async ({
113+
page,
114+
}) => {
115+
// Get the cell in the third row (row index 2, zero-based)
116+
const thirdRowCell = page.getByTestId('grid-cell-0-2');
117+
await expect(thirdRowCell).toBeAttached();
118+
119+
// Get the bounding box of the accessibility element to find its position
120+
const boundingBox = await thirdRowCell.boundingBox();
121+
expect(boundingBox).not.toBeNull();
122+
if (boundingBox === null) return;
123+
124+
// Click at the center of the cell position on the canvas
125+
await page.mouse.click(
126+
boundingBox.x + boundingBox.width / 2,
127+
boundingBox.y + boundingBox.height / 2
128+
);
129+
130+
// Take a screenshot to verify the third row is selected
131+
await expect(page.locator('.iris-grid-panel .iris-grid')).toHaveScreenshot(
132+
'third-row-cell-selected.png'
133+
);
134+
});
111135
});
112136

113137
test.describe('grid accessibility layer with column groups', () => {
27 KB
Loading
44.1 KB
Loading
19.5 KB
Loading

0 commit comments

Comments
 (0)