diff --git a/packages/page-objects/src/components/editor/TextEditor.ts b/packages/page-objects/src/components/editor/TextEditor.ts index 545d273f9..d565d1e38 100644 --- a/packages/page-objects/src/components/editor/TextEditor.ts +++ b/packages/page-objects/src/components/editor/TextEditor.ts @@ -373,7 +373,7 @@ export class TextEditor extends Editor { for (let i = 0; i < Math.abs(lineGap); i++) { if(await this.isLine(line)) break; await inputArea.sendKeys(lineKey); - await inputArea.getDriver().sleep(150); + await inputArea.getDriver().sleep(250); if(await this.isLine(line)) break; switch (lineKey) { @@ -418,7 +418,7 @@ export class TextEditor extends Editor { for (let i = 0; i < Math.abs(columnGap); i++) { if(await this.isColumn(column)) break; await inputArea.sendKeys(columnKey); - await inputArea.getDriver().sleep(150); + await inputArea.getDriver().sleep(250); 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]}`); @@ -498,8 +498,7 @@ export class TextEditor extends Editor { */ private async waitForCursorPositionAtLine(line: number, timeout: number = 1_500): Promise { return await this.getDriver().wait(async () => { - const coor = await this.getCoordinates(); - return coor[0] === line; + return await this.isLine(line); }, timeout, `Unable to set cursor at line ${line}`); } @@ -510,8 +509,7 @@ export class TextEditor extends Editor { */ private async waitForCursorPositionAtColumn(column: number, timeout: number = 1_500): Promise { return await this.getDriver().wait(async () => { - const coor = await this.getCoordinates(); - return coor[1] === column; + return await this.isColumn(column); }, timeout, `Unable to set cursor at column ${column}`); } diff --git a/tests/test-project/src/test/editor/textEditor.test.ts b/tests/test-project/src/test/editor/textEditor.test.ts index f28ccf7d1..7e2f64af1 100644 --- a/tests/test-project/src/test/editor/textEditor.test.ts +++ b/tests/test-project/src/test/editor/textEditor.test.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import { expect } from 'chai'; import { TextEditor, EditorView, StatusBar, InputBox, ContentAssist, Workbench, FindWidget, VSBrowser, after, before, afterEach, beforeEach } from "vscode-extension-tester"; -describe('ContentAssist', async function () { +describe.only('ContentAssist', async function () { let assist: ContentAssist; let editor: TextEditor; @@ -65,7 +65,7 @@ describe('ContentAssist', async function () { }).timeout(15000); }); -describe('TextEditor', function () { +describe.only('TextEditor', function () { let editor: TextEditor; let view: EditorView;