@redhat-developer/page-objects 1.2.0 → 1.4.0
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.
- package/out/components/editor/TextEditor.d.ts +62 -2
- package/out/components/editor/TextEditor.js +123 -26
- package/out/components/menu/TitleBar.d.ts +1 -0
- package/out/components/menu/TitleBar.js +1 -0
- package/out/components/menu/WindowControls.d.ts +5 -0
- package/out/components/menu/WindowControls.js +5 -0
- package/out/components/sidebar/debug/DebugView.d.ts +6 -0
- package/out/components/sidebar/debug/DebugView.js +9 -0
- package/out/components/sidebar/tree/debug/CallStackItem.d.ts +32 -0
- package/out/components/sidebar/tree/debug/CallStackItem.js +43 -0
- package/out/components/sidebar/tree/debug/DebugCallStackSection.d.ts +23 -0
- package/out/components/sidebar/tree/debug/DebugCallStackSection.js +28 -0
- package/out/components/workbench/input/Input.d.ts +5 -0
- package/out/components/workbench/input/Input.js +11 -0
- package/out/index.d.ts +2 -0
- package/out/index.js +2 -0
- package/out/locators/locators.d.ts +8 -0
- package/package.json +2 -2
|
@@ -105,7 +105,7 @@ export declare class TextEditor extends Editor {
|
|
|
105
105
|
* Find and select a given text. Not usable for multi line selection.
|
|
106
106
|
*
|
|
107
107
|
* @param text text to select
|
|
108
|
-
* @param occurrence specify which
|
|
108
|
+
* @param occurrence specify which occurrence of text to select if multiple are present in the document
|
|
109
109
|
*/
|
|
110
110
|
selectText(text: string, occurrence?: number): Promise<void>;
|
|
111
111
|
/**
|
|
@@ -132,13 +132,73 @@ export declare class TextEditor extends Editor {
|
|
|
132
132
|
* @returns promise resolving when the text is typed in
|
|
133
133
|
*/
|
|
134
134
|
typeText(text: string): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Set cursor to given position using command prompt :Ln,Col
|
|
137
|
+
* @param line line number to set to
|
|
138
|
+
* @param column column number to set to
|
|
139
|
+
* @returns Promise resolving when the cursor has reached the given coordinates
|
|
140
|
+
*/
|
|
141
|
+
setCursor(line: number, column: number, timeout?: number): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Get indentation from the status bar for the currently opened text editor
|
|
144
|
+
* @returns \{ string, number \} object which contains label and value of indentation
|
|
145
|
+
*/
|
|
146
|
+
getIndentation(): Promise<{
|
|
147
|
+
label: string;
|
|
148
|
+
value: number;
|
|
149
|
+
}>;
|
|
135
150
|
/**
|
|
136
151
|
* Move the cursor to the given coordinates
|
|
137
152
|
* @param line line number to move to
|
|
138
153
|
* @param column column number to move to
|
|
139
154
|
* @returns Promise resolving when the cursor has reached the given coordinates
|
|
140
155
|
*/
|
|
141
|
-
moveCursor(line: number, column: number): Promise<void>;
|
|
156
|
+
moveCursor(line: number, column: number, timeout?: number): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* (private) Move the cursor to the given line coordinate
|
|
159
|
+
* @param inputArea WebElement of an editor input area
|
|
160
|
+
* @param line line number to move to
|
|
161
|
+
* @returns Promise resolving when the cursor has reached the given line coordinate
|
|
162
|
+
*/
|
|
163
|
+
private moveCursorToLine;
|
|
164
|
+
/**
|
|
165
|
+
* (private) Move the cursor to the given column coordinate
|
|
166
|
+
* @param inputArea WebElement of an editor input area
|
|
167
|
+
* @param column column number to move to
|
|
168
|
+
* @returns Promise resolving when the cursor has reached the given column coordinate
|
|
169
|
+
*/
|
|
170
|
+
private moveCursorToColumn;
|
|
171
|
+
/**
|
|
172
|
+
* (private) Check if the cursor is already on requested line
|
|
173
|
+
* @param line line number to check against current cursor position
|
|
174
|
+
* @returns true / false
|
|
175
|
+
*/
|
|
176
|
+
private isLine;
|
|
177
|
+
/**
|
|
178
|
+
* (private) Check if the cursor is already on requested column
|
|
179
|
+
* @param column column number to check against current cursor position
|
|
180
|
+
* @returns true / false
|
|
181
|
+
*/
|
|
182
|
+
private isColumn;
|
|
183
|
+
/**
|
|
184
|
+
* (private) Dynamic waiting for cursor position movements
|
|
185
|
+
* @param line line number to wait
|
|
186
|
+
* @param column column number to wait
|
|
187
|
+
* @param timeout default timeout
|
|
188
|
+
*/
|
|
189
|
+
private waitForCursorPositionAt;
|
|
190
|
+
/**
|
|
191
|
+
* (private) Dynamic waiting for cursor position movements at line
|
|
192
|
+
* @param line line number to wait
|
|
193
|
+
* @param timeout
|
|
194
|
+
*/
|
|
195
|
+
private waitForCursorPositionAtLine;
|
|
196
|
+
/**
|
|
197
|
+
* (private) Dynamic waiting for cursor position movements at column
|
|
198
|
+
* @param column column number to wait
|
|
199
|
+
* @param timeout
|
|
200
|
+
*/
|
|
201
|
+
private waitForCursorPositionAtColumn;
|
|
142
202
|
/**
|
|
143
203
|
* Get number of lines in the editor
|
|
144
204
|
* @returns Promise resolving to number of lines
|
|
@@ -225,7 +225,7 @@ class TextEditor extends Editor_1.Editor {
|
|
|
225
225
|
* Find and select a given text. Not usable for multi line selection.
|
|
226
226
|
*
|
|
227
227
|
* @param text text to select
|
|
228
|
-
* @param occurrence specify which
|
|
228
|
+
* @param occurrence specify which occurrence of text to select if multiple are present in the document
|
|
229
229
|
*/
|
|
230
230
|
async selectText(text, occurrence = 1) {
|
|
231
231
|
const lineNum = await this.getLineOfText(text, occurrence);
|
|
@@ -318,47 +318,144 @@ class TextEditor extends Editor_1.Editor {
|
|
|
318
318
|
const inputarea = await this.findElement(TextEditor.locators.Editor.inputArea);
|
|
319
319
|
await inputarea.sendKeys(text);
|
|
320
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Set cursor to given position using command prompt :Ln,Col
|
|
323
|
+
* @param line line number to set to
|
|
324
|
+
* @param column column number to set to
|
|
325
|
+
* @returns Promise resolving when the cursor has reached the given coordinates
|
|
326
|
+
*/
|
|
327
|
+
async setCursor(line, column, timeout = 2_500) {
|
|
328
|
+
const input = await new __1.Workbench().openCommandPrompt();
|
|
329
|
+
await input.setText(`:${line},${column}`);
|
|
330
|
+
await input.confirm();
|
|
331
|
+
await this.waitForCursorPositionAt(line, column, timeout);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Get indentation from the status bar for the currently opened text editor
|
|
335
|
+
* @returns \{ string, number \} object which contains label and value of indentation
|
|
336
|
+
*/
|
|
337
|
+
async getIndentation() {
|
|
338
|
+
const indentation = await new StatusBar_1.StatusBar().getCurrentIndentation();
|
|
339
|
+
const value = Number(indentation.match(/\d+/g)?.at(0));
|
|
340
|
+
const label = indentation.match(/^[a-zA-Z\s]+/g)?.at(0);
|
|
341
|
+
return { label, value };
|
|
342
|
+
}
|
|
321
343
|
/**
|
|
322
344
|
* Move the cursor to the given coordinates
|
|
323
345
|
* @param line line number to move to
|
|
324
346
|
* @param column column number to move to
|
|
325
347
|
* @returns Promise resolving when the cursor has reached the given coordinates
|
|
326
348
|
*/
|
|
327
|
-
async moveCursor(line, column) {
|
|
349
|
+
async moveCursor(line, column, timeout = 10_000) {
|
|
328
350
|
if (line < 1 || line > (await this.getNumberOfLines())) {
|
|
329
351
|
throw new Error(`Line number ${line} does not exist`);
|
|
330
352
|
}
|
|
331
353
|
if (column < 1) {
|
|
332
354
|
throw new Error(`Column number ${column} does not exist`);
|
|
333
355
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
await
|
|
337
|
-
await
|
|
356
|
+
const inputarea = await this.findElement(TextEditor.locators.Editor.inputArea);
|
|
357
|
+
await inputarea.getDriver().wait(async () => {
|
|
358
|
+
await this.moveCursorToLine(inputarea, line);
|
|
359
|
+
return await this.isLine(line);
|
|
360
|
+
}, timeout, `Unable to move cursor to line: ${line}`);
|
|
361
|
+
await inputarea.getDriver().wait(async () => {
|
|
362
|
+
await this.moveCursorToColumn(inputarea, column);
|
|
363
|
+
return await this.isColumn(column);
|
|
364
|
+
}, timeout, `Unable to move cursor to column: ${column}`);
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* (private) Move the cursor to the given line coordinate
|
|
368
|
+
* @param inputArea WebElement of an editor input area
|
|
369
|
+
* @param line line number to move to
|
|
370
|
+
* @returns Promise resolving when the cursor has reached the given line coordinate
|
|
371
|
+
*/
|
|
372
|
+
async moveCursorToLine(inputArea, line) {
|
|
373
|
+
const coordinates = await this.getCoordinates();
|
|
374
|
+
const lineGap = coordinates[0] - line;
|
|
375
|
+
const lineKey = lineGap >= 0 ? selenium_webdriver_1.Key.UP : selenium_webdriver_1.Key.DOWN;
|
|
376
|
+
for (let i = 0; i < Math.abs(lineGap); i++) {
|
|
377
|
+
if (await this.isLine(line)) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
await inputArea.getDriver().actions().clear();
|
|
381
|
+
await inputArea.sendKeys(lineKey);
|
|
382
|
+
await inputArea.getDriver().sleep(500);
|
|
338
383
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* (private) Move the cursor to the given column coordinate
|
|
387
|
+
* @param inputArea WebElement of an editor input area
|
|
388
|
+
* @param column column number to move to
|
|
389
|
+
* @returns Promise resolving when the cursor has reached the given column coordinate
|
|
390
|
+
*/
|
|
391
|
+
async moveCursorToColumn(inputArea, column) {
|
|
392
|
+
const coordinates = await this.getCoordinates();
|
|
393
|
+
const columnGap = coordinates[1] - column;
|
|
394
|
+
const columnKey = columnGap >= 0 ? selenium_webdriver_1.Key.LEFT : selenium_webdriver_1.Key.RIGHT;
|
|
395
|
+
for (let i = 0; i < Math.abs(columnGap); i++) {
|
|
396
|
+
if (await this.isColumn(column)) {
|
|
397
|
+
break;
|
|
346
398
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
const actualCoordinates = (await this.getCoordinates())[0];
|
|
353
|
-
if (actualCoordinates !== coordinates[0]) {
|
|
354
|
-
throw new Error(`Column number ${column} is not accessible on line ${line}`);
|
|
355
|
-
}
|
|
399
|
+
await inputArea.getDriver().actions().clear();
|
|
400
|
+
await inputArea.sendKeys(columnKey);
|
|
401
|
+
await inputArea.getDriver().sleep(500);
|
|
402
|
+
if ((await this.getCoordinates())[0] !== coordinates[0]) {
|
|
403
|
+
throw new Error(`Column number ${column} is not accessible on line ${coordinates[0]}`);
|
|
356
404
|
}
|
|
357
405
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* (private) Check if the cursor is already on requested line
|
|
409
|
+
* @param line line number to check against current cursor position
|
|
410
|
+
* @returns true / false
|
|
411
|
+
*/
|
|
412
|
+
async isLine(line) {
|
|
413
|
+
const actualCoordinates = await this.getCoordinates();
|
|
414
|
+
if (actualCoordinates[0] === line) {
|
|
415
|
+
return true;
|
|
416
|
+
}
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* (private) Check if the cursor is already on requested column
|
|
421
|
+
* @param column column number to check against current cursor position
|
|
422
|
+
* @returns true / false
|
|
423
|
+
*/
|
|
424
|
+
async isColumn(column) {
|
|
425
|
+
const actualCoordinates = await this.getCoordinates();
|
|
426
|
+
if (actualCoordinates[1] === column) {
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* (private) Dynamic waiting for cursor position movements
|
|
433
|
+
* @param line line number to wait
|
|
434
|
+
* @param column column number to wait
|
|
435
|
+
* @param timeout default timeout
|
|
436
|
+
*/
|
|
437
|
+
async waitForCursorPositionAt(line, column, timeout = 2_500) {
|
|
438
|
+
(await this.waitForCursorPositionAtLine(line, timeout)) && (await this.waitForCursorPositionAtColumn(column, timeout));
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* (private) Dynamic waiting for cursor position movements at line
|
|
442
|
+
* @param line line number to wait
|
|
443
|
+
* @param timeout
|
|
444
|
+
*/
|
|
445
|
+
async waitForCursorPositionAtLine(line, timeout) {
|
|
446
|
+
return await this.getDriver().wait(async () => {
|
|
447
|
+
return await this.isLine(line);
|
|
448
|
+
}, timeout, `Unable to set cursor at line ${line}`, 500);
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* (private) Dynamic waiting for cursor position movements at column
|
|
452
|
+
* @param column column number to wait
|
|
453
|
+
* @param timeout
|
|
454
|
+
*/
|
|
455
|
+
async waitForCursorPositionAtColumn(column, timeout) {
|
|
456
|
+
return await this.getDriver().wait(async () => {
|
|
457
|
+
return await this.isColumn(column);
|
|
458
|
+
}, timeout, `Unable to set cursor at column ${column}`, 500);
|
|
362
459
|
}
|
|
363
460
|
/**
|
|
364
461
|
* Get number of lines in the editor
|
|
@@ -18,27 +18,32 @@ import { AbstractElement } from '../AbstractElement';
|
|
|
18
18
|
import { TitleBar } from '../..';
|
|
19
19
|
/**
|
|
20
20
|
* Page object for the windows controls part of the title bar
|
|
21
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
21
22
|
*/
|
|
22
23
|
export declare class WindowControls extends AbstractElement {
|
|
23
24
|
constructor(bar?: TitleBar);
|
|
24
25
|
/**
|
|
25
26
|
* Use the minimize window button
|
|
26
27
|
* @returns Promise resolving when minimize button is pressed
|
|
28
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
27
29
|
*/
|
|
28
30
|
minimize(): Promise<void>;
|
|
29
31
|
/**
|
|
30
32
|
* Use the maximize window button if the window is not maximized
|
|
31
33
|
* @returns Promise resolving when maximize button is pressed
|
|
34
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
32
35
|
*/
|
|
33
36
|
maximize(): Promise<void>;
|
|
34
37
|
/**
|
|
35
38
|
* Use the restore window button if the window is maximized
|
|
36
39
|
* @returns Promise resolving when restore button is pressed
|
|
40
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
37
41
|
*/
|
|
38
42
|
restore(): Promise<void>;
|
|
39
43
|
/**
|
|
40
44
|
* Use the window close button. Use at your own risk.
|
|
41
45
|
* @returns Promise resolving when close button is pressed
|
|
46
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
42
47
|
*/
|
|
43
48
|
close(): Promise<void>;
|
|
44
49
|
}
|
|
@@ -21,6 +21,7 @@ const AbstractElement_1 = require("../AbstractElement");
|
|
|
21
21
|
const __1 = require("../..");
|
|
22
22
|
/**
|
|
23
23
|
* Page object for the windows controls part of the title bar
|
|
24
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
24
25
|
*/
|
|
25
26
|
class WindowControls extends AbstractElement_1.AbstractElement {
|
|
26
27
|
constructor(bar = new __1.TitleBar()) {
|
|
@@ -29,6 +30,7 @@ class WindowControls extends AbstractElement_1.AbstractElement {
|
|
|
29
30
|
/**
|
|
30
31
|
* Use the minimize window button
|
|
31
32
|
* @returns Promise resolving when minimize button is pressed
|
|
33
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
32
34
|
*/
|
|
33
35
|
async minimize() {
|
|
34
36
|
const minButton = await this.findElement(WindowControls.locators.WindowControls.minimize);
|
|
@@ -37,6 +39,7 @@ class WindowControls extends AbstractElement_1.AbstractElement {
|
|
|
37
39
|
/**
|
|
38
40
|
* Use the maximize window button if the window is not maximized
|
|
39
41
|
* @returns Promise resolving when maximize button is pressed
|
|
42
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
40
43
|
*/
|
|
41
44
|
async maximize() {
|
|
42
45
|
let maxButton;
|
|
@@ -51,6 +54,7 @@ class WindowControls extends AbstractElement_1.AbstractElement {
|
|
|
51
54
|
/**
|
|
52
55
|
* Use the restore window button if the window is maximized
|
|
53
56
|
* @returns Promise resolving when restore button is pressed
|
|
57
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
54
58
|
*/
|
|
55
59
|
async restore() {
|
|
56
60
|
let maxButton;
|
|
@@ -65,6 +69,7 @@ class WindowControls extends AbstractElement_1.AbstractElement {
|
|
|
65
69
|
/**
|
|
66
70
|
* Use the window close button. Use at your own risk.
|
|
67
71
|
* @returns Promise resolving when close button is pressed
|
|
72
|
+
* @deprecated Window Control is no more available in a DOM of Visual Studio Code
|
|
68
73
|
*/
|
|
69
74
|
async close() {
|
|
70
75
|
const closeButton = await this.findElement(WindowControls.locators.WindowControls.close);
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { SideBarView } from '../SideBarView';
|
|
18
18
|
import { DebugBreakpointSection } from '../tree/debug/DebugBreakpointSection';
|
|
19
|
+
import { DebugCallStackSection } from '../tree/debug/DebugCallStackSection';
|
|
19
20
|
import { DebugVariableSection } from '../tree/debug/DebugVariablesSection';
|
|
20
21
|
/**
|
|
21
22
|
* Page object representing the Run/Debug view in the side bar
|
|
@@ -47,4 +48,9 @@ export declare class DebugView extends SideBarView {
|
|
|
47
48
|
* Start Debugging using the current launch configuration
|
|
48
49
|
*/
|
|
49
50
|
start(): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Get Call Stack section
|
|
53
|
+
* @returns CallStackSection page object
|
|
54
|
+
*/
|
|
55
|
+
getCallStackSection(): Promise<DebugCallStackSection>;
|
|
50
56
|
}
|
|
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
exports.DebugView = void 0;
|
|
20
20
|
const SideBarView_1 = require("../SideBarView");
|
|
21
21
|
const DebugBreakpointSection_1 = require("../tree/debug/DebugBreakpointSection");
|
|
22
|
+
const DebugCallStackSection_1 = require("../tree/debug/DebugCallStackSection");
|
|
22
23
|
const DebugVariablesSection_1 = require("../tree/debug/DebugVariablesSection");
|
|
23
24
|
/**
|
|
24
25
|
* Page object representing the Run/Debug view in the side bar
|
|
@@ -82,6 +83,14 @@ class DebugView extends SideBarView_1.SideBarView {
|
|
|
82
83
|
const action = await this.getTitlePart().findElement(DebugView.locators.DebugView.launchCombo);
|
|
83
84
|
await action.findElement(DebugView.locators.DebugView.startButton).click();
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Get Call Stack section
|
|
88
|
+
* @returns CallStackSection page object
|
|
89
|
+
*/
|
|
90
|
+
async getCallStackSection() {
|
|
91
|
+
const content = this.getContent();
|
|
92
|
+
return content.getSection(DebugCallStackSection_1.DebugCallStackSection.locators.DebugCallStackSection.predicate, DebugCallStackSection_1.DebugCallStackSection);
|
|
93
|
+
}
|
|
85
94
|
}
|
|
86
95
|
exports.DebugView = DebugView;
|
|
87
96
|
//# sourceMappingURL=DebugView.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License", destination); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { WebElement } from 'selenium-webdriver';
|
|
18
|
+
import { TreeSection } from '../TreeSection';
|
|
19
|
+
import { CustomTreeItem } from '../custom/CustomTreeItem';
|
|
20
|
+
export declare class CallStackItem extends CustomTreeItem {
|
|
21
|
+
constructor(element: WebElement, viewPart: TreeSection);
|
|
22
|
+
/**
|
|
23
|
+
* Get label of the Call Stack item.
|
|
24
|
+
* @returns a promise resolving to Call Stack item label string
|
|
25
|
+
*/
|
|
26
|
+
getLabel(): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Get text of the Call Stack item.
|
|
29
|
+
* @returns a promise resolving to Call Stack item text string
|
|
30
|
+
*/
|
|
31
|
+
getText(): Promise<string>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
4
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
5
|
+
* this work for additional information regarding copyright ownership.
|
|
6
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
7
|
+
* (the "License", destination); you may not use this file except in compliance with
|
|
8
|
+
* the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.CallStackItem = void 0;
|
|
20
|
+
const CustomTreeItem_1 = require("../custom/CustomTreeItem");
|
|
21
|
+
class CallStackItem extends CustomTreeItem_1.CustomTreeItem {
|
|
22
|
+
constructor(element, viewPart) {
|
|
23
|
+
super(element, viewPart);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get label of the Call Stack item.
|
|
27
|
+
* @returns a promise resolving to Call Stack item label string
|
|
28
|
+
*/
|
|
29
|
+
async getLabel() {
|
|
30
|
+
const name = await this.findElement(CallStackItem.locators.CallStackItem.label);
|
|
31
|
+
return await name?.getAttribute('textContent');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get text of the Call Stack item.
|
|
35
|
+
* @returns a promise resolving to Call Stack item text string
|
|
36
|
+
*/
|
|
37
|
+
async getText() {
|
|
38
|
+
const value = await this.findElement(CallStackItem.locators.CallStackItem.text);
|
|
39
|
+
return await value.getText();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.CallStackItem = CallStackItem;
|
|
43
|
+
//# sourceMappingURL=CallStackItem.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
* this work for additional information regarding copyright ownership.
|
|
5
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
* (the "License", destination); you may not use this file except in compliance with
|
|
7
|
+
* the License. You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { WebElement } from 'selenium-webdriver';
|
|
18
|
+
import { ViewContent } from '../../ViewContent';
|
|
19
|
+
import { GenericCustomTreeSection } from '../custom/CustomTreeSection';
|
|
20
|
+
import { CallStackItem } from './CallStackItem';
|
|
21
|
+
export declare class DebugCallStackSection extends GenericCustomTreeSection<CallStackItem> {
|
|
22
|
+
constructor(panel: WebElement, viewContent: ViewContent);
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
4
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
5
|
+
* this work for additional information regarding copyright ownership.
|
|
6
|
+
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
7
|
+
* (the "License", destination); you may not use this file except in compliance with
|
|
8
|
+
* the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.DebugCallStackSection = void 0;
|
|
20
|
+
const CustomTreeSection_1 = require("../custom/CustomTreeSection");
|
|
21
|
+
const CallStackItem_1 = require("./CallStackItem");
|
|
22
|
+
class DebugCallStackSection extends CustomTreeSection_1.GenericCustomTreeSection {
|
|
23
|
+
constructor(panel, viewContent) {
|
|
24
|
+
super(panel, viewContent, CallStackItem_1.CallStackItem);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.DebugCallStackSection = DebugCallStackSection;
|
|
28
|
+
//# sourceMappingURL=DebugCallStackSection.js.map
|
|
@@ -120,4 +120,9 @@ export declare class QuickPickItem extends AbstractElement {
|
|
|
120
120
|
* @returns Promise resolving when the item has been clicked
|
|
121
121
|
*/
|
|
122
122
|
select(): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* Checks if QuickPickItem is selected.
|
|
125
|
+
* @returns Promise resolving to true/false.
|
|
126
|
+
*/
|
|
127
|
+
isSelected(): Promise<boolean>;
|
|
123
128
|
}
|
|
@@ -253,6 +253,17 @@ class QuickPickItem extends AbstractElement_1.AbstractElement {
|
|
|
253
253
|
async select() {
|
|
254
254
|
await this.click();
|
|
255
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* Checks if QuickPickItem is selected.
|
|
258
|
+
* @returns Promise resolving to true/false.
|
|
259
|
+
*/
|
|
260
|
+
async isSelected() {
|
|
261
|
+
const checked = await this.getAttribute(Input.locators.Input.quickPickIsSelected);
|
|
262
|
+
if (checked === 'true') {
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
256
267
|
}
|
|
257
268
|
exports.QuickPickItem = QuickPickItem;
|
|
258
269
|
//# sourceMappingURL=Input.js.map
|
package/out/index.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ export * from './components/sidebar/tree/debug/DebugBreakpointSection';
|
|
|
42
42
|
export * from './components/sidebar/tree/debug/BreakpointSectionItem';
|
|
43
43
|
export * from './components/sidebar/tree/debug/DebugVariablesSection';
|
|
44
44
|
export * from './components/sidebar/tree/debug/VariableSectionItem';
|
|
45
|
+
export * from './components/sidebar/tree/debug/CallStackItem';
|
|
46
|
+
export * from './components/sidebar/tree/debug/DebugCallStackSection';
|
|
45
47
|
export * from './components/sidebar/extensions/ExtensionsViewSection';
|
|
46
48
|
export * from './components/sidebar/extensions/ExtensionsViewItem';
|
|
47
49
|
export { ScmView, ScmProvider, ScmChange } from './components/sidebar/scm/ScmView';
|
package/out/index.js
CHANGED
|
@@ -61,6 +61,8 @@ __exportStar(require("./components/sidebar/tree/debug/DebugBreakpointSection"),
|
|
|
61
61
|
__exportStar(require("./components/sidebar/tree/debug/BreakpointSectionItem"), exports);
|
|
62
62
|
__exportStar(require("./components/sidebar/tree/debug/DebugVariablesSection"), exports);
|
|
63
63
|
__exportStar(require("./components/sidebar/tree/debug/VariableSectionItem"), exports);
|
|
64
|
+
__exportStar(require("./components/sidebar/tree/debug/CallStackItem"), exports);
|
|
65
|
+
__exportStar(require("./components/sidebar/tree/debug/DebugCallStackSection"), exports);
|
|
64
66
|
__exportStar(require("./components/sidebar/extensions/ExtensionsViewSection"), exports);
|
|
65
67
|
__exportStar(require("./components/sidebar/extensions/ExtensionsViewItem"), exports);
|
|
66
68
|
var ScmView_1 = require("./components/sidebar/scm/ScmView");
|
|
@@ -337,6 +337,13 @@ export interface Locators {
|
|
|
337
337
|
tooltip: WebElementFunction<WebElement, string>;
|
|
338
338
|
};
|
|
339
339
|
};
|
|
340
|
+
DebugCallStackSection: {
|
|
341
|
+
predicate: WebElementFunction<ViewSection, boolean>;
|
|
342
|
+
};
|
|
343
|
+
CallStackItem: {
|
|
344
|
+
label: By;
|
|
345
|
+
text: By;
|
|
346
|
+
};
|
|
340
347
|
ExtensionsViewSection: {
|
|
341
348
|
items: By;
|
|
342
349
|
itemRow: By;
|
|
@@ -438,6 +445,7 @@ export interface Locators {
|
|
|
438
445
|
quickPickLabel: By;
|
|
439
446
|
quickPickDescription: By;
|
|
440
447
|
quickPickSelectAll: By;
|
|
448
|
+
quickPickIsSelected: string;
|
|
441
449
|
titleBar: By;
|
|
442
450
|
title: By;
|
|
443
451
|
backButton: By;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redhat-developer/page-objects",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
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": "7a5b40f033471534c9afe131f3aacfe4911c0c87"
|
|
50
50
|
}
|