diff --git a/packages/page-objects/src/components/editor/TextEditor.ts b/packages/page-objects/src/components/editor/TextEditor.ts index a75ae7bf1..4b0a8d682 100644 --- a/packages/page-objects/src/components/editor/TextEditor.ts +++ b/packages/page-objects/src/components/editor/TextEditor.ts @@ -388,7 +388,7 @@ export class TextEditor extends Editor { const coordinates = await this.getCoordinates(); const lineGap = coordinates[0] - line; const lineKey = lineGap >= 0 ? Key.UP : Key.DOWN; - let nextLine = coordinates[0]; + // let nextLine = coordinates[0]; for (let i = 0; i < Math.abs(lineGap); i++) { if (await this.isLine(line)) { @@ -397,18 +397,18 @@ export class TextEditor extends Editor { await inputArea.getDriver().actions().clear(); await inputArea.sendKeys(lineKey); await inputArea.getDriver().sleep(500); - if (await this.isLine(line)) { - break; - } + // if (await this.isLine(line)) { + // break; + // } - switch (lineKey) { - case Key.UP: - nextLine = nextLine - 1; - break; - case Key.DOWN: - nextLine = nextLine + 1; - break; - } + // switch (lineKey) { + // case Key.UP: + // nextLine = nextLine - 1; + // break; + // case Key.DOWN: + // nextLine = nextLine + 1; + // break; + // } // try { // await this.waitForCursorPositionAtLine(nextLine); @@ -442,7 +442,7 @@ export class TextEditor extends Editor { const coordinates = await this.getCoordinates(); const columnGap = coordinates[1] - column; const columnKey = columnGap >= 0 ? Key.LEFT : Key.RIGHT; - let nextCol = coordinates[1]; + // let nextCol = coordinates[1]; for (let i = 0; i < Math.abs(columnGap); i++) { if (await this.isColumn(column)) { @@ -451,21 +451,21 @@ export class TextEditor extends Editor { await inputArea.getDriver().actions().clear(); await inputArea.sendKeys(columnKey); await inputArea.getDriver().sleep(500); - if (await this.isColumn(column)) { - break; - } + // if (await this.isColumn(column)) { + // break; + // } if ((await this.getCoordinates())[0] !== coordinates[0]) { throw new Error(`Column number ${column} is not accessible on line ${coordinates[0]}`); } - switch (columnKey) { - case Key.LEFT: - nextCol = nextCol - 1; - break; - case Key.RIGHT: - nextCol = nextCol + 1; - break; - } + // switch (columnKey) { + // case Key.LEFT: + // nextCol = nextCol - 1; + // break; + // case Key.RIGHT: + // nextCol = nextCol + 1; + // break; + // } // try { // await this.waitForCursorPositionAtColumn(nextCol);