@redhat-developer/page-objects 1.6.1 → 1.7.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.
@@ -18,6 +18,7 @@ import { SideBarView } from '../SideBarView';
18
18
  import { DebugBreakpointSection } from '../tree/debug/DebugBreakpointSection';
19
19
  import { DebugCallStackSection } from '../tree/debug/DebugCallStackSection';
20
20
  import { DebugVariableSection } from '../tree/debug/DebugVariablesSection';
21
+ import { WatchSection } from '../tree/debug/WatchSection';
21
22
  /**
22
23
  * Page object representing the Run/Debug view in the side bar
23
24
  */
@@ -53,4 +54,9 @@ export declare class DebugView extends SideBarView {
53
54
  * @returns CallStackSection page object
54
55
  */
55
56
  getCallStackSection(): Promise<DebugCallStackSection>;
57
+ /**
58
+ * Get Watch section
59
+ * @returns WatchSection page object
60
+ */
61
+ getWatchSection(): Promise<WatchSection>;
56
62
  }
@@ -21,6 +21,7 @@ const SideBarView_1 = require("../SideBarView");
21
21
  const DebugBreakpointSection_1 = require("../tree/debug/DebugBreakpointSection");
22
22
  const DebugCallStackSection_1 = require("../tree/debug/DebugCallStackSection");
23
23
  const DebugVariablesSection_1 = require("../tree/debug/DebugVariablesSection");
24
+ const WatchSection_1 = require("../tree/debug/WatchSection");
24
25
  /**
25
26
  * Page object representing the Run/Debug view in the side bar
26
27
  */
@@ -91,6 +92,14 @@ class DebugView extends SideBarView_1.SideBarView {
91
92
  const content = this.getContent();
92
93
  return content.getSection(DebugCallStackSection_1.DebugCallStackSection.locators.DebugCallStackSection.predicate, DebugCallStackSection_1.DebugCallStackSection);
93
94
  }
95
+ /**
96
+ * Get Watch section
97
+ * @returns WatchSection page object
98
+ */
99
+ async getWatchSection() {
100
+ const content = this.getContent();
101
+ return content.getSection(WatchSection_1.WatchSection.locators.WatchSection.predicate, WatchSection_1.WatchSection);
102
+ }
94
103
  }
95
104
  exports.DebugView = DebugView;
96
105
  //# sourceMappingURL=DebugView.js.map
@@ -0,0 +1,40 @@
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 { WatchSectionItem } from './WatchSectionItem';
21
+ export declare class WatchSection extends GenericCustomTreeSection<WatchSectionItem> {
22
+ constructor(panel: WebElement, viewContent: ViewContent);
23
+ /**
24
+ * Add item to Watch section.
25
+ * @param name
26
+ */
27
+ addItem(name: string): Promise<void>;
28
+ /**
29
+ * Click on 'Refresh' button.
30
+ */
31
+ refresh(): Promise<void>;
32
+ /**
33
+ * Remove all items in Watch seection by using 'Remove All Expression' button.
34
+ */
35
+ removeAllExpressions(): Promise<void>;
36
+ /**
37
+ * Collapse all items in Watch section by using 'Collapse All' button.
38
+ */
39
+ collapseAll(): Promise<void>;
40
+ }
@@ -0,0 +1,58 @@
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.WatchSection = void 0;
20
+ const selenium_webdriver_1 = require("selenium-webdriver");
21
+ const CustomTreeSection_1 = require("../custom/CustomTreeSection");
22
+ const WatchSectionItem_1 = require("./WatchSectionItem");
23
+ class WatchSection extends CustomTreeSection_1.GenericCustomTreeSection {
24
+ constructor(panel, viewContent) {
25
+ super(panel, viewContent, WatchSectionItem_1.WatchSectionItem);
26
+ }
27
+ /**
28
+ * Add item to Watch section.
29
+ * @param name
30
+ */
31
+ async addItem(name) {
32
+ await (await this.getAction(WatchSection.locators.WatchSection.addExpression))?.click();
33
+ await new Promise((res) => setTimeout(res, 1000));
34
+ const textInput = await this.findElement(WatchSection.locators.WatchSection.input);
35
+ await textInput.clear();
36
+ await textInput.sendKeys(name + selenium_webdriver_1.Key.ENTER);
37
+ }
38
+ /**
39
+ * Click on 'Refresh' button.
40
+ */
41
+ async refresh() {
42
+ await (await this.getAction(WatchSection.locators.WatchSection.refresh))?.click();
43
+ }
44
+ /**
45
+ * Remove all items in Watch seection by using 'Remove All Expression' button.
46
+ */
47
+ async removeAllExpressions() {
48
+ await (await this.getAction(WatchSection.locators.WatchSection.removeAll))?.click();
49
+ }
50
+ /**
51
+ * Collapse all items in Watch section by using 'Collapse All' button.
52
+ */
53
+ async collapseAll() {
54
+ await (await this.getAction(WatchSection.locators.WatchSection.collapseAll))?.click();
55
+ }
56
+ }
57
+ exports.WatchSection = WatchSection;
58
+ //# sourceMappingURL=WatchSection.js.map
@@ -0,0 +1,36 @@
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 WatchSectionItem extends CustomTreeItem {
21
+ constructor(element: WebElement, viewPart: TreeSection);
22
+ /**
23
+ * Get label of the Watch section item.
24
+ * @returns a promise resolving to Watch section item label string
25
+ */
26
+ getLabel(): Promise<string>;
27
+ /**
28
+ * Get value of the Watch section item.
29
+ * @returns a promise resolving to Watch section value label string
30
+ */
31
+ getValue(): Promise<string>;
32
+ /**
33
+ * Remove item from Watch section.
34
+ */
35
+ remove(): Promise<void>;
36
+ }
@@ -0,0 +1,50 @@
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.WatchSectionItem = void 0;
20
+ const CustomTreeItem_1 = require("../custom/CustomTreeItem");
21
+ class WatchSectionItem extends CustomTreeItem_1.CustomTreeItem {
22
+ constructor(element, viewPart) {
23
+ super(element, viewPart);
24
+ }
25
+ /**
26
+ * Get label of the Watch section item.
27
+ * @returns a promise resolving to Watch section item label string
28
+ */
29
+ async getLabel() {
30
+ const name = await this.findElement(WatchSectionItem.locators.WatchSectionItem.label);
31
+ return await name?.getAttribute('textContent');
32
+ }
33
+ /**
34
+ * Get value of the Watch section item.
35
+ * @returns a promise resolving to Watch section value label string
36
+ */
37
+ async getValue() {
38
+ const value = await this.findElement(WatchSectionItem.locators.WatchSectionItem.value);
39
+ return await value.getText();
40
+ }
41
+ /**
42
+ * Remove item from Watch section.
43
+ */
44
+ async remove() {
45
+ const button = await this.getActionButton(WatchSectionItem.locators.WatchSectionItem.remove);
46
+ await button?.click();
47
+ }
48
+ }
49
+ exports.WatchSectionItem = WatchSectionItem;
50
+ //# sourceMappingURL=WatchSectionItem.js.map
package/out/index.d.ts CHANGED
@@ -44,6 +44,8 @@ export * from './components/sidebar/tree/debug/DebugVariablesSection';
44
44
  export * from './components/sidebar/tree/debug/VariableSectionItem';
45
45
  export * from './components/sidebar/tree/debug/CallStackItem';
46
46
  export * from './components/sidebar/tree/debug/DebugCallStackSection';
47
+ export * from './components/sidebar/tree/debug/WatchSection';
48
+ export * from './components/sidebar/tree/debug/WatchSectionItem';
47
49
  export * from './components/sidebar/extensions/ExtensionsViewSection';
48
50
  export * from './components/sidebar/extensions/ExtensionsViewItem';
49
51
  export { ScmView, ScmProvider, ScmChange } from './components/sidebar/scm/ScmView';
package/out/index.js CHANGED
@@ -63,6 +63,8 @@ __exportStar(require("./components/sidebar/tree/debug/DebugVariablesSection"), e
63
63
  __exportStar(require("./components/sidebar/tree/debug/VariableSectionItem"), exports);
64
64
  __exportStar(require("./components/sidebar/tree/debug/CallStackItem"), exports);
65
65
  __exportStar(require("./components/sidebar/tree/debug/DebugCallStackSection"), exports);
66
+ __exportStar(require("./components/sidebar/tree/debug/WatchSection"), exports);
67
+ __exportStar(require("./components/sidebar/tree/debug/WatchSectionItem"), exports);
66
68
  __exportStar(require("./components/sidebar/extensions/ExtensionsViewSection"), exports);
67
69
  __exportStar(require("./components/sidebar/extensions/ExtensionsViewItem"), exports);
68
70
  var ScmView_1 = require("./components/sidebar/scm/ScmView");
@@ -365,6 +365,19 @@ export interface Locators {
365
365
  label: By;
366
366
  text: By;
367
367
  };
368
+ WatchSection: {
369
+ predicate: WebElementFunction<ViewSection, boolean>;
370
+ input: By;
371
+ addExpression: string;
372
+ refresh: string;
373
+ removeAll: string;
374
+ collapseAll: string;
375
+ };
376
+ WatchSectionItem: {
377
+ label: By;
378
+ value: By;
379
+ remove: string;
380
+ };
368
381
  ExtensionsViewSection: {
369
382
  items: By;
370
383
  itemRow: By;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redhat-developer/page-objects",
3
- "version": "1.6.1",
3
+ "version": "1.7.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",
@@ -47,5 +47,5 @@
47
47
  "selenium-webdriver": ">=4.6.1",
48
48
  "typescript": ">=4.6.2"
49
49
  },
50
- "gitHead": "f1e060d3ee1f63808f2c2b1dd58f4312d41341c2"
50
+ "gitHead": "f45222ba83c369def4e95fefaa1ceba5a96e181e"
51
51
  }