@redhat-developer/page-objects 1.0.2 → 1.1.1

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 +16 -0
  2. package/out/components/AbstractElement.js +18 -2
  3. package/out/components/ElementWithContextMenu.d.ts +16 -0
  4. package/out/components/ElementWithContextMenu.js +16 -0
  5. package/out/components/WebviewMixin.d.ts +17 -1
  6. package/out/components/WebviewMixin.js +16 -0
  7. package/out/components/activityBar/ActionsControl.d.ts +16 -0
  8. package/out/components/activityBar/ActionsControl.js +16 -0
  9. package/out/components/activityBar/ActivityBar.d.ts +16 -0
  10. package/out/components/activityBar/ActivityBar.js +16 -0
  11. package/out/components/activityBar/ViewControl.d.ts +16 -0
  12. package/out/components/activityBar/ViewControl.js +16 -0
  13. package/out/components/bottomBar/AbstractViews.d.ts +17 -0
  14. package/out/components/bottomBar/AbstractViews.js +19 -2
  15. package/out/components/bottomBar/BottomBarPanel.d.ts +16 -0
  16. package/out/components/bottomBar/BottomBarPanel.js +17 -1
  17. package/out/components/bottomBar/ProblemsView.d.ts +16 -0
  18. package/out/components/bottomBar/ProblemsView.js +17 -2
  19. package/out/components/bottomBar/Views.d.ts +16 -0
  20. package/out/components/bottomBar/Views.js +16 -0
  21. package/out/components/bottomBar/WebviewView.d.ts +16 -0
  22. package/out/components/bottomBar/WebviewView.js +17 -0
  23. package/out/components/dialog/ModalDialog.d.ts +16 -0
  24. package/out/components/dialog/ModalDialog.js +16 -0
  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 +16 -0
  28. package/out/components/editor/ContentAssist.js +16 -0
  29. package/out/components/editor/CustomEditor.d.ts +16 -0
  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 +16 -0
  34. package/out/components/editor/Editor.js +16 -0
  35. package/out/components/editor/EditorAction.d.ts +16 -0
  36. package/out/components/editor/EditorAction.js +16 -0
  37. package/out/components/editor/EditorView.d.ts +16 -0
  38. package/out/components/editor/EditorView.js +17 -1
  39. package/out/components/editor/SettingsEditor.d.ts +101 -4
  40. package/out/components/editor/SettingsEditor.js +226 -35
  41. package/out/components/editor/TextEditor.d.ts +16 -0
  42. package/out/components/editor/TextEditor.js +21 -5
  43. package/out/components/editor/WebView.d.ts +16 -0
  44. package/out/components/editor/WebView.js +18 -1
  45. package/out/components/menu/ContextMenu.d.ts +16 -0
  46. package/out/components/menu/ContextMenu.js +17 -1
  47. package/out/components/menu/MacTitleBar.d.ts +16 -0
  48. package/out/components/menu/MacTitleBar.js +16 -0
  49. package/out/components/menu/Menu.d.ts +16 -0
  50. package/out/components/menu/Menu.js +18 -1
  51. package/out/components/menu/MenuItem.d.ts +16 -0
  52. package/out/components/menu/MenuItem.js +16 -0
  53. package/out/components/menu/TitleBar.d.ts +18 -2
  54. package/out/components/menu/TitleBar.js +18 -2
  55. package/out/components/menu/WindowControls.d.ts +16 -0
  56. package/out/components/menu/WindowControls.js +16 -0
  57. package/out/components/sidebar/SideBarView.d.ts +16 -0
  58. package/out/components/sidebar/SideBarView.js +16 -0
  59. package/out/components/sidebar/ViewContent.d.ts +16 -0
  60. package/out/components/sidebar/ViewContent.js +17 -1
  61. package/out/components/sidebar/ViewItem.d.ts +16 -0
  62. package/out/components/sidebar/ViewItem.js +16 -0
  63. package/out/components/sidebar/ViewSection.d.ts +16 -0
  64. package/out/components/sidebar/ViewSection.js +17 -1
  65. package/out/components/sidebar/ViewTitlePart.d.ts +16 -0
  66. package/out/components/sidebar/ViewTitlePart.js +16 -0
  67. package/out/components/sidebar/WelcomeContent.d.ts +16 -0
  68. package/out/components/sidebar/WelcomeContent.js +16 -0
  69. package/out/components/sidebar/debug/DebugView.d.ts +17 -0
  70. package/out/components/sidebar/debug/DebugView.js +18 -1
  71. package/out/components/sidebar/extensions/ExtensionsViewItem.d.ts +16 -0
  72. package/out/components/sidebar/extensions/ExtensionsViewItem.js +16 -0
  73. package/out/components/sidebar/extensions/ExtensionsViewSection.d.ts +16 -0
  74. package/out/components/sidebar/extensions/ExtensionsViewSection.js +17 -1
  75. package/out/components/sidebar/scm/NewScmView.d.ts +16 -0
  76. package/out/components/sidebar/scm/NewScmView.js +16 -0
  77. package/out/components/sidebar/scm/ScmView.d.ts +17 -1
  78. package/out/components/sidebar/scm/ScmView.js +18 -2
  79. package/out/components/sidebar/tree/TreeSection.d.ts +16 -0
  80. package/out/components/sidebar/tree/TreeSection.js +16 -0
  81. package/out/components/sidebar/tree/custom/CustomTreeItem.d.ts +16 -0
  82. package/out/components/sidebar/tree/custom/CustomTreeItem.js +16 -0
  83. package/out/components/sidebar/tree/custom/CustomTreeSection.d.ts +16 -0
  84. package/out/components/sidebar/tree/custom/CustomTreeSection.js +16 -0
  85. package/out/components/sidebar/tree/debug/BreakpointSectionItem.d.ts +16 -0
  86. package/out/components/sidebar/tree/debug/BreakpointSectionItem.js +16 -0
  87. package/out/components/sidebar/tree/debug/DebugBreakpointSection.d.ts +16 -0
  88. package/out/components/sidebar/tree/debug/DebugBreakpointSection.js +16 -0
  89. package/out/components/sidebar/tree/debug/DebugVariablesSection.d.ts +16 -0
  90. package/out/components/sidebar/tree/debug/DebugVariablesSection.js +16 -0
  91. package/out/components/sidebar/tree/debug/SectionBreakpoint.d.ts +16 -0
  92. package/out/components/sidebar/tree/debug/SectionBreakpoint.js +16 -0
  93. package/out/components/sidebar/tree/debug/VariableSectionItem.d.ts +18 -0
  94. package/out/components/sidebar/tree/debug/VariableSectionItem.js +24 -0
  95. package/out/components/sidebar/tree/default/DefaultTreeItem.d.ts +16 -0
  96. package/out/components/sidebar/tree/default/DefaultTreeItem.js +16 -0
  97. package/out/components/sidebar/tree/default/DefaultTreeSection.d.ts +16 -0
  98. package/out/components/sidebar/tree/default/DefaultTreeSection.js +16 -0
  99. package/out/components/statusBar/StatusBar.d.ts +16 -0
  100. package/out/components/statusBar/StatusBar.js +16 -0
  101. package/out/components/workbench/DebugToolbar.d.ts +16 -0
  102. package/out/components/workbench/DebugToolbar.js +16 -0
  103. package/out/components/workbench/Notification.d.ts +17 -0
  104. package/out/components/workbench/Notification.js +20 -0
  105. package/out/components/workbench/NotificationsCenter.d.ts +16 -0
  106. package/out/components/workbench/NotificationsCenter.js +17 -1
  107. package/out/components/workbench/Workbench.d.ts +16 -0
  108. package/out/components/workbench/Workbench.js +16 -0
  109. package/out/components/workbench/input/Input.d.ts +16 -0
  110. package/out/components/workbench/input/Input.js +16 -0
  111. package/out/components/workbench/input/InputBox.d.ts +16 -0
  112. package/out/components/workbench/input/InputBox.js +16 -0
  113. package/out/components/workbench/input/QuickOpenBox.d.ts +16 -0
  114. package/out/components/workbench/input/QuickOpenBox.js +16 -0
  115. package/out/conditions/WaitForAttribute.d.ts +17 -1
  116. package/out/conditions/WaitForAttribute.js +17 -1
  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 +19 -3
  123. package/out/locators/locators.d.ts +28 -2
  124. package/out/locators/locators.js +16 -0
  125. package/package.json +5 -3
@@ -1,12 +1,28 @@
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
- exports.LinkSetting = exports.CheckboxSetting = exports.TextSetting = exports.ComboSetting = exports.Setting = exports.SettingsEditor = void 0;
19
+ exports.ArraySettingItem = exports.ArraySetting = exports.LinkSetting = exports.CheckboxSetting = exports.TextSetting = exports.ComboSetting = exports.Setting = exports.SettingsEditor = void 0;
4
20
  const Editor_1 = require("./Editor");
5
21
  const selenium_webdriver_1 = require("selenium-webdriver");
6
22
  const AbstractElement_1 = require("../AbstractElement");
7
23
  const __1 = require("../..");
8
24
  /**
9
- * Page object representing the internal VSCode settings editor
25
+ * Page object representing the internal VS Code settings editor
10
26
  */
11
27
  class SettingsEditor extends Editor_1.Editor {
12
28
  divider = SettingsEditor.versionInfo.version >= '1.83.0' ? '›' : ' › ';
@@ -63,21 +79,22 @@ class SettingsEditor extends Editor_1.Editor {
63
79
  const items = await this.findElements(SettingsEditor.locators.SettingsEditor.itemRow);
64
80
  for (const item of items) {
65
81
  try {
66
- const _category = (await (await item.findElement(SettingsEditor.locators.SettingsEditor.settingCategory)).getText()).replace(':', '');
67
- const _title = await (await item.findElement(SettingsEditor.locators.SettingsEditor.settingLabel)).getText();
82
+ const itemCategory = (await (await item.findElement(SettingsEditor.locators.SettingsEditor.settingCategory)).getText()).replace(':', '');
83
+ const itemTitle = await (await item.findElement(SettingsEditor.locators.SettingsEditor.settingLabel)).getText();
68
84
  if (category !== '') {
69
- if (category.toLowerCase().replace(this.divider, '').replace(/\s/g, '').trim() !== _category.toLowerCase().replace(this.divider, '').replace(/\s/g, '').trim()) {
85
+ if (category.toLowerCase().replace(this.divider, '').replace(/\s/g, '').trim() !== itemCategory.toLowerCase().replace(this.divider, '').replace(/\s/g, '').trim()) {
70
86
  continue;
71
87
  }
72
88
  }
73
89
  if (title !== '') {
74
- if (title.toLowerCase().replace(/\s/g, '').trim() !== _title.toLowerCase().replace(/\s/g, '').trim()) {
90
+ if (title.toLowerCase().replace(/\s/g, '').trim() !== itemTitle.toLowerCase().replace(/\s/g, '').trim()) {
75
91
  continue;
76
92
  }
77
93
  }
78
- return await (await this.createSetting(item, _title, _category)).wait();
94
+ return await (await this.createSetting(item, itemTitle, itemCategory)).wait();
79
95
  }
80
96
  catch (err) {
97
+ // do nothing
81
98
  }
82
99
  }
83
100
  return setting;
@@ -99,7 +116,7 @@ class SettingsEditor extends Editor_1.Editor {
99
116
  * Context menu is disabled in this editor, throw an error
100
117
  */
101
118
  async openContextMenu() {
102
- throw new Error('Operation not supported');
119
+ throw new Error('Operation not supported!');
103
120
  }
104
121
  async createSetting(element, title, category) {
105
122
  await element.findElement(SettingsEditor.locators.SettingsEditor.settingConstructor(title, category));
@@ -127,7 +144,14 @@ class SettingsEditor extends Editor_1.Editor {
127
144
  return new LinkSetting(SettingsEditor.locators.SettingsEditor.settingConstructor(title, category), this);
128
145
  }
129
146
  catch (err) {
130
- throw new Error('Setting type not supported');
147
+ // try array setting
148
+ try {
149
+ await element.findElement(SettingsEditor.locators.SettingsEditor.arraySetting);
150
+ return new ArraySetting(SettingsEditor.locators.SettingsEditor.settingConstructor(title, category), this);
151
+ }
152
+ catch (err) {
153
+ throw new Error('Setting type not supported!');
154
+ }
131
155
  }
132
156
  }
133
157
  }
@@ -137,7 +161,7 @@ class SettingsEditor extends Editor_1.Editor {
137
161
  exports.SettingsEditor = SettingsEditor;
138
162
  /**
139
163
  * Abstract item representing a Setting with title, description and
140
- * an input element (combo/textbox/checkbox/link)
164
+ * an input element (combo/textbox/checkbox/link/array)
141
165
  */
142
166
  class Setting extends AbstractElement_1.AbstractElement {
143
167
  constructor(settingsConstructor, settings) {
@@ -155,7 +179,7 @@ class Setting extends AbstractElement_1.AbstractElement {
155
179
  * @returns Promise resolving to setting description
156
180
  */
157
181
  async getDescription() {
158
- return await (await this.findElement(SettingsEditor.locators.SettingsEditor.settingDesctiption)).getText();
182
+ return await (await this.findElement(SettingsEditor.locators.SettingsEditor.settingDescription)).getText();
159
183
  }
160
184
  /**
161
185
  * Get title of the setting
@@ -175,9 +199,9 @@ class ComboSetting extends Setting {
175
199
  }
176
200
  async setValue(value) {
177
201
  const rows = await this.getOptions();
178
- for (let row of rows) {
202
+ for (const row of rows) {
179
203
  if ((await row.getAttribute('class')).indexOf('disabled') < 0) {
180
- const text = await (await row.findElement(SettingsEditor.locators.SettingsEditor.comboOption)).getText();
204
+ const text = await row.getAttribute(SettingsEditor.locators.SettingsEditor.comboValue);
181
205
  if (value === text) {
182
206
  return await row.click();
183
207
  }
@@ -192,31 +216,13 @@ class ComboSetting extends Setting {
192
216
  const values = [];
193
217
  const rows = await this.getOptions();
194
218
  for (const row of rows) {
195
- values.push(await (await row.findElement(SettingsEditor.locators.SettingsEditor.comboOption)).getText());
219
+ values.push(await row.getAttribute(SettingsEditor.locators.SettingsEditor.comboValue));
196
220
  }
197
221
  return values;
198
222
  }
199
223
  async getOptions() {
200
- const menu = await this.openCombo();
201
- return await menu.findElements(SettingsEditor.locators.SettingsEditor.itemRow);
202
- }
203
- async openCombo() {
204
224
  const combo = await this.findElement(SettingsEditor.locators.SettingsEditor.comboSetting);
205
- const workbench = await this.getDriver().findElement(SettingsEditor.locators.Workbench.constructor);
206
- const menus = await workbench.findElements(SettingsEditor.locators.ContextMenu.contextView);
207
- let menu;
208
- if (menus.length < 1) {
209
- await combo.click();
210
- menu = await workbench.findElement(SettingsEditor.locators.ContextMenu.contextView);
211
- return menu;
212
- }
213
- else if (await menus[0].isDisplayed()) {
214
- await combo.click();
215
- await this.getDriver().sleep(200);
216
- }
217
- await combo.click();
218
- menu = await workbench.findElement(SettingsEditor.locators.ContextMenu.contextView);
219
- return menu;
225
+ return await combo.findElements(SettingsEditor.locators.SettingsEditor.comboOption);
220
226
  }
221
227
  }
222
228
  exports.ComboSetting = ComboSetting;
@@ -260,10 +266,11 @@ exports.CheckboxSetting = CheckboxSetting;
260
266
  */
261
267
  class LinkSetting extends Setting {
262
268
  async getValue() {
263
- throw new Error('Method getValue is not available for LinkSetting');
269
+ throw new Error('Method getValue is not available for LinkSetting!');
264
270
  }
271
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
265
272
  async setValue(value) {
266
- throw new Error('Method setValue is not available for LinkSetting');
273
+ throw new Error('Method setValue is not available for LinkSetting!');
267
274
  }
268
275
  /**
269
276
  * Open the link that leads to the value in settings.json
@@ -275,4 +282,188 @@ class LinkSetting extends Setting {
275
282
  }
276
283
  }
277
284
  exports.LinkSetting = LinkSetting;
285
+ /**
286
+ * Setting with an array of string values (rows)
287
+ */
288
+ class ArraySetting extends Setting {
289
+ /**
290
+ * @deprecated Method 'getValue' is not available for ArraySetting!
291
+ */
292
+ async getValue() {
293
+ throw new Error('Method \'getValue\' is not available for ArraySetting!');
294
+ }
295
+ /**
296
+ * @deprecated Method 'setValue' is not available for ArraySetting!
297
+ */
298
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
299
+ async setValue(value) {
300
+ throw new Error('Method \'setValue\' is not available for ArraySetting!');
301
+ }
302
+ /**
303
+ * Select a row of a setting array of string values
304
+ * @param item label | index
305
+ */
306
+ async select(item) {
307
+ const toSelect = await this.getItem(item);
308
+ await toSelect?.select();
309
+ }
310
+ /**
311
+ * Get a row as new ArraySettingItem object
312
+ * @param item label or index
313
+ * @returns ArraySettingItem | undefined
314
+ */
315
+ async getItem(item) {
316
+ const row = await this.findRow(item);
317
+ if (row) {
318
+ return new ArraySettingItem(row, this);
319
+ }
320
+ return undefined;
321
+ }
322
+ /**
323
+ * Get a list of all rows as ArraySettingItem objects
324
+ * @returns ArraySettingItem[]
325
+ */
326
+ async getItems() {
327
+ const listRows = await this.getRows();
328
+ const items = [];
329
+ for (const row of listRows) {
330
+ items.push(new ArraySettingItem(row, this));
331
+ }
332
+ return items;
333
+ }
334
+ /**
335
+ * Get a list of all rows values
336
+ * @returns string[]
337
+ */
338
+ async getValues() {
339
+ const items = await this.getItems();
340
+ const values = [];
341
+ for (const item of items) {
342
+ values.push(await item.getValue());
343
+ }
344
+ return values;
345
+ }
346
+ /**
347
+ * Click 'Add Item' and get row as ArraySettingItem in edit mode
348
+ * @returns ArraySettingItem
349
+ */
350
+ async add() {
351
+ // click 'Add Item' button
352
+ const button = await this.findElement(SettingsEditor.locators.SettingsEditor.arrayNewRow).findElement(selenium_webdriver_1.By.className('monaco-button'));
353
+ await button.click();
354
+ await new Promise(sleep => setTimeout(sleep, 1_000)); // need to force some time to allow DOM rerender elements
355
+ // get item row switched to 'edit' mode
356
+ const list = await this.getListRootElement();
357
+ const editRow = await list.findElement(SettingsEditor.locators.SettingsEditor.arrayEditRow);
358
+ return new ArraySettingItem(editRow, this);
359
+ }
360
+ /**
361
+ * Select a row, then click 'Edit Item' and get row as ArraySettingItem in edit mode
362
+ * @param item label | index
363
+ * @returns ArraySettingItem | undefined
364
+ */
365
+ async edit(item) {
366
+ const row = await this.findRow(item);
367
+ if (row) {
368
+ // select item row
369
+ const toEdit = new ArraySettingItem(row, this);
370
+ await toEdit.select();
371
+ // click 'Edit Item' button
372
+ const edit = await toEdit.findElement(SettingsEditor.locators.SettingsEditor.arrayBtnConstructor('Edit Item'));
373
+ await edit.click();
374
+ await new Promise(sleep => setTimeout(sleep, 1_000)); // need to force some time to allow DOM rerender elements
375
+ // get item row switched to 'edit' mode
376
+ const list = await this.getListRootElement();
377
+ const editRow = await list.findElement(SettingsEditor.locators.SettingsEditor.arrayEditRow);
378
+ return new ArraySettingItem(editRow, this);
379
+ }
380
+ return undefined;
381
+ }
382
+ async getListRootElement() {
383
+ return await this.findElement(SettingsEditor.locators.SettingsEditor.arrayRoot);
384
+ }
385
+ async getRows() {
386
+ const list = await this.getListRootElement();
387
+ return await list.findElements(SettingsEditor.locators.SettingsEditor.arrayRow);
388
+ }
389
+ async findRow(item) {
390
+ const listRows = await this.getRows();
391
+ if (Number.isInteger(item)) {
392
+ const index = +item;
393
+ if (index < 0 || index > listRows.length - 1) {
394
+ throw Error(`Index '${index}' is of bounds! Found items have length = ${listRows.length}.`);
395
+ }
396
+ return listRows[index];
397
+ }
398
+ else {
399
+ for (const row of listRows) {
400
+ const li = await row.findElement(SettingsEditor.locators.SettingsEditor.arrayRowValue);
401
+ if (await li.getText() === item) {
402
+ return row;
403
+ }
404
+ }
405
+ }
406
+ return undefined;
407
+ }
408
+ }
409
+ exports.ArraySetting = ArraySetting;
410
+ /**
411
+ * Represents each row of an ArraySetting array of strings
412
+ */
413
+ class ArraySettingItem extends AbstractElement_1.AbstractElement {
414
+ constructor(element, setting) {
415
+ super(element, setting);
416
+ }
417
+ /**
418
+ * Select an item
419
+ */
420
+ async select() {
421
+ await this.click();
422
+ await new Promise(sleep => setTimeout(sleep, 500));
423
+ }
424
+ /**
425
+ * Get item text value
426
+ * @returns string
427
+ */
428
+ async getValue() {
429
+ return await this.getText();
430
+ }
431
+ /**
432
+ * Set item text value
433
+ * @param value string
434
+ */
435
+ async setValue(value) {
436
+ const input = await this.findElement(SettingsEditor.locators.SettingsEditor.textSetting);
437
+ await input.clear();
438
+ await input.sendKeys(value);
439
+ }
440
+ /**
441
+ * Click 'Remove Item' button
442
+ */
443
+ async remove() {
444
+ await this.select();
445
+ const remove = await this.findElement(SettingsEditor.locators.SettingsEditor.arrayBtnConstructor('Remove Item'));
446
+ await remove.click();
447
+ await new Promise(sleep => setTimeout(sleep, 500));
448
+ }
449
+ /**
450
+ * Click 'OK' button
451
+ * @description Only when the item is in edit mode
452
+ */
453
+ async ok() {
454
+ const ok = await this.findElement(SettingsEditor.locators.SettingsEditor.arraySettingItem.btnConstructor('OK'));
455
+ await ok.click();
456
+ await new Promise(sleep => setTimeout(sleep, 500));
457
+ }
458
+ /**
459
+ * Click 'Cancel' button
460
+ * @description Only when the item is in edit mode
461
+ */
462
+ async cancel() {
463
+ const cancel = await this.findElement(SettingsEditor.locators.SettingsEditor.arraySettingItem.btnConstructor('Cancel'));
464
+ await cancel.click();
465
+ await new Promise(sleep => setTimeout(sleep, 500));
466
+ }
467
+ }
468
+ exports.ArraySettingItem = ArraySettingItem;
278
469
  //# sourceMappingURL=SettingsEditor.js.map
@@ -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 { ContentAssist, ContextMenu, InputBox } from "../..";
2
18
  import { WebElement } from "selenium-webdriver";
3
19
  import { Editor } from "./Editor";
@@ -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.FindWidget = exports.CodeLens = exports.TextEditor = exports.BreakpointError = void 0;
4
20
  const __1 = require("../..");
@@ -220,7 +236,7 @@ class TextEditor extends Editor_1.Editor {
220
236
  let actions = this.getDriver().actions();
221
237
  await actions.clear();
222
238
  actions.keyDown(selenium_webdriver_1.Key.SHIFT);
223
- for (const _i of text) {
239
+ for (let i = 0; i < text.length; i++) {
224
240
  actions = actions.sendKeys(selenium_webdriver_1.Key.RIGHT);
225
241
  }
226
242
  actions = actions.keyUp(selenium_webdriver_1.Key.SHIFT);
@@ -273,7 +289,7 @@ class TextEditor extends Editor_1.Editor {
273
289
  return new Selection(selection[0], this);
274
290
  }
275
291
  async openFindWidget() {
276
- let actions = this.getDriver().actions();
292
+ const actions = this.getDriver().actions();
277
293
  await actions.clear();
278
294
  await actions.keyDown(TextEditor.ctlKey).sendKeys('f').keyUp(TextEditor.ctlKey).perform();
279
295
  const widget = await this.getDriver().wait(selenium_webdriver_1.until.elementLocated(TextEditor.locators.TextEditor.findWidget), 2000);
@@ -331,8 +347,8 @@ class TextEditor extends Editor_1.Editor {
331
347
  const columnKey = columnGap >= 0 ? selenium_webdriver_1.Key.LEFT : selenium_webdriver_1.Key.RIGHT;
332
348
  for (let i = 0; i < Math.abs(columnGap); i++) {
333
349
  await inputarea.sendKeys(columnKey);
334
- let actualCoordinates = (await this.getCoordinates())[0];
335
- if (actualCoordinates != coordinates[0]) {
350
+ const actualCoordinates = (await this.getCoordinates())[0];
351
+ if (actualCoordinates !== coordinates[0]) {
336
352
  throw new Error(`Column number ${column} is not accessible on line ${line}`);
337
353
  }
338
354
  }
@@ -412,7 +428,7 @@ class TextEditor extends Editor_1.Editor {
412
428
  const breakpointContainer = TextEditor.versionInfo.version >= '1.80.0' ? await this.findElement(selenium_webdriver_1.By.className('glyph-margin-widgets')) : lineOverlay;
413
429
  const breakPoint = await breakpointContainer.findElements(TextEditor.locators.TextEditor.breakpoint.generalSelector);
414
430
  if (breakPoint.length > 0) {
415
- if (this.breakPoints.indexOf(line) != -1) {
431
+ if (this.breakPoints.indexOf(line) !== -1) {
416
432
  await breakPoint[this.breakPoints.indexOf(line)].click();
417
433
  await new Promise(res => setTimeout(res, 200));
418
434
  this.breakPoints.splice(this.breakPoints.indexOf(line), 1);
@@ -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 { Editor } from "./Editor";
3
19
  /**
@@ -1,9 +1,26 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
3
19
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
20
  };
5
21
  Object.defineProperty(exports, "__esModule", { value: true });
6
22
  exports.WebView = void 0;
23
+ /* eslint-disable no-redeclare */
7
24
  const selenium_webdriver_1 = require("selenium-webdriver");
8
25
  const WebviewMixin_1 = __importDefault(require("../WebviewMixin"));
9
26
  const Editor_1 = require("./Editor");
@@ -24,7 +41,7 @@ class WebViewBase extends Editor_1.Editor {
24
41
  const reference = await this.findElement(WebViewBase.locators.EditorView.webView);
25
42
  const containers = await this.getDriver().wait(selenium_webdriver_1.until.elementsLocated(WebViewBase.locators.WebView.container(await reference.getAttribute(WebViewBase.locators.WebView.attribute))), 5000);
26
43
  return await containers[0].getDriver().wait(async () => {
27
- for (let container of containers) {
44
+ for (const container of containers) {
28
45
  const tries = await container.findElements(WebViewBase.locators.WebView.iframe);
29
46
  if (tries.length > 0) {
30
47
  return tries[0];
@@ -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 { Menu, MenuItem } from "../..";
2
18
  import { WebElement } from "selenium-webdriver";
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.ContextMenuItem = exports.ContextMenu = void 0;
4
20
  const __1 = require("../..");
@@ -48,7 +64,7 @@ class ContextMenu extends __1.Menu {
48
64
  * @returns Promise resolving when the menu is closed
49
65
  */
50
66
  async close() {
51
- let actions = this.getDriver().actions();
67
+ const actions = this.getDriver().actions();
52
68
  await actions.clear();
53
69
  await this.getDriver().actions().sendKeys(selenium_webdriver_1.Key.ESCAPE).perform();
54
70
  try {
@@ -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
  /**
2
18
  * Handler object for macOS based title bar
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.MacTitleBar = void 0;
4
20
  const child_process_1 = require("child_process");
@@ -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 { AbstractElement } from "../AbstractElement";
2
18
  import { MenuItem } from "./MenuItem";
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.Menu = void 0;
4
20
  const AbstractElement_1 = require("../AbstractElement");
@@ -33,8 +49,9 @@ class Menu extends AbstractElement_1.AbstractElement {
33
49
  let parent = this;
34
50
  for (const label of path) {
35
51
  const item = await parent.getItem(label);
36
- if (!item)
52
+ if (!item) {
37
53
  return parent;
54
+ }
38
55
  await Menu.driver.wait(async function () {
39
56
  return await item.isDisplayed() && await item.isEnabled();
40
57
  });
@@ -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 { AbstractElement } from "../AbstractElement";
2
18
  import { Menu } from "./Menu";
3
19
  /**