@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.
Files changed (125) hide show
  1. package/out/components/AbstractElement.d.ts +18 -2
  2. package/out/components/AbstractElement.js +18 -2
  3. package/out/components/ElementWithContextMenu.d.ts +18 -2
  4. package/out/components/ElementWithContextMenu.js +16 -0
  5. package/out/components/WebviewMixin.d.ts +18 -2
  6. package/out/components/WebviewMixin.js +16 -0
  7. package/out/components/activityBar/ActionsControl.d.ts +19 -3
  8. package/out/components/activityBar/ActionsControl.js +16 -0
  9. package/out/components/activityBar/ActivityBar.d.ts +18 -2
  10. package/out/components/activityBar/ActivityBar.js +16 -0
  11. package/out/components/activityBar/ViewControl.d.ts +19 -3
  12. package/out/components/activityBar/ViewControl.js +16 -0
  13. package/out/components/bottomBar/AbstractViews.d.ts +20 -4
  14. package/out/components/bottomBar/AbstractViews.js +24 -7
  15. package/out/components/bottomBar/BottomBarPanel.d.ts +18 -2
  16. package/out/components/bottomBar/BottomBarPanel.js +18 -3
  17. package/out/components/bottomBar/ProblemsView.d.ts +19 -3
  18. package/out/components/bottomBar/ProblemsView.js +23 -5
  19. package/out/components/bottomBar/Views.d.ts +19 -3
  20. package/out/components/bottomBar/Views.js +17 -1
  21. package/out/components/bottomBar/WebviewView.d.ts +18 -2
  22. package/out/components/bottomBar/WebviewView.js +16 -0
  23. package/out/components/dialog/ModalDialog.d.ts +18 -2
  24. package/out/components/dialog/ModalDialog.js +17 -1
  25. package/out/components/editor/Breakpoint.d.ts +16 -0
  26. package/out/components/editor/Breakpoint.js +16 -0
  27. package/out/components/editor/ContentAssist.d.ts +17 -1
  28. package/out/components/editor/ContentAssist.js +22 -5
  29. package/out/components/editor/CustomEditor.d.ts +17 -1
  30. package/out/components/editor/CustomEditor.js +16 -0
  31. package/out/components/editor/DiffEditor.d.ts +16 -0
  32. package/out/components/editor/DiffEditor.js +16 -0
  33. package/out/components/editor/Editor.d.ts +18 -2
  34. package/out/components/editor/Editor.js +17 -1
  35. package/out/components/editor/EditorAction.d.ts +19 -3
  36. package/out/components/editor/EditorAction.js +16 -0
  37. package/out/components/editor/EditorView.d.ts +21 -5
  38. package/out/components/editor/EditorView.js +28 -7
  39. package/out/components/editor/SettingsEditor.d.ts +27 -11
  40. package/out/components/editor/SettingsEditor.js +36 -19
  41. package/out/components/editor/TextEditor.d.ts +22 -6
  42. package/out/components/editor/TextEditor.js +31 -13
  43. package/out/components/editor/WebView.d.ts +18 -2
  44. package/out/components/editor/WebView.js +18 -2
  45. package/out/components/menu/ContextMenu.d.ts +18 -2
  46. package/out/components/menu/ContextMenu.js +18 -2
  47. package/out/components/menu/MacTitleBar.d.ts +16 -0
  48. package/out/components/menu/MacTitleBar.js +17 -5
  49. package/out/components/menu/Menu.d.ts +18 -2
  50. package/out/components/menu/Menu.js +18 -2
  51. package/out/components/menu/MenuItem.d.ts +18 -2
  52. package/out/components/menu/MenuItem.js +17 -1
  53. package/out/components/menu/TitleBar.d.ts +19 -3
  54. package/out/components/menu/TitleBar.js +18 -2
  55. package/out/components/menu/WindowControls.d.ts +18 -2
  56. package/out/components/menu/WindowControls.js +16 -0
  57. package/out/components/sidebar/SideBarView.d.ts +18 -2
  58. package/out/components/sidebar/SideBarView.js +16 -0
  59. package/out/components/sidebar/ViewContent.d.ts +20 -4
  60. package/out/components/sidebar/ViewContent.js +17 -2
  61. package/out/components/sidebar/ViewItem.d.ts +19 -3
  62. package/out/components/sidebar/ViewItem.js +23 -7
  63. package/out/components/sidebar/ViewSection.d.ts +19 -3
  64. package/out/components/sidebar/ViewSection.js +23 -7
  65. package/out/components/sidebar/ViewTitlePart.d.ts +19 -3
  66. package/out/components/sidebar/ViewTitlePart.js +16 -0
  67. package/out/components/sidebar/WelcomeContent.d.ts +19 -3
  68. package/out/components/sidebar/WelcomeContent.js +17 -1
  69. package/out/components/sidebar/debug/DebugView.d.ts +19 -3
  70. package/out/components/sidebar/debug/DebugView.js +16 -0
  71. package/out/components/sidebar/extensions/ExtensionsViewItem.d.ts +20 -4
  72. package/out/components/sidebar/extensions/ExtensionsViewItem.js +16 -0
  73. package/out/components/sidebar/extensions/ExtensionsViewSection.d.ts +18 -2
  74. package/out/components/sidebar/extensions/ExtensionsViewSection.js +19 -3
  75. package/out/components/sidebar/scm/NewScmView.d.ts +18 -2
  76. package/out/components/sidebar/scm/NewScmView.js +30 -14
  77. package/out/components/sidebar/scm/ScmView.d.ts +21 -5
  78. package/out/components/sidebar/scm/ScmView.js +24 -8
  79. package/out/components/sidebar/tree/TreeSection.d.ts +19 -3
  80. package/out/components/sidebar/tree/TreeSection.js +20 -4
  81. package/out/components/sidebar/tree/custom/CustomTreeItem.d.ts +19 -3
  82. package/out/components/sidebar/tree/custom/CustomTreeItem.js +16 -0
  83. package/out/components/sidebar/tree/custom/CustomTreeSection.d.ts +21 -5
  84. package/out/components/sidebar/tree/custom/CustomTreeSection.js +18 -2
  85. package/out/components/sidebar/tree/debug/BreakpointSectionItem.d.ts +20 -4
  86. package/out/components/sidebar/tree/debug/BreakpointSectionItem.js +17 -1
  87. package/out/components/sidebar/tree/debug/DebugBreakpointSection.d.ts +20 -4
  88. package/out/components/sidebar/tree/debug/DebugBreakpointSection.js +16 -0
  89. package/out/components/sidebar/tree/debug/DebugVariablesSection.d.ts +20 -4
  90. package/out/components/sidebar/tree/debug/DebugVariablesSection.js +16 -0
  91. package/out/components/sidebar/tree/debug/SectionBreakpoint.d.ts +17 -1
  92. package/out/components/sidebar/tree/debug/SectionBreakpoint.js +16 -0
  93. package/out/components/sidebar/tree/debug/VariableSectionItem.d.ts +20 -3
  94. package/out/components/sidebar/tree/debug/VariableSectionItem.js +20 -0
  95. package/out/components/sidebar/tree/default/DefaultTreeItem.d.ts +19 -3
  96. package/out/components/sidebar/tree/default/DefaultTreeItem.js +16 -0
  97. package/out/components/sidebar/tree/default/DefaultTreeSection.d.ts +18 -2
  98. package/out/components/sidebar/tree/default/DefaultTreeSection.js +17 -1
  99. package/out/components/statusBar/StatusBar.d.ts +19 -3
  100. package/out/components/statusBar/StatusBar.js +17 -1
  101. package/out/components/workbench/DebugToolbar.d.ts +17 -1
  102. package/out/components/workbench/DebugToolbar.js +16 -0
  103. package/out/components/workbench/Notification.d.ts +19 -3
  104. package/out/components/workbench/Notification.js +17 -2
  105. package/out/components/workbench/NotificationsCenter.d.ts +18 -2
  106. package/out/components/workbench/NotificationsCenter.js +17 -1
  107. package/out/components/workbench/Workbench.d.ts +28 -12
  108. package/out/components/workbench/Workbench.js +17 -1
  109. package/out/components/workbench/input/Input.d.ts +17 -1
  110. package/out/components/workbench/input/Input.js +29 -20
  111. package/out/components/workbench/input/InputBox.d.ts +17 -1
  112. package/out/components/workbench/input/InputBox.js +20 -5
  113. package/out/components/workbench/input/QuickOpenBox.d.ts +17 -1
  114. package/out/components/workbench/input/QuickOpenBox.js +18 -3
  115. package/out/conditions/WaitForAttribute.d.ts +17 -1
  116. package/out/conditions/WaitForAttribute.js +16 -0
  117. package/out/errors/NullAttributeError.d.ts +16 -0
  118. package/out/errors/NullAttributeError.js +16 -0
  119. package/out/index.d.ts +16 -0
  120. package/out/index.js +16 -0
  121. package/out/locators/loader.d.ts +16 -0
  122. package/out/locators/loader.js +24 -8
  123. package/out/locators/locators.d.ts +24 -8
  124. package/out/locators/locators.js +17 -1
  125. package/package.json +2 -2
@@ -1,5 +1,21 @@
1
- import { WebElement } from "selenium-webdriver";
2
- import { AbstractElement } from "../AbstractElement";
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 { AbstractElement } from '../AbstractElement';
3
19
  /**
4
20
  * Page Object for Custom Style Modal Dialogs (non-native)
5
21
  */
@@ -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.ModalDialog = void 0;
4
20
  const AbstractElement_1 = require("../AbstractElement");
@@ -39,7 +55,7 @@ class ModalDialog extends AbstractElement_1.AbstractElement {
39
55
  async pushButton(title) {
40
56
  const buttons = await this.getButtons();
41
57
  const titles = await Promise.all(buttons.map(async (btn) => ModalDialog.locators.Dialog.buttonLabel.value(btn)));
42
- const index = titles.findIndex(value => value === title);
58
+ const index = titles.findIndex((value) => value === title);
43
59
  if (index > -1) {
44
60
  await buttons[index].click();
45
61
  }
@@ -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 { WebElement } from 'selenium-webdriver';
2
18
  import { AbstractElement } from '../AbstractElement';
3
19
  export declare class Breakpoint extends AbstractElement {
@@ -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.Breakpoint = void 0;
4
20
  const selenium_webdriver_1 = require("selenium-webdriver");
@@ -1,4 +1,20 @@
1
- import { TextEditor, Menu, MenuItem, DebugConsoleView } from "../..";
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 { TextEditor, Menu, MenuItem, DebugConsoleView } from '../..';
2
18
  import { WebElement } from 'selenium-webdriver';
3
19
  /**
4
20
  * Page object representing the content assistant
@@ -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.ContentAssistItem = exports.ContentAssist = void 0;
4
20
  const __1 = require("../..");
@@ -28,14 +44,14 @@ class ContentAssist extends __1.Menu {
28
44
  while (!lastItem) {
29
45
  const items = await this.getItems();
30
46
  for (const item of items) {
31
- if (await item.getLabel() === name) {
47
+ if ((await item.getLabel()) === name) {
32
48
  return item;
33
49
  }
34
50
  lastItem = lastItem || (await item.getAttribute('data-last-element')) === 'true';
35
51
  }
36
52
  if (!lastItem) {
37
53
  await scrollable.sendKeys(selenium_webdriver_1.Key.PAGE_DOWN);
38
- await new Promise(res => setTimeout(res, 100));
54
+ await new Promise((res) => setTimeout(res, 100));
39
55
  }
40
56
  }
41
57
  }
@@ -44,9 +60,10 @@ class ContentAssist extends __1.Menu {
44
60
  * @returns Promise resolving to array of ContentAssistItem objects
45
61
  */
46
62
  async getItems() {
47
- await this.getDriver().wait(async () => { return await this.isLoaded(); });
48
- const elements = await this.findElement(ContentAssist.locators.ContentAssist.itemRows)
49
- .findElements(ContentAssist.locators.ContentAssist.itemRow);
63
+ await this.getDriver().wait(async () => {
64
+ return await this.isLoaded();
65
+ });
66
+ const elements = await this.findElement(ContentAssist.locators.ContentAssist.itemRows).findElements(ContentAssist.locators.ContentAssist.itemRow);
50
67
  const items = [];
51
68
  for (const item of elements) {
52
69
  try {
@@ -1,4 +1,20 @@
1
- import { Editor, InputBox, WebView } from "../..";
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 { Editor, InputBox, WebView } from '../..';
2
18
  /**
3
19
  * Page object for custom editors
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.CustomEditor = void 0;
4
20
  const selenium_webdriver_1 = require("selenium-webdriver");
@@ -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 { Editor } from './Editor';
2
18
  import { TextEditor } from './TextEditor';
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.DiffEditor = void 0;
4
20
  const Editor_1 = require("./Editor");
@@ -1,5 +1,21 @@
1
- import { ElementWithContexMenu } from "../ElementWithContextMenu";
2
- import { EditorTab, EditorView, EditorGroup } from "../..";
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 { ElementWithContexMenu } from '../ElementWithContextMenu';
18
+ import { EditorTab, EditorView, EditorGroup } from '../..';
3
19
  import { WebElement, Locator } from 'selenium-webdriver';
4
20
  /**
5
21
  * Abstract representation of an editor tab
@@ -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.Editor = void 0;
4
20
  const ElementWithContextMenu_1 = require("../ElementWithContextMenu");
@@ -22,7 +38,7 @@ class Editor extends ElementWithContextMenu_1.ElementWithContexMenu {
22
38
  */
23
39
  async getTab() {
24
40
  const element = this.enclosingItem;
25
- return await element.getActiveTab();
41
+ return (await element.getActiveTab());
26
42
  }
27
43
  }
28
44
  exports.Editor = Editor;
@@ -1,6 +1,22 @@
1
- import { EditorGroup } from "./EditorView";
2
- import { AbstractElement } from "../AbstractElement";
3
- import { WebElement } from "../..";
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 { EditorGroup } from './EditorView';
18
+ import { AbstractElement } from '../AbstractElement';
19
+ import { WebElement } from '../..';
4
20
  export declare class EditorAction extends AbstractElement {
5
21
  constructor(element: WebElement, parent: EditorGroup);
6
22
  /**
@@ -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.EditorAction = void 0;
4
20
  const AbstractElement_1 = require("../AbstractElement");
@@ -1,8 +1,24 @@
1
- import { WebElement } from "selenium-webdriver";
2
- import { AbstractElement } from "../AbstractElement";
3
- import { ElementWithContexMenu } from "../ElementWithContextMenu";
4
- import { Editor } from "./Editor";
5
- import { EditorAction } from "./EditorAction";
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 { AbstractElement } from '../AbstractElement';
19
+ import { ElementWithContexMenu } from '../ElementWithContextMenu';
20
+ import { Editor } from './Editor';
21
+ import { EditorAction } from './EditorAction';
6
22
  export declare class EditorTabNotFound extends Error {
7
23
  constructor(title: string, group: number);
8
24
  }
@@ -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.EditorTab = exports.EditorGroup = exports.EditorView = exports.EditorTabNotFound = void 0;
4
20
  const selenium_webdriver_1 = require("selenium-webdriver");
@@ -54,7 +70,7 @@ class EditorView extends AbstractElement_1.AbstractElement {
54
70
  }
55
71
  while (groups.length > 0 && (await groups[0].getOpenEditorTitles()).length > 0) {
56
72
  await groups[0].closeAllEditors();
57
- await new Promise(res => setTimeout(res, 1000));
73
+ await new Promise((res) => setTimeout(res, 1000));
58
74
  groups = await this.getEditorGroups();
59
75
  }
60
76
  }
@@ -297,8 +313,7 @@ class EditorGroup extends AbstractElement_1.AbstractElement {
297
313
  * @returns promise resolving to list of EditorAction objects
298
314
  */
299
315
  async getActions() {
300
- const actions = await this.findElement(EditorGroup.locators.EditorView.actionContainer)
301
- .findElements(EditorGroup.locators.EditorView.actionItem);
316
+ const actions = await this.findElement(EditorGroup.locators.EditorView.actionContainer).findElements(EditorGroup.locators.EditorView.actionItem);
302
317
  return actions.map((action) => new EditorAction_1.EditorAction(action, this));
303
318
  }
304
319
  /**
@@ -307,8 +322,7 @@ class EditorGroup extends AbstractElement_1.AbstractElement {
307
322
  * @returns promise resolving to EditorAction representing the button if found, undefined otherwise
308
323
  */
309
324
  async getAction(predicateOrTitle) {
310
- const predicate = (typeof predicateOrTitle === 'string') ?
311
- (async (action) => await action.getTitle() === predicateOrTitle) : (predicateOrTitle);
325
+ const predicate = typeof predicateOrTitle === 'string' ? async (action) => (await action.getTitle()) === predicateOrTitle : predicateOrTitle;
312
326
  const actions = await this.getActions();
313
327
  for (const action of actions) {
314
328
  if (await predicate(action)) {
@@ -338,12 +352,19 @@ class EditorTab extends ElementWithContextMenu_1.ElementWithContexMenu {
338
352
  */
339
353
  async select() {
340
354
  const tabCoords = await this.getRect();
341
- await this.getDriver().actions().move({ x: Math.ceil(tabCoords.x + 10), y: Math.ceil(tabCoords.y + 10) }).click().perform();
355
+ await this.getDriver()
356
+ .actions()
357
+ .move({
358
+ x: Math.ceil(tabCoords.x + 10),
359
+ y: Math.ceil(tabCoords.y + 10),
360
+ })
361
+ .click()
362
+ .perform();
342
363
  }
343
364
  async isSelected() {
344
365
  const klass = await this.getAttribute('class');
345
366
  const segments = klass?.split(/\s+/g) ?? [];
346
- return await super.isSelected() || segments.includes('active');
367
+ return (await super.isSelected()) || segments.includes('active');
347
368
  }
348
369
  }
349
370
  exports.EditorTab = EditorTab;
@@ -1,8 +1,24 @@
1
- import { Editor } from "./Editor";
2
- import { ContextMenu } from "../menu/ContextMenu";
3
- import { WebElement, By } from "selenium-webdriver";
4
- import { AbstractElement } from "../AbstractElement";
5
- import { EditorView, EditorGroup } from "../..";
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 { Editor } from './Editor';
18
+ import { ContextMenu } from '../menu/ContextMenu';
19
+ import { WebElement, By } from 'selenium-webdriver';
20
+ import { AbstractElement } from '../AbstractElement';
21
+ import { EditorView, EditorGroup } from '../..';
6
22
  /**
7
23
  * Page object representing the internal VS Code settings editor
8
24
  */
@@ -190,13 +206,13 @@ export declare class ArraySettingItem extends AbstractElement {
190
206
  */
191
207
  remove(): Promise<void>;
192
208
  /**
193
- * Click 'OK' button
194
- * @description Only when the item is in edit mode
195
- */
209
+ * Click 'OK' button
210
+ * @description Only when the item is in edit mode
211
+ */
196
212
  ok(): Promise<void>;
197
213
  /**
198
- * Click 'Cancel' button
199
- * @description Only when the item is in edit mode
200
- */
214
+ * Click 'Cancel' button
215
+ * @description Only when the item is in edit mode
216
+ */
201
217
  cancel(): Promise<void>;
202
218
  }