@redhat-developer/page-objects 1.1.1 → 1.1.2
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/AbstractElement.d.ts +2 -2
- package/out/components/AbstractElement.js +2 -2
- package/out/components/ElementWithContextMenu.d.ts +2 -2
- package/out/components/WebviewMixin.d.ts +2 -2
- package/out/components/activityBar/ActionsControl.d.ts +3 -3
- package/out/components/activityBar/ActivityBar.d.ts +2 -2
- package/out/components/activityBar/ViewControl.d.ts +3 -3
- package/out/components/bottomBar/AbstractViews.d.ts +4 -4
- package/out/components/bottomBar/AbstractViews.js +8 -7
- package/out/components/bottomBar/BottomBarPanel.d.ts +2 -2
- package/out/components/bottomBar/BottomBarPanel.js +2 -3
- package/out/components/bottomBar/ProblemsView.d.ts +3 -3
- package/out/components/bottomBar/ProblemsView.js +7 -5
- package/out/components/bottomBar/Views.d.ts +3 -3
- package/out/components/bottomBar/Views.js +1 -1
- package/out/components/bottomBar/WebviewView.d.ts +2 -2
- package/out/components/dialog/ModalDialog.d.ts +2 -2
- package/out/components/dialog/ModalDialog.js +1 -1
- package/out/components/editor/ContentAssist.d.ts +1 -1
- package/out/components/editor/ContentAssist.js +6 -5
- package/out/components/editor/CustomEditor.d.ts +1 -1
- package/out/components/editor/Editor.d.ts +2 -2
- package/out/components/editor/Editor.js +1 -1
- package/out/components/editor/EditorAction.d.ts +3 -3
- package/out/components/editor/EditorView.d.ts +5 -5
- package/out/components/editor/EditorView.js +12 -7
- package/out/components/editor/SettingsEditor.d.ts +11 -11
- package/out/components/editor/SettingsEditor.js +20 -19
- package/out/components/editor/TextEditor.d.ts +6 -6
- package/out/components/editor/TextEditor.js +15 -13
- package/out/components/editor/WebView.d.ts +2 -2
- package/out/components/editor/WebView.js +2 -2
- package/out/components/menu/ContextMenu.d.ts +2 -2
- package/out/components/menu/ContextMenu.js +2 -2
- package/out/components/menu/MacTitleBar.js +1 -5
- package/out/components/menu/Menu.d.ts +2 -2
- package/out/components/menu/Menu.js +2 -2
- package/out/components/menu/MenuItem.d.ts +2 -2
- package/out/components/menu/MenuItem.js +1 -1
- package/out/components/menu/TitleBar.d.ts +3 -3
- package/out/components/menu/TitleBar.js +2 -2
- package/out/components/menu/WindowControls.d.ts +2 -2
- package/out/components/sidebar/SideBarView.d.ts +2 -2
- package/out/components/sidebar/ViewContent.d.ts +4 -4
- package/out/components/sidebar/ViewContent.js +1 -2
- package/out/components/sidebar/ViewItem.d.ts +3 -3
- package/out/components/sidebar/ViewItem.js +7 -7
- package/out/components/sidebar/ViewSection.d.ts +3 -3
- package/out/components/sidebar/ViewSection.js +7 -7
- package/out/components/sidebar/ViewTitlePart.d.ts +3 -3
- package/out/components/sidebar/WelcomeContent.d.ts +3 -3
- package/out/components/sidebar/WelcomeContent.js +1 -1
- package/out/components/sidebar/debug/DebugView.d.ts +3 -3
- package/out/components/sidebar/extensions/ExtensionsViewItem.d.ts +4 -4
- package/out/components/sidebar/extensions/ExtensionsViewSection.d.ts +2 -2
- package/out/components/sidebar/extensions/ExtensionsViewSection.js +3 -3
- package/out/components/sidebar/scm/NewScmView.d.ts +2 -2
- package/out/components/sidebar/scm/NewScmView.js +14 -14
- package/out/components/sidebar/scm/ScmView.d.ts +5 -5
- package/out/components/sidebar/scm/ScmView.js +8 -8
- package/out/components/sidebar/tree/TreeSection.d.ts +3 -3
- package/out/components/sidebar/tree/TreeSection.js +4 -4
- package/out/components/sidebar/tree/custom/CustomTreeItem.d.ts +3 -3
- package/out/components/sidebar/tree/custom/CustomTreeSection.d.ts +5 -5
- package/out/components/sidebar/tree/custom/CustomTreeSection.js +2 -2
- package/out/components/sidebar/tree/debug/BreakpointSectionItem.d.ts +4 -4
- package/out/components/sidebar/tree/debug/BreakpointSectionItem.js +1 -1
- package/out/components/sidebar/tree/debug/DebugBreakpointSection.d.ts +4 -4
- package/out/components/sidebar/tree/debug/DebugVariablesSection.d.ts +4 -4
- package/out/components/sidebar/tree/debug/SectionBreakpoint.d.ts +1 -1
- package/out/components/sidebar/tree/debug/VariableSectionItem.d.ts +3 -3
- package/out/components/sidebar/tree/default/DefaultTreeItem.d.ts +3 -3
- package/out/components/sidebar/tree/default/DefaultTreeSection.d.ts +2 -2
- package/out/components/sidebar/tree/default/DefaultTreeSection.js +1 -1
- package/out/components/statusBar/StatusBar.d.ts +3 -3
- package/out/components/statusBar/StatusBar.js +1 -1
- package/out/components/workbench/DebugToolbar.d.ts +1 -1
- package/out/components/workbench/Notification.d.ts +3 -3
- package/out/components/workbench/Notification.js +1 -2
- package/out/components/workbench/NotificationsCenter.d.ts +2 -2
- package/out/components/workbench/NotificationsCenter.js +1 -1
- package/out/components/workbench/Workbench.d.ts +12 -12
- package/out/components/workbench/Workbench.js +1 -1
- package/out/components/workbench/input/Input.d.ts +1 -1
- package/out/components/workbench/input/Input.js +13 -20
- package/out/components/workbench/input/InputBox.d.ts +1 -1
- package/out/components/workbench/input/InputBox.js +4 -5
- package/out/components/workbench/input/QuickOpenBox.d.ts +1 -1
- package/out/components/workbench/input/QuickOpenBox.js +2 -3
- package/out/conditions/WaitForAttribute.d.ts +1 -1
- package/out/locators/loader.js +8 -8
- package/out/locators/locators.d.ts +8 -8
- package/out/locators/locators.js +1 -1
- package/package.json +2 -2
|
@@ -66,7 +66,7 @@ class SingleScmProvider extends ScmView_1.ScmProvider {
|
|
|
66
66
|
buttons.push(await new ViewTitlePart_1.TitleActionButton(ScmView_1.ScmView.locators.ScmView.actionConstructor(title), titlePart).wait());
|
|
67
67
|
}
|
|
68
68
|
const names = await Promise.all(buttons.map(async (button) => button.getTitle()));
|
|
69
|
-
const index = names.findIndex(name => name === title);
|
|
69
|
+
const index = names.findIndex((name) => name === title);
|
|
70
70
|
if (index > -1) {
|
|
71
71
|
await buttons[index].click();
|
|
72
72
|
return true;
|
|
@@ -83,11 +83,11 @@ class SingleScmProvider extends ScmView_1.ScmProvider {
|
|
|
83
83
|
if (count > 0) {
|
|
84
84
|
const locator = staged ? ScmView_1.ScmProvider.locators.ScmView.stagedChanges : ScmView_1.ScmProvider.locators.ScmView.changes;
|
|
85
85
|
const header = await this.findElement(locator);
|
|
86
|
-
const startIndex = +await header.getAttribute('data-index');
|
|
87
|
-
const depth = +await header.getAttribute('aria-level') + 1;
|
|
86
|
+
const startIndex = +(await header.getAttribute('data-index'));
|
|
87
|
+
const depth = +(await header.getAttribute('aria-level')) + 1;
|
|
88
88
|
const items = await this.findElements(NewScmView.locators.ScmView.itemLevel(depth));
|
|
89
89
|
for (const item of items) {
|
|
90
|
-
const index = +await item.getAttribute('data-index');
|
|
90
|
+
const index = +(await item.getAttribute('data-index'));
|
|
91
91
|
if (index > startIndex && index <= startIndex + count) {
|
|
92
92
|
elements.push(item);
|
|
93
93
|
}
|
|
@@ -104,7 +104,7 @@ class MultiScmProvider extends ScmView_1.ScmProvider {
|
|
|
104
104
|
async takeAction(title) {
|
|
105
105
|
const actions = await this.findElements(ScmView_1.ScmProvider.locators.ScmView.action);
|
|
106
106
|
const names = await Promise.all(actions.map(async (action) => await action.getAttribute('title')));
|
|
107
|
-
const index = names.findIndex(item => item === title);
|
|
107
|
+
const index = names.findIndex((item) => item === title);
|
|
108
108
|
if (index > -1) {
|
|
109
109
|
await actions[index].click();
|
|
110
110
|
return true;
|
|
@@ -115,7 +115,7 @@ class MultiScmProvider extends ScmView_1.ScmProvider {
|
|
|
115
115
|
return await new MultiMoreAction(this).openContextMenu();
|
|
116
116
|
}
|
|
117
117
|
async commitChanges(message) {
|
|
118
|
-
const index = +await this.getAttribute('data-index') + 1;
|
|
118
|
+
const index = +(await this.getAttribute('data-index')) + 1;
|
|
119
119
|
const input = await this.enclosingItem.findElement(NewScmView.locators.ScmView.itemIndex(index));
|
|
120
120
|
await input.clear();
|
|
121
121
|
await input.sendKeys(message);
|
|
@@ -125,23 +125,23 @@ class MultiScmProvider extends ScmView_1.ScmProvider {
|
|
|
125
125
|
const count = await this.getChangeCount(staged);
|
|
126
126
|
const elements = [];
|
|
127
127
|
if (count > 0) {
|
|
128
|
-
const index = +await this.getAttribute('data-index');
|
|
128
|
+
const index = +(await this.getAttribute('data-index'));
|
|
129
129
|
const locator = staged ? ScmView_1.ScmProvider.locators.ScmView.stagedChanges : ScmView_1.ScmProvider.locators.ScmView.changes;
|
|
130
130
|
const headers = await this.enclosingItem.findElements(locator);
|
|
131
131
|
let header;
|
|
132
132
|
for (const item of headers) {
|
|
133
|
-
if (+await item.getAttribute('data-index') > index) {
|
|
133
|
+
if (+(await item.getAttribute('data-index')) > index) {
|
|
134
134
|
header = item;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
if (!header) {
|
|
138
138
|
return [];
|
|
139
139
|
}
|
|
140
|
-
const startIndex = +await header.getAttribute('data-index');
|
|
141
|
-
const depth = +await header.getAttribute('aria-level') + 1;
|
|
140
|
+
const startIndex = +(await header.getAttribute('data-index'));
|
|
141
|
+
const depth = +(await header.getAttribute('aria-level')) + 1;
|
|
142
142
|
const items = await this.enclosingItem.findElements(NewScmView.locators.ScmView.itemLevel(depth));
|
|
143
143
|
for (const item of items) {
|
|
144
|
-
const index = +await item.getAttribute('data-index');
|
|
144
|
+
const index = +(await item.getAttribute('data-index'));
|
|
145
145
|
if (index > startIndex && index <= startIndex + count) {
|
|
146
146
|
elements.push(item);
|
|
147
147
|
}
|
|
@@ -152,11 +152,11 @@ class MultiScmProvider extends ScmView_1.ScmProvider {
|
|
|
152
152
|
async getChangeCount(staged = false) {
|
|
153
153
|
const locator = staged ? ScmView_1.ScmProvider.locators.ScmView.stagedChanges : ScmView_1.ScmProvider.locators.ScmView.changes;
|
|
154
154
|
const rows = await this.enclosingItem.findElements(locator);
|
|
155
|
-
const index = +await this.getAttribute('data-index');
|
|
155
|
+
const index = +(await this.getAttribute('data-index'));
|
|
156
156
|
for (const row of rows) {
|
|
157
|
-
if (+await row.getAttribute('data-index') > index) {
|
|
157
|
+
if (+(await row.getAttribute('data-index')) > index) {
|
|
158
158
|
const count = await rows[0].findElement(ScmView_1.ScmChange.locators.ScmView.changeCount);
|
|
159
|
-
return +await count.getText();
|
|
159
|
+
return +(await count.getText());
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
return 0;
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { SideBarView } from
|
|
18
|
-
import { WebElement } from
|
|
19
|
-
import { AbstractElement } from
|
|
20
|
-
import { ContextMenu } from
|
|
21
|
-
import { ElementWithContexMenu } from
|
|
17
|
+
import { SideBarView } from '../SideBarView';
|
|
18
|
+
import { WebElement } from 'selenium-webdriver';
|
|
19
|
+
import { AbstractElement } from '../../AbstractElement';
|
|
20
|
+
import { ContextMenu } from '../../..';
|
|
21
|
+
import { ElementWithContexMenu } from '../../ElementWithContextMenu';
|
|
22
22
|
/**
|
|
23
23
|
* Page object representing the Source Control view
|
|
24
24
|
*/
|
|
@@ -37,7 +37,7 @@ class ScmView extends SideBarView_1.SideBarView {
|
|
|
37
37
|
return providers[0];
|
|
38
38
|
}
|
|
39
39
|
const names = await Promise.all(providers.map(async (item) => await item.getTitle()));
|
|
40
|
-
const index = names.findIndex(name => name === title);
|
|
40
|
+
const index = names.findIndex((name) => name === title);
|
|
41
41
|
return index > -1 ? providers[index] : undefined;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -100,7 +100,7 @@ class ScmProvider extends AbstractElement_1.AbstractElement {
|
|
|
100
100
|
actions = await header.findElements(ScmProvider.locators.ScmView.action);
|
|
101
101
|
}
|
|
102
102
|
const names = await Promise.all(actions.map(async (action) => await action.getAttribute('title')));
|
|
103
|
-
const index = names.findIndex(item => item === title);
|
|
103
|
+
const index = names.findIndex((item) => item === title);
|
|
104
104
|
if (index > -1) {
|
|
105
105
|
await actions[index].click();
|
|
106
106
|
return true;
|
|
@@ -146,7 +146,7 @@ class ScmProvider extends AbstractElement_1.AbstractElement {
|
|
|
146
146
|
elements = await this.findElements(ScmProvider.locators.ScmView.changeItem);
|
|
147
147
|
for (const [index, item] of elements.entries()) {
|
|
148
148
|
const name = await item.findElement(ScmProvider.locators.ScmView.changeName);
|
|
149
|
-
if (await name.getText() === label) {
|
|
149
|
+
if ((await name.getText()) === label) {
|
|
150
150
|
i = index + 1;
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
@@ -170,7 +170,7 @@ class ScmProvider extends AbstractElement_1.AbstractElement {
|
|
|
170
170
|
return 0;
|
|
171
171
|
}
|
|
172
172
|
const count = await rows[0].findElement(ScmChange.locators.ScmView.changeCount);
|
|
173
|
-
return +await count.getText();
|
|
173
|
+
return +(await count.getText());
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
exports.ScmProvider = ScmProvider;
|
|
@@ -226,7 +226,7 @@ class ScmChange extends ElementWithContextMenu_1.ElementWithContexMenu {
|
|
|
226
226
|
* @returns promise resolving to true if the item changed state, to false otherwise
|
|
227
227
|
*/
|
|
228
228
|
async toggleExpand(expand) {
|
|
229
|
-
if (await this.isExpanded() !== expand) {
|
|
229
|
+
if ((await this.isExpanded()) !== expand) {
|
|
230
230
|
await this.click();
|
|
231
231
|
return true;
|
|
232
232
|
}
|
|
@@ -242,7 +242,7 @@ class ScmChange extends ElementWithContextMenu_1.ElementWithContexMenu {
|
|
|
242
242
|
await this.getDriver().actions().move({ origin: this }).perform();
|
|
243
243
|
const actions = await this.findElements(ScmChange.locators.ScmView.action);
|
|
244
244
|
const names = await Promise.all(actions.map(async (action) => await action.getAttribute(ScmChange.locators.ScmView.actionLabel)));
|
|
245
|
-
const index = names.findIndex(item => item === title);
|
|
245
|
+
const index = names.findIndex((item) => item === title);
|
|
246
246
|
if (index > -1) {
|
|
247
247
|
await actions[index].click();
|
|
248
248
|
return true;
|
|
@@ -264,7 +264,7 @@ class MoreAction extends ElementWithContextMenu_1.ElementWithContexMenu {
|
|
|
264
264
|
const webdriverCapabilities = await this.getDriver().getCapabilities();
|
|
265
265
|
const chromiumVersion = webdriverCapabilities.getBrowserVersion();
|
|
266
266
|
if (shadowRootHost.length > 0) {
|
|
267
|
-
if (await this.getAttribute('aria-expanded') !== 'true') {
|
|
267
|
+
if ((await this.getAttribute('aria-expanded')) !== 'true') {
|
|
268
268
|
await this.click();
|
|
269
269
|
}
|
|
270
270
|
let shadowRoot;
|
|
@@ -275,7 +275,7 @@ class MoreAction extends ElementWithContextMenu_1.ElementWithContexMenu {
|
|
|
275
275
|
return new __1.ContextMenu(await shadowRoot.findElement(selenium_webdriver_1.By.className('monaco-menu-container'))).wait();
|
|
276
276
|
}
|
|
277
277
|
else {
|
|
278
|
-
shadowRoot = await this.getDriver().executeScript('return arguments[0].shadowRoot', shadowRootHost[0]);
|
|
278
|
+
shadowRoot = (await this.getDriver().executeScript('return arguments[0].shadowRoot', shadowRootHost[0]));
|
|
279
279
|
return new __1.ContextMenu(shadowRoot).wait();
|
|
280
280
|
}
|
|
281
281
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { ViewSection } from
|
|
18
|
-
import { TreeItem } from
|
|
19
|
-
import { error } from
|
|
17
|
+
import { ViewSection } from '../ViewSection';
|
|
18
|
+
import { TreeItem } from '../ViewItem';
|
|
19
|
+
import { error } from 'selenium-webdriver';
|
|
20
20
|
export declare class TreeItemNotFoundError extends error.NoSuchElementError {
|
|
21
21
|
constructor(msg?: string);
|
|
22
22
|
}
|
|
@@ -34,7 +34,7 @@ class TreeSection extends ViewSection_1.ViewSection {
|
|
|
34
34
|
let items = [];
|
|
35
35
|
for (let i = 0; i < path.length; i++) {
|
|
36
36
|
const item = await this.findItem(path[i], i + 1);
|
|
37
|
-
if (await item?.hasChildren() && !await item?.isExpanded()) {
|
|
37
|
+
if ((await item?.hasChildren()) && !(await item?.isExpanded())) {
|
|
38
38
|
await item?.expand();
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -44,8 +44,8 @@ class TreeSection extends ViewSection_1.ViewSection {
|
|
|
44
44
|
if (i === 0) {
|
|
45
45
|
items = await this.getVisibleItems();
|
|
46
46
|
}
|
|
47
|
-
let names = await Promise.all(items.map(item => item.getLabel()));
|
|
48
|
-
names = names.sort((a, b) => a > b ? 1 :
|
|
47
|
+
let names = await Promise.all(items.map((item) => item.getLabel()));
|
|
48
|
+
names = names.sort((a, b) => (a > b ? 1 : a < b ? -1 : 0));
|
|
49
49
|
const message = names.length < 1 ? `Current directory is empty.` : `Available items in current directory: [${names.toString()}]`;
|
|
50
50
|
throw new TreeItemNotFoundError(`Item '${path[i]}' not found. ${message}`);
|
|
51
51
|
}
|
|
@@ -57,7 +57,7 @@ class TreeSection extends ViewSection_1.ViewSection {
|
|
|
57
57
|
if (i + 1 < path.length) {
|
|
58
58
|
currentItem = undefined;
|
|
59
59
|
for (const item of items) {
|
|
60
|
-
if (await item.getLabel() === path[i + 1]) {
|
|
60
|
+
if ((await item.getLabel()) === path[i + 1]) {
|
|
61
61
|
currentItem = item;
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { TreeItem } from
|
|
18
|
-
import { TreeSection } from
|
|
19
|
-
import { WebElement } from
|
|
17
|
+
import { TreeItem } from '../../ViewItem';
|
|
18
|
+
import { TreeSection } from '../TreeSection';
|
|
19
|
+
import { WebElement } from 'selenium-webdriver';
|
|
20
20
|
/**
|
|
21
21
|
* View item in a custom-made content section (e.g. an extension tree view)
|
|
22
22
|
*/
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { TreeSection } from
|
|
18
|
-
import { TreeItem } from
|
|
19
|
-
import { WebElement } from
|
|
20
|
-
import { CustomTreeItem, ViewContent } from
|
|
17
|
+
import { TreeSection } from '../TreeSection';
|
|
18
|
+
import { TreeItem } from '../../ViewItem';
|
|
19
|
+
import { WebElement } from 'selenium-webdriver';
|
|
20
|
+
import { CustomTreeItem, ViewContent } from '../../../..';
|
|
21
21
|
export type GenericCustomTreeItemConstructor<T extends TreeItem> = {
|
|
22
22
|
new (rootElement: WebElement, tree: TreeSection): T;
|
|
23
23
|
};
|
|
@@ -31,7 +31,7 @@ export declare class GenericCustomTreeSection<T extends TreeItem> extends TreeSe
|
|
|
31
31
|
private get viewContent();
|
|
32
32
|
private get itemConstructor();
|
|
33
33
|
getVisibleItems(): Promise<T[]>;
|
|
34
|
-
findItem(labelOrPredicate: string | ((el: T) =>
|
|
34
|
+
findItem(labelOrPredicate: string | ((el: T) => PromiseLike<boolean> | boolean), maxLevel?: number): Promise<T | undefined>;
|
|
35
35
|
private getContainer;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
@@ -49,11 +49,11 @@ class GenericCustomTreeSection extends TreeSection_1.TreeSection {
|
|
|
49
49
|
return items;
|
|
50
50
|
}
|
|
51
51
|
async findItem(labelOrPredicate, maxLevel = 0) {
|
|
52
|
-
const predicate = typeof labelOrPredicate === 'string' ?
|
|
52
|
+
const predicate = typeof labelOrPredicate === 'string' ? async (el) => (await el.getLabel()) === labelOrPredicate : labelOrPredicate;
|
|
53
53
|
const elements = await this.getVisibleItems();
|
|
54
54
|
for (const element of elements) {
|
|
55
55
|
if (await predicate(element)) {
|
|
56
|
-
const level = +await element.getAttribute(CustomTreeSection.locators.ViewSection.level);
|
|
56
|
+
const level = +(await element.getAttribute(CustomTreeSection.locators.ViewSection.level));
|
|
57
57
|
if (maxLevel < 1 || level <= maxLevel) {
|
|
58
58
|
return element;
|
|
59
59
|
}
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { WebElement } from
|
|
18
|
-
import { TreeSection } from
|
|
19
|
-
import { CustomTreeItem } from
|
|
20
|
-
import { SectionBreakpoint } from
|
|
17
|
+
import { WebElement } from 'selenium-webdriver';
|
|
18
|
+
import { TreeSection } from '../TreeSection';
|
|
19
|
+
import { CustomTreeItem } from '../custom/CustomTreeItem';
|
|
20
|
+
import { SectionBreakpoint } from './SectionBreakpoint';
|
|
21
21
|
export declare class BreakpointSectionItem extends CustomTreeItem {
|
|
22
22
|
constructor(element: WebElement, viewPart: TreeSection);
|
|
23
23
|
/**
|
|
@@ -44,7 +44,7 @@ class BreakpointSectionItem extends CustomTreeItem_1.CustomTreeItem {
|
|
|
44
44
|
* @param value new state
|
|
45
45
|
*/
|
|
46
46
|
async setBreakpointEnabled(value) {
|
|
47
|
-
if (await this.isBreakpointEnabled() === value) {
|
|
47
|
+
if ((await this.isBreakpointEnabled()) === value) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
const locator = BreakpointSectionItem.locators.BreakpointSectionItem.breakpointCheckbox;
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { WebElement } from
|
|
18
|
-
import { ViewContent } from
|
|
19
|
-
import { GenericCustomTreeSection } from
|
|
20
|
-
import { BreakpointSectionItem } from
|
|
17
|
+
import { WebElement } from 'selenium-webdriver';
|
|
18
|
+
import { ViewContent } from '../../ViewContent';
|
|
19
|
+
import { GenericCustomTreeSection } from '../custom/CustomTreeSection';
|
|
20
|
+
import { BreakpointSectionItem } from './BreakpointSectionItem';
|
|
21
21
|
export declare class DebugBreakpointSection extends GenericCustomTreeSection<BreakpointSectionItem> {
|
|
22
22
|
constructor(panel: WebElement, viewContent: ViewContent);
|
|
23
23
|
}
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { WebElement } from
|
|
18
|
-
import { ViewContent } from
|
|
19
|
-
import { GenericCustomTreeSection } from
|
|
20
|
-
import { VariableSectionItem } from
|
|
17
|
+
import { WebElement } from 'selenium-webdriver';
|
|
18
|
+
import { ViewContent } from '../../ViewContent';
|
|
19
|
+
import { GenericCustomTreeSection } from '../custom/CustomTreeSection';
|
|
20
|
+
import { VariableSectionItem } from './VariableSectionItem';
|
|
21
21
|
export declare class DebugVariableSection extends GenericCustomTreeSection<VariableSectionItem> {
|
|
22
22
|
constructor(panel: WebElement, viewContent: ViewContent);
|
|
23
23
|
}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { ElementWithContexMenu } from
|
|
17
|
+
import { ElementWithContexMenu } from '../../../ElementWithContextMenu';
|
|
18
18
|
export declare class SectionBreakpoint extends ElementWithContexMenu {
|
|
19
19
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { WebElement } from
|
|
18
|
-
import { TreeSection } from
|
|
19
|
-
import { CustomTreeItem } from
|
|
17
|
+
import { WebElement } from 'selenium-webdriver';
|
|
18
|
+
import { TreeSection } from '../TreeSection';
|
|
19
|
+
import { CustomTreeItem } from '../custom/CustomTreeItem';
|
|
20
20
|
export declare class VariableSectionItem extends CustomTreeItem {
|
|
21
21
|
constructor(element: WebElement, viewPart: TreeSection);
|
|
22
22
|
/**
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { TreeItem } from
|
|
18
|
-
import { TreeSection } from
|
|
19
|
-
import { WebElement } from
|
|
17
|
+
import { TreeItem } from '../../ViewItem';
|
|
18
|
+
import { TreeSection } from '../TreeSection';
|
|
19
|
+
import { WebElement } from 'selenium-webdriver';
|
|
20
20
|
/**
|
|
21
21
|
* Default tree item base on the items in explorer view
|
|
22
22
|
*/
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { TreeSection } from
|
|
18
|
-
import { TreeItem } from
|
|
17
|
+
import { TreeSection } from '../TreeSection';
|
|
18
|
+
import { TreeItem } from '../../../..';
|
|
19
19
|
/**
|
|
20
20
|
* Default view section
|
|
21
21
|
*/
|
|
@@ -40,7 +40,7 @@ class DefaultTreeSection extends TreeSection_1.TreeSection {
|
|
|
40
40
|
do {
|
|
41
41
|
const temp = await container.findElements(DefaultTreeSection.locators.DefaultTreeItem.ctor(label));
|
|
42
42
|
if (temp.length > 0) {
|
|
43
|
-
const level = +await temp[0].getAttribute(DefaultTreeSection.locators.ViewSection.level);
|
|
43
|
+
const level = +(await temp[0].getAttribute(DefaultTreeSection.locators.ViewSection.level));
|
|
44
44
|
if (maxLevel < 1 || level <= maxLevel) {
|
|
45
45
|
item = await new DefaultTreeItem_1.DefaultTreeItem(temp[0], this).wait();
|
|
46
46
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { WebElement } from
|
|
18
|
-
import { AbstractElement } from
|
|
19
|
-
import { NotificationsCenter } from
|
|
17
|
+
import { WebElement } from 'selenium-webdriver';
|
|
18
|
+
import { AbstractElement } from '../AbstractElement';
|
|
19
|
+
import { NotificationsCenter } from '../workbench/NotificationsCenter';
|
|
20
20
|
/**
|
|
21
21
|
* Page object for the status bar at the bottom
|
|
22
22
|
*/
|
|
@@ -43,7 +43,7 @@ class StatusBar extends AbstractElement_1.AbstractElement {
|
|
|
43
43
|
const items = await this.getItems();
|
|
44
44
|
for (const item of items) {
|
|
45
45
|
try {
|
|
46
|
-
if (await item.getAttribute(StatusBar.locators.StatusBar.itemTitle) === title) {
|
|
46
|
+
if ((await item.getAttribute(StatusBar.locators.StatusBar.itemTitle)) === title) {
|
|
47
47
|
return item;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { AbstractElement } from
|
|
17
|
+
import { AbstractElement } from '../AbstractElement';
|
|
18
18
|
/**
|
|
19
19
|
* Page object for the Debugger Toolbar
|
|
20
20
|
*/
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { ElementWithContexMenu } from
|
|
18
|
-
import { AbstractElement } from
|
|
19
|
-
import { By, WebElement } from
|
|
17
|
+
import { ElementWithContexMenu } from '../ElementWithContextMenu';
|
|
18
|
+
import { AbstractElement } from '../AbstractElement';
|
|
19
|
+
import { By, WebElement } from 'selenium-webdriver';
|
|
20
20
|
/**
|
|
21
21
|
* Available types of notifications
|
|
22
22
|
*/
|
|
@@ -94,8 +94,7 @@ class Notification extends ElementWithContextMenu_1.ElementWithContexMenu {
|
|
|
94
94
|
*/
|
|
95
95
|
async getActions() {
|
|
96
96
|
const buttons = [];
|
|
97
|
-
const elements = await this.findElement(Notification.locators.Notification.actions)
|
|
98
|
-
.findElements(Notification.locators.Notification.action);
|
|
97
|
+
const elements = await this.findElement(Notification.locators.Notification.actions).findElements(Notification.locators.Notification.action);
|
|
99
98
|
for (const button of elements) {
|
|
100
99
|
const title = await Notification.locators.Notification.actionLabel.value(button);
|
|
101
100
|
buttons.push(await new NotificationButton(Notification.locators.Notification.buttonConstructor(title), this).wait());
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { AbstractElement } from
|
|
18
|
-
import { Notification, NotificationType } from
|
|
17
|
+
import { AbstractElement } from '../AbstractElement';
|
|
18
|
+
import { Notification, NotificationType } from './Notification';
|
|
19
19
|
/**
|
|
20
20
|
* Notifications center page object
|
|
21
21
|
*/
|
|
@@ -62,7 +62,7 @@ class NotificationsCenter extends AbstractElement_1.AbstractElement {
|
|
|
62
62
|
const elements = await this.findElements(NotificationsCenter.locators.NotificationsCenter.row);
|
|
63
63
|
for (const element of elements) {
|
|
64
64
|
const not = new Notification_1.CenterNotification(element);
|
|
65
|
-
if (type === Notification_1.NotificationType.Any || await not.getType() === type) {
|
|
65
|
+
if (type === Notification_1.NotificationType.Any || (await not.getType()) === type) {
|
|
66
66
|
notifications.push(await not.wait());
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { AbstractElement } from
|
|
18
|
-
import { TitleBar } from
|
|
19
|
-
import { SideBarView } from
|
|
20
|
-
import { ActivityBar } from
|
|
21
|
-
import { StatusBar } from
|
|
22
|
-
import { EditorView } from
|
|
23
|
-
import { BottomBarPanel } from
|
|
24
|
-
import { Notification } from
|
|
25
|
-
import { NotificationsCenter } from
|
|
26
|
-
import { QuickOpenBox } from
|
|
27
|
-
import { SettingsEditor } from
|
|
28
|
-
import { InputBox } from
|
|
17
|
+
import { AbstractElement } from '../AbstractElement';
|
|
18
|
+
import { TitleBar } from '../menu/TitleBar';
|
|
19
|
+
import { SideBarView } from '../sidebar/SideBarView';
|
|
20
|
+
import { ActivityBar } from '../activityBar/ActivityBar';
|
|
21
|
+
import { StatusBar } from '../statusBar/StatusBar';
|
|
22
|
+
import { EditorView } from '../editor/EditorView';
|
|
23
|
+
import { BottomBarPanel } from '../bottomBar/BottomBarPanel';
|
|
24
|
+
import { Notification } from './Notification';
|
|
25
|
+
import { NotificationsCenter } from './NotificationsCenter';
|
|
26
|
+
import { QuickOpenBox } from './input/QuickOpenBox';
|
|
27
|
+
import { SettingsEditor } from '../editor/SettingsEditor';
|
|
28
|
+
import { InputBox } from './input/InputBox';
|
|
29
29
|
/**
|
|
30
30
|
* Handler for general workbench related actions
|
|
31
31
|
*/
|
|
@@ -138,7 +138,7 @@ class Workbench extends AbstractElement_1.AbstractElement {
|
|
|
138
138
|
async executeCommand(command) {
|
|
139
139
|
const prompt = await this.openCommandPrompt();
|
|
140
140
|
await prompt.setText(`>${command}`);
|
|
141
|
-
const quickPicks = await Promise.all((await prompt.getQuickPicks()).map(item => item.getLabel()));
|
|
141
|
+
const quickPicks = await Promise.all((await prompt.getQuickPicks()).map((item) => item.getLabel()));
|
|
142
142
|
if (quickPicks.includes(command)) {
|
|
143
143
|
await prompt.selectQuickPick(command);
|
|
144
144
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { AbstractElement } from
|
|
17
|
+
import { AbstractElement } from '../../AbstractElement';
|
|
18
18
|
/**
|
|
19
19
|
* Abstract page object for input fields
|
|
20
20
|
*/
|