Remove private API access from tests/demo

This commit is contained in:
Daniel Imms
2025-12-30 04:06:26 -08:00
parent 214289aaab
commit e27cc2c089
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -300,7 +300,7 @@ test.describe('ImageAddon', () => {
* terminal access helpers.
*/
async function getDimensions(): Promise<IDimensions> {
const dimensions: any = await ctx.page.evaluate(`term._core._renderService.dimensions`);
const dimensions: any = await ctx.page.evaluate(`term.dimensions`);
return {
cellWidth: Math.round(dimensions.css.cell.width),
cellHeight: Math.round(dimensions.css.cell.height),
@@ -180,7 +180,7 @@ async function cellPos(col: number, row: number): Promise<[number, number]> {
const coords: any = await ctx.page.evaluate(`
(function() {
const rect = window.term.element.getBoundingClientRect();
const dim = term._core._renderService.dimensions;
const dim = window.term.dimensions;
return {left: rect.left, top: rect.top, bottom: rect.bottom, right: rect.right, width: dim.css.cell.width, height: dim.css.cell.height};
})();
`);