@redhat-developer/page-objects 1.1.0 → 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 +18 -2
- package/out/components/AbstractElement.js +18 -2
- package/out/components/ElementWithContextMenu.d.ts +18 -2
- package/out/components/ElementWithContextMenu.js +16 -0
- package/out/components/WebviewMixin.d.ts +18 -2
- package/out/components/WebviewMixin.js +16 -0
- package/out/components/activityBar/ActionsControl.d.ts +19 -3
- package/out/components/activityBar/ActionsControl.js +16 -0
- package/out/components/activityBar/ActivityBar.d.ts +18 -2
- package/out/components/activityBar/ActivityBar.js +16 -0
- package/out/components/activityBar/ViewControl.d.ts +19 -3
- package/out/components/activityBar/ViewControl.js +16 -0
- package/out/components/bottomBar/AbstractViews.d.ts +20 -4
- package/out/components/bottomBar/AbstractViews.js +24 -7
- package/out/components/bottomBar/BottomBarPanel.d.ts +18 -2
- package/out/components/bottomBar/BottomBarPanel.js +18 -3
- package/out/components/bottomBar/ProblemsView.d.ts +19 -3
- package/out/components/bottomBar/ProblemsView.js +23 -5
- package/out/components/bottomBar/Views.d.ts +19 -3
- package/out/components/bottomBar/Views.js +17 -1
- package/out/components/bottomBar/WebviewView.d.ts +18 -2
- package/out/components/bottomBar/WebviewView.js +16 -0
- package/out/components/dialog/ModalDialog.d.ts +18 -2
- package/out/components/dialog/ModalDialog.js +17 -1
- package/out/components/editor/Breakpoint.d.ts +16 -0
- package/out/components/editor/Breakpoint.js +16 -0
- package/out/components/editor/ContentAssist.d.ts +17 -1
- package/out/components/editor/ContentAssist.js +22 -5
- package/out/components/editor/CustomEditor.d.ts +17 -1
- package/out/components/editor/CustomEditor.js +16 -0
- package/out/components/editor/DiffEditor.d.ts +16 -0
- package/out/components/editor/DiffEditor.js +16 -0
- package/out/components/editor/Editor.d.ts +18 -2
- package/out/components/editor/Editor.js +17 -1
- package/out/components/editor/EditorAction.d.ts +19 -3
- package/out/components/editor/EditorAction.js +16 -0
- package/out/components/editor/EditorView.d.ts +21 -5
- package/out/components/editor/EditorView.js +28 -7
- package/out/components/editor/SettingsEditor.d.ts +27 -11
- package/out/components/editor/SettingsEditor.js +36 -19
- package/out/components/editor/TextEditor.d.ts +22 -6
- package/out/components/editor/TextEditor.js +31 -13
- package/out/components/editor/WebView.d.ts +18 -2
- package/out/components/editor/WebView.js +18 -2
- package/out/components/menu/ContextMenu.d.ts +18 -2
- package/out/components/menu/ContextMenu.js +18 -2
- package/out/components/menu/MacTitleBar.d.ts +16 -0
- package/out/components/menu/MacTitleBar.js +17 -5
- package/out/components/menu/Menu.d.ts +18 -2
- package/out/components/menu/Menu.js +18 -2
- package/out/components/menu/MenuItem.d.ts +18 -2
- package/out/components/menu/MenuItem.js +17 -1
- package/out/components/menu/TitleBar.d.ts +19 -3
- package/out/components/menu/TitleBar.js +18 -2
- package/out/components/menu/WindowControls.d.ts +18 -2
- package/out/components/menu/WindowControls.js +16 -0
- package/out/components/sidebar/SideBarView.d.ts +18 -2
- package/out/components/sidebar/SideBarView.js +16 -0
- package/out/components/sidebar/ViewContent.d.ts +20 -4
- package/out/components/sidebar/ViewContent.js +17 -2
- package/out/components/sidebar/ViewItem.d.ts +19 -3
- package/out/components/sidebar/ViewItem.js +23 -7
- package/out/components/sidebar/ViewSection.d.ts +19 -3
- package/out/components/sidebar/ViewSection.js +23 -7
- package/out/components/sidebar/ViewTitlePart.d.ts +19 -3
- package/out/components/sidebar/ViewTitlePart.js +16 -0
- package/out/components/sidebar/WelcomeContent.d.ts +19 -3
- package/out/components/sidebar/WelcomeContent.js +17 -1
- package/out/components/sidebar/debug/DebugView.d.ts +19 -3
- package/out/components/sidebar/debug/DebugView.js +16 -0
- package/out/components/sidebar/extensions/ExtensionsViewItem.d.ts +20 -4
- package/out/components/sidebar/extensions/ExtensionsViewItem.js +16 -0
- package/out/components/sidebar/extensions/ExtensionsViewSection.d.ts +18 -2
- package/out/components/sidebar/extensions/ExtensionsViewSection.js +19 -3
- package/out/components/sidebar/scm/NewScmView.d.ts +18 -2
- package/out/components/sidebar/scm/NewScmView.js +30 -14
- package/out/components/sidebar/scm/ScmView.d.ts +21 -5
- package/out/components/sidebar/scm/ScmView.js +24 -8
- package/out/components/sidebar/tree/TreeSection.d.ts +19 -3
- package/out/components/sidebar/tree/TreeSection.js +20 -4
- package/out/components/sidebar/tree/custom/CustomTreeItem.d.ts +19 -3
- package/out/components/sidebar/tree/custom/CustomTreeItem.js +16 -0
- package/out/components/sidebar/tree/custom/CustomTreeSection.d.ts +21 -5
- package/out/components/sidebar/tree/custom/CustomTreeSection.js +18 -2
- package/out/components/sidebar/tree/debug/BreakpointSectionItem.d.ts +20 -4
- package/out/components/sidebar/tree/debug/BreakpointSectionItem.js +17 -1
- package/out/components/sidebar/tree/debug/DebugBreakpointSection.d.ts +20 -4
- package/out/components/sidebar/tree/debug/DebugBreakpointSection.js +16 -0
- package/out/components/sidebar/tree/debug/DebugVariablesSection.d.ts +20 -4
- package/out/components/sidebar/tree/debug/DebugVariablesSection.js +16 -0
- package/out/components/sidebar/tree/debug/SectionBreakpoint.d.ts +17 -1
- package/out/components/sidebar/tree/debug/SectionBreakpoint.js +16 -0
- package/out/components/sidebar/tree/debug/VariableSectionItem.d.ts +20 -3
- package/out/components/sidebar/tree/debug/VariableSectionItem.js +20 -0
- package/out/components/sidebar/tree/default/DefaultTreeItem.d.ts +19 -3
- package/out/components/sidebar/tree/default/DefaultTreeItem.js +16 -0
- package/out/components/sidebar/tree/default/DefaultTreeSection.d.ts +18 -2
- package/out/components/sidebar/tree/default/DefaultTreeSection.js +17 -1
- package/out/components/statusBar/StatusBar.d.ts +19 -3
- package/out/components/statusBar/StatusBar.js +17 -1
- package/out/components/workbench/DebugToolbar.d.ts +17 -1
- package/out/components/workbench/DebugToolbar.js +16 -0
- package/out/components/workbench/Notification.d.ts +19 -3
- package/out/components/workbench/Notification.js +17 -2
- package/out/components/workbench/NotificationsCenter.d.ts +18 -2
- package/out/components/workbench/NotificationsCenter.js +17 -1
- package/out/components/workbench/Workbench.d.ts +28 -12
- package/out/components/workbench/Workbench.js +17 -1
- package/out/components/workbench/input/Input.d.ts +17 -1
- package/out/components/workbench/input/Input.js +29 -20
- package/out/components/workbench/input/InputBox.d.ts +17 -1
- package/out/components/workbench/input/InputBox.js +20 -5
- package/out/components/workbench/input/QuickOpenBox.d.ts +17 -1
- package/out/components/workbench/input/QuickOpenBox.js +18 -3
- package/out/conditions/WaitForAttribute.d.ts +17 -1
- package/out/conditions/WaitForAttribute.js +16 -0
- package/out/errors/NullAttributeError.d.ts +16 -0
- package/out/errors/NullAttributeError.js +16 -0
- package/out/index.d.ts +16 -0
- package/out/index.js +16 -0
- package/out/locators/loader.d.ts +16 -0
- package/out/locators/loader.js +24 -8
- package/out/locators/locators.d.ts +24 -8
- package/out/locators/locators.js +17 -1
- package/package.json +2 -2
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
19
|
exports.QuickPickItem = exports.Input = void 0;
|
|
4
20
|
const AbstractElement_1 = require("../../AbstractElement");
|
|
@@ -13,8 +29,7 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
13
29
|
* @returns Promise resolving to text of the input field
|
|
14
30
|
*/
|
|
15
31
|
async getText() {
|
|
16
|
-
const input = await this.findElement(Input.locators.Input.inputBox)
|
|
17
|
-
.findElement(Input.locators.Input.input);
|
|
32
|
+
const input = await this.findElement(Input.locators.Input.inputBox).findElement(Input.locators.Input.input);
|
|
18
33
|
return await input.getAttribute('value');
|
|
19
34
|
}
|
|
20
35
|
/**
|
|
@@ -32,10 +47,9 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
32
47
|
// workaround issue https://github.com/redhat-developer/vscode-extension-tester/issues/835
|
|
33
48
|
// do not fail if clipboard is empty
|
|
34
49
|
}
|
|
35
|
-
const input = await this.findElement(Input.locators.Input.inputBox)
|
|
36
|
-
.findElement(Input.locators.Input.input);
|
|
50
|
+
const input = await this.findElement(Input.locators.Input.inputBox).findElement(Input.locators.Input.input);
|
|
37
51
|
await this.clear();
|
|
38
|
-
await new Promise(res => setTimeout(res, 200));
|
|
52
|
+
await new Promise((res) => setTimeout(res, 200));
|
|
39
53
|
if ((await this.getText()).length > 0) {
|
|
40
54
|
await input.sendKeys(selenium_webdriver_1.Key.END, selenium_webdriver_1.Key.chord(selenium_webdriver_1.Key.SHIFT, selenium_webdriver_1.Key.HOME));
|
|
41
55
|
}
|
|
@@ -55,16 +69,14 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
55
69
|
* @returns Promise resolving to input placeholder
|
|
56
70
|
*/
|
|
57
71
|
async getPlaceHolder() {
|
|
58
|
-
return await this.findElement(Input.locators.Input.inputBox)
|
|
59
|
-
.findElement(Input.locators.Input.input).getAttribute('placeholder');
|
|
72
|
+
return await this.findElement(Input.locators.Input.inputBox).findElement(Input.locators.Input.input).getAttribute('placeholder');
|
|
60
73
|
}
|
|
61
74
|
/**
|
|
62
75
|
* Confirm the input field by pressing Enter
|
|
63
76
|
* @returns Promise resolving when the input is confirmed
|
|
64
77
|
*/
|
|
65
78
|
async confirm() {
|
|
66
|
-
const input = await this.findElement(Input.locators.Input.inputBox)
|
|
67
|
-
.findElement(Input.locators.Input.input);
|
|
79
|
+
const input = await this.findElement(Input.locators.Input.inputBox).findElement(Input.locators.Input.input);
|
|
68
80
|
await input.click();
|
|
69
81
|
await input.sendKeys(selenium_webdriver_1.Key.ENTER);
|
|
70
82
|
}
|
|
@@ -73,8 +85,7 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
73
85
|
* @returns Promise resolving when the input is cancelled
|
|
74
86
|
*/
|
|
75
87
|
async cancel() {
|
|
76
|
-
const input = await this.findElement(Input.locators.Input.inputBox)
|
|
77
|
-
.findElement(Input.locators.Input.input);
|
|
88
|
+
const input = await this.findElement(Input.locators.Input.inputBox).findElement(Input.locators.Input.input);
|
|
78
89
|
await input.sendKeys(selenium_webdriver_1.Key.ESCAPE);
|
|
79
90
|
}
|
|
80
91
|
/**
|
|
@@ -82,8 +93,7 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
82
93
|
* @returns Promise resolving when the field is cleared
|
|
83
94
|
*/
|
|
84
95
|
async clear() {
|
|
85
|
-
const input = await this.findElement(Input.locators.Input.inputBox)
|
|
86
|
-
.findElement(Input.locators.Input.input);
|
|
96
|
+
const input = await this.findElement(Input.locators.Input.inputBox).findElement(Input.locators.Input.input);
|
|
87
97
|
// VS Code 1.40 breaks the default clear method, use select all + back space instead
|
|
88
98
|
await input.sendKeys(selenium_webdriver_1.Key.END, selenium_webdriver_1.Key.chord(selenium_webdriver_1.Key.SHIFT, selenium_webdriver_1.Key.HOME), selenium_webdriver_1.Key.BACK_SPACE);
|
|
89
99
|
if ((await input.getAttribute('value')).length > 0) {
|
|
@@ -120,7 +130,7 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
120
130
|
if (!checkboxes) {
|
|
121
131
|
return;
|
|
122
132
|
}
|
|
123
|
-
if (!await checkboxes[0].isSelected()) {
|
|
133
|
+
if (!(await checkboxes[0].isSelected())) {
|
|
124
134
|
await checkboxes[0].click();
|
|
125
135
|
}
|
|
126
136
|
if (state === false) {
|
|
@@ -133,8 +143,7 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
133
143
|
* @returns Promise resolvnig to QuickPickItem if found, to undefined otherwise
|
|
134
144
|
*/
|
|
135
145
|
async findQuickPick(indexOrText) {
|
|
136
|
-
const input = await this.findElement(Input.locators.Input.inputBox)
|
|
137
|
-
.findElement(Input.locators.Input.input);
|
|
146
|
+
const input = await this.findElement(Input.locators.Input.inputBox).findElement(Input.locators.Input.input);
|
|
138
147
|
const first = await this.findElements(Input.locators.Input.quickPickPosition(1));
|
|
139
148
|
if (first.length < 1) {
|
|
140
149
|
await this.resetPosition();
|
|
@@ -147,7 +156,7 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
147
156
|
if (lastRow.length > 0) {
|
|
148
157
|
endReached = true;
|
|
149
158
|
}
|
|
150
|
-
else if (await pick.getAttribute('aria-posinset') === await pick.getAttribute('aria-setsize')) {
|
|
159
|
+
else if ((await pick.getAttribute('aria-posinset')) === (await pick.getAttribute('aria-setsize'))) {
|
|
151
160
|
endReached = true;
|
|
152
161
|
}
|
|
153
162
|
if (typeof indexOrText === 'string') {
|
|
@@ -172,7 +181,7 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
172
181
|
*/
|
|
173
182
|
async getTitle() {
|
|
174
183
|
const titleBar = await this.findElements(Input.locators.Input.titleBar);
|
|
175
|
-
if (titleBar.length > 0 && await titleBar[0].isDisplayed()) {
|
|
184
|
+
if (titleBar.length > 0 && (await titleBar[0].isDisplayed())) {
|
|
176
185
|
return (await titleBar[0].findElement(Input.locators.Input.title)).getText();
|
|
177
186
|
}
|
|
178
187
|
}
|
|
@@ -182,9 +191,9 @@ class Input extends AbstractElement_1.AbstractElement {
|
|
|
182
191
|
*/
|
|
183
192
|
async back() {
|
|
184
193
|
const titleBar = await this.findElements(Input.locators.Input.titleBar);
|
|
185
|
-
if (titleBar.length > 0 && await titleBar[0].isDisplayed()) {
|
|
194
|
+
if (titleBar.length > 0 && (await titleBar[0].isDisplayed())) {
|
|
186
195
|
const backBtn = await titleBar[0].findElements(Input.locators.Input.backButton);
|
|
187
|
-
if (backBtn.length > 0 && await backBtn[0].isEnabled()) {
|
|
196
|
+
if (backBtn.length > 0 && (await backBtn[0].isEnabled())) {
|
|
188
197
|
await backBtn[0].click();
|
|
189
198
|
return true;
|
|
190
199
|
}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
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 { Input, QuickPickItem } from '../../..';
|
|
2
18
|
/**
|
|
3
19
|
* Plain input box variation of the input page object
|
|
4
20
|
*/
|
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
19
|
exports.InputBox = void 0;
|
|
4
20
|
const __1 = require("../../..");
|
|
@@ -26,8 +42,7 @@ class InputBox extends __1.Input {
|
|
|
26
42
|
return await this.findElement(InputBox.locators.InputBox.message).getText();
|
|
27
43
|
}
|
|
28
44
|
async hasProgress() {
|
|
29
|
-
const klass = await this.findElement(InputBox.locators.InputBox.progress)
|
|
30
|
-
.getAttribute('class');
|
|
45
|
+
const klass = await this.findElement(InputBox.locators.InputBox.progress).getAttribute('class');
|
|
31
46
|
return klass.indexOf('done') < 0;
|
|
32
47
|
}
|
|
33
48
|
async getQuickPicks() {
|
|
@@ -37,7 +52,7 @@ class InputBox extends __1.Input {
|
|
|
37
52
|
.findElements(InputBox.locators.InputBox.row);
|
|
38
53
|
for (const element of elements) {
|
|
39
54
|
if (await element.isDisplayed()) {
|
|
40
|
-
picks.push(await new __1.QuickPickItem(+await element.getAttribute('data-index'), this).wait());
|
|
55
|
+
picks.push(await new __1.QuickPickItem(+(await element.getAttribute('data-index')), this).wait());
|
|
41
56
|
}
|
|
42
57
|
}
|
|
43
58
|
return picks;
|
|
@@ -49,7 +64,7 @@ class InputBox extends __1.Input {
|
|
|
49
64
|
.findElements(InputBox.locators.InputBox.row);
|
|
50
65
|
for (const element of elements) {
|
|
51
66
|
if (await element.isDisplayed()) {
|
|
52
|
-
picks.push(await new __1.QuickPickItem(+await element.getAttribute('data-index'), this, true).wait());
|
|
67
|
+
picks.push(await new __1.QuickPickItem(+(await element.getAttribute('data-index')), this, true).wait());
|
|
53
68
|
}
|
|
54
69
|
}
|
|
55
70
|
return picks;
|
|
@@ -68,7 +83,7 @@ class InputBox extends __1.Input {
|
|
|
68
83
|
*/
|
|
69
84
|
async isPassword() {
|
|
70
85
|
const input = await this.findElement(InputBox.locators.Input.input);
|
|
71
|
-
return await input.getAttribute('type') === 'password';
|
|
86
|
+
return (await input.getAttribute('type')) === 'password';
|
|
72
87
|
}
|
|
73
88
|
}
|
|
74
89
|
exports.InputBox = InputBox;
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
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 { Input, QuickPickItem } from '../../..';
|
|
2
18
|
/**
|
|
3
19
|
* @deprecated as of VS Code 1.44.0, quick open box has been replaced with input box
|
|
4
20
|
* The quick open box variation of the input
|
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
19
|
exports.QuickOpenBox = void 0;
|
|
4
20
|
const __1 = require("../../..");
|
|
@@ -20,8 +36,7 @@ class QuickOpenBox extends __1.Input {
|
|
|
20
36
|
return new QuickOpenBox().wait();
|
|
21
37
|
}
|
|
22
38
|
async hasProgress() {
|
|
23
|
-
const klass = await this.findElement(QuickOpenBox.locators.QuickOpenBox.progress)
|
|
24
|
-
.getAttribute('class');
|
|
39
|
+
const klass = await this.findElement(QuickOpenBox.locators.QuickOpenBox.progress).getAttribute('class');
|
|
25
40
|
return klass.indexOf('done') < 0;
|
|
26
41
|
}
|
|
27
42
|
async getQuickPicks() {
|
|
@@ -29,7 +44,7 @@ class QuickOpenBox extends __1.Input {
|
|
|
29
44
|
const tree = await this.getDriver().wait(selenium_webdriver_1.until.elementLocated(QuickOpenBox.locators.QuickOpenBox.quickList), 1000);
|
|
30
45
|
const elements = await tree.findElements(QuickOpenBox.locators.QuickOpenBox.row);
|
|
31
46
|
for (const element of elements) {
|
|
32
|
-
const index = +await element.getAttribute('aria-posinset');
|
|
47
|
+
const index = +(await element.getAttribute('aria-posinset'));
|
|
33
48
|
if (await element.isDisplayed()) {
|
|
34
49
|
picks.push(await new __1.QuickPickItem(index, this).wait());
|
|
35
50
|
}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
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';
|
|
2
18
|
/**
|
|
3
19
|
* Condition to wait until an element's attribute has a specified value
|
|
4
20
|
* @param element WebElement to check
|
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
19
|
exports.waitForAttributeValue = void 0;
|
|
4
20
|
/**
|
|
@@ -1,3 +1,19 @@
|
|
|
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
|
+
*/
|
|
1
17
|
export declare class NullAttributeError extends Error {
|
|
2
18
|
constructor(message?: string);
|
|
3
19
|
}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
19
|
exports.NullAttributeError = void 0;
|
|
4
20
|
class NullAttributeError extends Error {
|
package/out/index.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
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
|
+
*/
|
|
1
17
|
import { WebDriver } from 'selenium-webdriver';
|
|
2
18
|
export * from 'selenium-webdriver';
|
|
3
19
|
export * from './locators/locators';
|
package/out/index.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
19
|
if (k2 === undefined) k2 = k;
|
|
4
20
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/out/locators/loader.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
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
|
+
*/
|
|
1
17
|
import { Locators } from './locators';
|
|
2
18
|
/**
|
|
3
19
|
* Utility for loading locators for a given vscode version
|
package/out/locators/loader.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
19
|
if (k2 === undefined) k2 = k;
|
|
4
20
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -58,21 +74,21 @@ class LocatorLoader {
|
|
|
58
74
|
* @returns object containing all locators
|
|
59
75
|
*/
|
|
60
76
|
loadLocators() {
|
|
61
|
-
let versions = fs
|
|
77
|
+
let versions = fs
|
|
78
|
+
.readdirSync(this.baseFolder)
|
|
62
79
|
.filter((file) => file.endsWith('.js'))
|
|
63
80
|
.map((file) => path.basename(file, '.js'));
|
|
64
81
|
if ((0, compare_versions_1.compareVersions)(this.baseVersion, this.version) === 0) {
|
|
65
82
|
return this.locators;
|
|
66
83
|
}
|
|
67
84
|
if ((0, compare_versions_1.compareVersions)(this.baseVersion, this.version) < 0) {
|
|
68
|
-
versions = versions.filter((ver) => (0, compare_versions_1.compareVersions)(this.baseVersion, ver) < 0 &&
|
|
69
|
-
(0, compare_versions_1.compareVersions)(ver, this.version) <= 0)
|
|
70
|
-
.sort(compare_versions_1.compareVersions);
|
|
85
|
+
versions = versions.filter((ver) => (0, compare_versions_1.compareVersions)(this.baseVersion, ver) < 0 && (0, compare_versions_1.compareVersions)(ver, this.version) <= 0).sort(compare_versions_1.compareVersions);
|
|
71
86
|
}
|
|
72
87
|
else {
|
|
73
|
-
versions = versions
|
|
74
|
-
(0, compare_versions_1.compareVersions)(ver, this.version) >= 0)
|
|
75
|
-
.sort(compare_versions_1.compareVersions)
|
|
88
|
+
versions = versions
|
|
89
|
+
.filter((ver) => (0, compare_versions_1.compareVersions)(this.baseVersion, ver) > 0 && (0, compare_versions_1.compareVersions)(ver, this.version) >= 0)
|
|
90
|
+
.sort(compare_versions_1.compareVersions)
|
|
91
|
+
.reverse();
|
|
76
92
|
}
|
|
77
93
|
for (const version of versions) {
|
|
78
94
|
const diff = require(path.join(this.baseFolder, version)).diff;
|
|
@@ -96,7 +112,7 @@ function merge(target, obj) {
|
|
|
96
112
|
}
|
|
97
113
|
const oldVal = obj[key];
|
|
98
114
|
const newVal = target[key];
|
|
99
|
-
if (typeof
|
|
115
|
+
if (typeof newVal === 'object' && typeof oldVal === 'object') {
|
|
100
116
|
target[key] = merge(newVal, oldVal);
|
|
101
117
|
}
|
|
102
118
|
else {
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
|
|
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 { By, WebElement } from 'selenium-webdriver';
|
|
2
18
|
import { PartialDeep } from 'type-fest';
|
|
3
|
-
import { ViewSection } from
|
|
19
|
+
import { ViewSection } from '../components/sidebar/ViewSection';
|
|
4
20
|
type WebElementFunction<E extends WebElement, T> = (element: E) => T | PromiseLike<T>;
|
|
5
21
|
type LocatorAwareWebElementFunction<T> = (element: WebElement, locator: Locators) => T | PromiseLike<T>;
|
|
6
22
|
/**
|
|
@@ -464,10 +480,10 @@ export interface LocatorDiff {
|
|
|
464
480
|
locators: PartialDeep<Locators>;
|
|
465
481
|
extras?: object;
|
|
466
482
|
}
|
|
467
|
-
export declare function hasAttribute(attr: string, value?: string, locator?: By): (
|
|
468
|
-
export declare function hasClass(classOrPredicate: string | ((klass: string) => boolean), locator?: By): (
|
|
469
|
-
export declare function hasNotClass(klass: string, locator?: By): (
|
|
470
|
-
export declare function hasElement(locatorSelector: (
|
|
471
|
-
export declare function fromAttribute(attribute: string, locator?: By): (
|
|
472
|
-
export declare function fromText(locator?: By): (
|
|
483
|
+
export declare function hasAttribute(attr: string, value?: string, locator?: By): (el: WebElement) => Promise<boolean>;
|
|
484
|
+
export declare function hasClass(classOrPredicate: string | ((klass: string) => boolean), locator?: By): (el: WebElement) => Promise<boolean>;
|
|
485
|
+
export declare function hasNotClass(klass: string, locator?: By): (el: WebElement) => Promise<boolean>;
|
|
486
|
+
export declare function hasElement(locatorSelector: (l: Locators) => By): (el: WebElement, locators: Locators) => Promise<boolean>;
|
|
487
|
+
export declare function fromAttribute(attribute: string, locator?: By): (el: WebElement) => Promise<string>;
|
|
488
|
+
export declare function fromText(locator?: By): (el: WebElement) => Promise<string>;
|
|
473
489
|
export {};
|
package/out/locators/locators.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
19
|
exports.fromText = exports.fromAttribute = exports.hasElement = exports.hasNotClass = exports.hasClass = exports.hasAttribute = void 0;
|
|
4
20
|
function hasAttribute(attr, value, locator) {
|
|
@@ -17,7 +33,7 @@ function hasClass(classOrPredicate, locator) {
|
|
|
17
33
|
el = locator ? el.findElement(locator) : el;
|
|
18
34
|
const klasses = await el.getAttribute('class');
|
|
19
35
|
const segments = klasses?.split(/\s+/g);
|
|
20
|
-
const predicate = typeof classOrPredicate === 'string' ? (
|
|
36
|
+
const predicate = typeof classOrPredicate === 'string' ? (klass) => klass === classOrPredicate : classOrPredicate;
|
|
21
37
|
return segments.find(predicate) !== undefined;
|
|
22
38
|
};
|
|
23
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redhat-developer/page-objects",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
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": "2c16a5cf8b74b7c4e5424a3878aa97b5840e995a"
|
|
50
50
|
}
|