@redhat-developer/page-objects 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -228,6 +228,11 @@ export declare class TextEditor extends Editor {
|
|
|
228
228
|
* @returns promise which resolves to either Breakpoint page object or undefined
|
|
229
229
|
*/
|
|
230
230
|
getPausedBreakpoint(): Promise<Breakpoint | undefined>;
|
|
231
|
+
/**
|
|
232
|
+
* Get all breakpoints.
|
|
233
|
+
* @returns List of Breakpoints.
|
|
234
|
+
*/
|
|
235
|
+
getBreakpoints(): Promise<Breakpoint[]>;
|
|
231
236
|
/**
|
|
232
237
|
* Get all code lenses within the editor
|
|
233
238
|
* @returns list of CodeLens page objects
|
|
@@ -379,7 +379,7 @@ class TextEditor extends Editor_1.Editor {
|
|
|
379
379
|
}
|
|
380
380
|
await inputArea.getDriver().actions().clear();
|
|
381
381
|
await inputArea.sendKeys(lineKey);
|
|
382
|
-
await inputArea.getDriver().sleep(
|
|
382
|
+
await inputArea.getDriver().sleep(50);
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
/**
|
|
@@ -398,7 +398,7 @@ class TextEditor extends Editor_1.Editor {
|
|
|
398
398
|
}
|
|
399
399
|
await inputArea.getDriver().actions().clear();
|
|
400
400
|
await inputArea.sendKeys(columnKey);
|
|
401
|
-
await inputArea.getDriver().sleep(
|
|
401
|
+
await inputArea.getDriver().sleep(50);
|
|
402
402
|
if ((await this.getCoordinates())[0] !== coordinates[0]) {
|
|
403
403
|
throw new Error(`Column number ${column} is not accessible on line ${coordinates[0]}`);
|
|
404
404
|
}
|
|
@@ -568,6 +568,28 @@ class TextEditor extends Editor_1.Editor {
|
|
|
568
568
|
}
|
|
569
569
|
return new Breakpoint_1.Breakpoint(breakpoints[0], lineElement);
|
|
570
570
|
}
|
|
571
|
+
/**
|
|
572
|
+
* Get all breakpoints.
|
|
573
|
+
* @returns List of Breakpoints.
|
|
574
|
+
*/
|
|
575
|
+
async getBreakpoints() {
|
|
576
|
+
const breakpoints = [];
|
|
577
|
+
const breakpointLocators = Breakpoint_1.Breakpoint.locators.TextEditor.breakpoint;
|
|
578
|
+
const breakpointContainer = TextEditor.versionInfo.version >= '1.80.0' ? await this.findElement(selenium_webdriver_1.By.className('glyph-margin-widgets')) : this;
|
|
579
|
+
const breakpointsSelectors = await breakpointContainer.findElements(breakpointLocators.generalSelector);
|
|
580
|
+
for (const breakpointSelector of breakpointsSelectors) {
|
|
581
|
+
let lineElement;
|
|
582
|
+
if (TextEditor.versionInfo.version >= '1.80.0') {
|
|
583
|
+
const styleTopAttr = await breakpointSelector.getCssValue('top');
|
|
584
|
+
lineElement = await this.findElement(TextEditor.locators.TextEditor.marginArea).findElement(selenium_webdriver_1.By.xpath(`.//div[contains(@style, "${styleTopAttr}")]`));
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
lineElement = await breakpointSelector.findElement(selenium_webdriver_1.By.xpath('./..'));
|
|
588
|
+
}
|
|
589
|
+
breakpoints.push(new Breakpoint_1.Breakpoint(breakpointSelector, lineElement));
|
|
590
|
+
}
|
|
591
|
+
return breakpoints;
|
|
592
|
+
}
|
|
571
593
|
/**
|
|
572
594
|
* Get all code lenses within the editor
|
|
573
595
|
* @returns list of CodeLens page objects
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redhat-developer/page-objects",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Page Object API implementation for a VS Code editor used by ExTester framework.",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"selenium-webdriver": ">=4.6.1",
|
|
47
47
|
"typescript": ">=4.6.2"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "977eb7a2de57ba26d6bc4af67b6b0d7d92dc333d"
|
|
50
50
|
}
|