Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Jelinek <[email protected]>
  • Loading branch information
djelinek committed Apr 10, 2024
1 parent edec53b commit 61402f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions packages/page-objects/src/components/editor/TextEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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]}`);
Expand Down Expand Up @@ -498,8 +498,7 @@ export class TextEditor extends Editor {
*/
private async waitForCursorPositionAtLine(line: number, timeout: number = 1_500): Promise<boolean> {
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}`);
}

Expand All @@ -510,8 +509,7 @@ export class TextEditor extends Editor {
*/
private async waitForCursorPositionAtColumn(column: number, timeout: number = 1_500): Promise<boolean> {
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}`);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/test-project/src/test/editor/textEditor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -65,7 +65,7 @@ describe('ContentAssist', async function () {
}).timeout(15000);
});

describe('TextEditor', function () {
describe.only('TextEditor', function () {
let editor: TextEditor;
let view: EditorView;

Expand Down

0 comments on commit 61402f1

Please sign in to comment.