@redhat-developer/page-objects 1.1.3 → 1.2.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.
Files changed (38) hide show
  1. package/out/components/ElementWithContextMenu.d.ts +1 -1
  2. package/out/components/ElementWithContextMenu.js +7 -7
  3. package/out/components/activityBar/ActionsControl.d.ts +2 -2
  4. package/out/components/activityBar/ActionsControl.js +1 -1
  5. package/out/components/activityBar/ActivityBar.d.ts +2 -2
  6. package/out/components/activityBar/ActivityBar.js +1 -1
  7. package/out/components/activityBar/ViewControl.d.ts +2 -2
  8. package/out/components/activityBar/ViewControl.js +1 -1
  9. package/out/components/bottomBar/AbstractViews.d.ts +2 -2
  10. package/out/components/bottomBar/AbstractViews.js +1 -1
  11. package/out/components/bottomBar/ProblemsView.d.ts +2 -2
  12. package/out/components/bottomBar/ProblemsView.js +1 -1
  13. package/out/components/bottomBar/Views.d.ts +2 -2
  14. package/out/components/bottomBar/Views.js +1 -1
  15. package/out/components/editor/Editor.d.ts +2 -2
  16. package/out/components/editor/Editor.js +1 -1
  17. package/out/components/editor/EditorAction.d.ts +6 -3
  18. package/out/components/editor/EditorAction.js +38 -3
  19. package/out/components/editor/EditorView.d.ts +2 -2
  20. package/out/components/editor/EditorView.js +10 -2
  21. package/out/components/editor/SettingsEditor.js +1 -1
  22. package/out/components/editor/TextEditor.d.ts +2 -2
  23. package/out/components/editor/TextEditor.js +1 -1
  24. package/out/components/editor/WebView.js +1 -13
  25. package/out/components/sidebar/ViewItem.d.ts +2 -2
  26. package/out/components/sidebar/ViewItem.js +1 -1
  27. package/out/components/sidebar/ViewSection.js +2 -2
  28. package/out/components/sidebar/ViewTitlePart.d.ts +2 -2
  29. package/out/components/sidebar/ViewTitlePart.js +1 -1
  30. package/out/components/sidebar/scm/NewScmView.js +1 -1
  31. package/out/components/sidebar/scm/ScmView.d.ts +3 -3
  32. package/out/components/sidebar/scm/ScmView.js +3 -3
  33. package/out/components/sidebar/tree/debug/SectionBreakpoint.d.ts +2 -2
  34. package/out/components/sidebar/tree/debug/SectionBreakpoint.js +1 -1
  35. package/out/components/workbench/Notification.d.ts +2 -2
  36. package/out/components/workbench/Notification.js +1 -1
  37. package/out/locators/locators.d.ts +1 -0
  38. package/package.json +3 -3
@@ -19,7 +19,7 @@ import { ContextMenu } from '..';
19
19
  /**
20
20
  * Abstract element that has a context menu
21
21
  */
22
- export declare abstract class ElementWithContexMenu extends AbstractElement {
22
+ export declare abstract class ElementWithContextMenu extends AbstractElement {
23
23
  /**
24
24
  * Open context menu on the element
25
25
  */
@@ -16,26 +16,26 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.ElementWithContexMenu = void 0;
19
+ exports.ElementWithContextMenu = void 0;
20
20
  const AbstractElement_1 = require("./AbstractElement");
21
21
  const __1 = require("..");
22
22
  const selenium_webdriver_1 = require("selenium-webdriver");
23
23
  /**
24
24
  * Abstract element that has a context menu
25
25
  */
26
- class ElementWithContexMenu extends AbstractElement_1.AbstractElement {
26
+ class ElementWithContextMenu extends AbstractElement_1.AbstractElement {
27
27
  /**
28
28
  * Open context menu on the element
29
29
  */
30
30
  async openContextMenu() {
31
- const workbench = await this.getDriver().findElement(ElementWithContexMenu.locators.Workbench.constructor);
32
- const menus = await workbench.findElements(ElementWithContexMenu.locators.ContextMenu.contextView);
31
+ const workbench = await this.getDriver().findElement(ElementWithContextMenu.locators.Workbench.constructor);
32
+ const menus = await workbench.findElements(ElementWithContextMenu.locators.ContextMenu.contextView);
33
33
  if (menus.length < 1) {
34
34
  await this.getDriver().actions().contextClick(this).perform();
35
- await this.getDriver().wait(selenium_webdriver_1.until.elementLocated(ElementWithContexMenu.locators.ContextMenu.contextView), 2000);
35
+ await this.getDriver().wait(selenium_webdriver_1.until.elementLocated(ElementWithContextMenu.locators.ContextMenu.contextView), 2000);
36
36
  return new __1.ContextMenu(workbench).wait();
37
37
  }
38
- else if ((await workbench.findElements(ElementWithContexMenu.locators.ContextMenu.viewBlock)).length > 0) {
38
+ else if ((await workbench.findElements(ElementWithContextMenu.locators.ContextMenu.viewBlock)).length > 0) {
39
39
  await this.getDriver().actions().contextClick(this).perform();
40
40
  try {
41
41
  await this.getDriver().wait(selenium_webdriver_1.until.elementIsNotVisible(this), 1000);
@@ -50,5 +50,5 @@ class ElementWithContexMenu extends AbstractElement_1.AbstractElement {
50
50
  return new __1.ContextMenu(workbench).wait();
51
51
  }
52
52
  }
53
- exports.ElementWithContexMenu = ElementWithContexMenu;
53
+ exports.ElementWithContextMenu = ElementWithContextMenu;
54
54
  //# sourceMappingURL=ElementWithContextMenu.js.map
@@ -16,11 +16,11 @@
16
16
  */
17
17
  import { WebElement } from 'selenium-webdriver';
18
18
  import { ActivityBar, ContextMenu } from '../..';
19
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
19
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
20
20
  /**
21
21
  * Page object representing the global action controls on the bottom of the action bar
22
22
  */
23
- export declare class ActionsControl extends ElementWithContexMenu {
23
+ export declare class ActionsControl extends ElementWithContextMenu {
24
24
  constructor(element: WebElement, bar: ActivityBar);
25
25
  /**
26
26
  * Open the context menu bound to this global action
@@ -21,7 +21,7 @@ const ElementWithContextMenu_1 = require("../ElementWithContextMenu");
21
21
  /**
22
22
  * Page object representing the global action controls on the bottom of the action bar
23
23
  */
24
- class ActionsControl extends ElementWithContextMenu_1.ElementWithContexMenu {
24
+ class ActionsControl extends ElementWithContextMenu_1.ElementWithContextMenu {
25
25
  constructor(element, bar) {
26
26
  super(element, bar);
27
27
  }
@@ -15,11 +15,11 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import { ActionsControl, ViewControl } from '../..';
18
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
18
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
19
19
  /**
20
20
  * Page object representing the left side activity bar in VS Code
21
21
  */
22
- export declare class ActivityBar extends ElementWithContexMenu {
22
+ export declare class ActivityBar extends ElementWithContextMenu {
23
23
  constructor();
24
24
  /**
25
25
  * Find all view containers displayed in the activity bar
@@ -22,7 +22,7 @@ const ElementWithContextMenu_1 = require("../ElementWithContextMenu");
22
22
  /**
23
23
  * Page object representing the left side activity bar in VS Code
24
24
  */
25
- class ActivityBar extends ElementWithContextMenu_1.ElementWithContexMenu {
25
+ class ActivityBar extends ElementWithContextMenu_1.ElementWithContextMenu {
26
26
  constructor() {
27
27
  super(ActivityBar.locators.ActivityBar.constructor, ActivityBar.locators.Workbench.constructor);
28
28
  }
@@ -15,12 +15,12 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import { ActivityBar, SideBarView } from '../..';
18
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
18
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
19
19
  import { WebElement } from 'selenium-webdriver';
20
20
  /**
21
21
  * Page object representing a view container item in the activity bar
22
22
  */
23
- export declare class ViewControl extends ElementWithContexMenu {
23
+ export declare class ViewControl extends ElementWithContextMenu {
24
24
  constructor(element: WebElement, bar: ActivityBar);
25
25
  /**
26
26
  * Opens the associated view if not already open
@@ -23,7 +23,7 @@ const NewScmView_1 = require("../sidebar/scm/NewScmView");
23
23
  /**
24
24
  * Page object representing a view container item in the activity bar
25
25
  */
26
- class ViewControl extends ElementWithContextMenu_1.ElementWithContexMenu {
26
+ class ViewControl extends ElementWithContextMenu_1.ElementWithContextMenu {
27
27
  constructor(element, bar) {
28
28
  super(element, bar);
29
29
  }
@@ -14,11 +14,11 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
17
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
18
18
  /**
19
19
  * View with channel selector
20
20
  */
21
- export declare abstract class ChannelView extends ElementWithContexMenu {
21
+ export declare abstract class ChannelView extends ElementWithContextMenu {
22
22
  protected actionsLabel: string;
23
23
  /**
24
24
  * Get names of all selectable channels
@@ -22,7 +22,7 @@ const ElementWithContextMenu_1 = require("../ElementWithContextMenu");
22
22
  /**
23
23
  * View with channel selector
24
24
  */
25
- class ChannelView extends ElementWithContextMenu_1.ElementWithContexMenu {
25
+ class ChannelView extends ElementWithContextMenu_1.ElementWithContextMenu {
26
26
  actionsLabel;
27
27
  /**
28
28
  * Get names of all selectable channels
@@ -17,7 +17,7 @@
17
17
  import { BottomBarPanel } from '../..';
18
18
  import { AbstractElement } from '../AbstractElement';
19
19
  import { WebElement } from 'selenium-webdriver';
20
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
20
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
21
21
  /**
22
22
  * Problems view in the bottom panel
23
23
  */
@@ -62,7 +62,7 @@ export declare class ProblemsView extends AbstractElement {
62
62
  /**
63
63
  * Page object for a Marker in Problems view
64
64
  */
65
- export declare class Marker extends ElementWithContexMenu {
65
+ export declare class Marker extends ElementWithContextMenu {
66
66
  constructor(element: WebElement, view: ProblemsView);
67
67
  /**
68
68
  * Get the type of the marker. Possible types are:
@@ -96,7 +96,7 @@ exports.ProblemsView = ProblemsView;
96
96
  /**
97
97
  * Page object for a Marker in Problems view
98
98
  */
99
- class Marker extends ElementWithContextMenu_1.ElementWithContexMenu {
99
+ class Marker extends ElementWithContextMenu_1.ElementWithContextMenu {
100
100
  constructor(element, view) {
101
101
  super(element, view);
102
102
  }
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import { BottomBarPanel, ContentAssist } from '../..';
18
18
  import { TextView, ChannelView } from './AbstractViews';
19
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
19
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
20
20
  /**
21
21
  * Output view of the bottom panel
22
22
  */
@@ -32,7 +32,7 @@ export declare class OutputView extends TextView {
32
32
  * Debug Console view on the bottom panel
33
33
  * Most functionality will only be available when a debug session is running
34
34
  */
35
- export declare class DebugConsoleView extends ElementWithContexMenu {
35
+ export declare class DebugConsoleView extends ElementWithContextMenu {
36
36
  constructor(panel?: BottomBarPanel);
37
37
  /**
38
38
  * Clear the console of all text
@@ -42,7 +42,7 @@ exports.OutputView = OutputView;
42
42
  * Debug Console view on the bottom panel
43
43
  * Most functionality will only be available when a debug session is running
44
44
  */
45
- class DebugConsoleView extends ElementWithContextMenu_1.ElementWithContexMenu {
45
+ class DebugConsoleView extends ElementWithContextMenu_1.ElementWithContextMenu {
46
46
  constructor(panel = new __1.BottomBarPanel()) {
47
47
  super(DebugConsoleView.locators.DebugConsoleView.constructor, panel);
48
48
  }
@@ -14,13 +14,13 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
17
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
18
18
  import { EditorTab, EditorView, EditorGroup } from '../..';
19
19
  import { WebElement, Locator } from 'selenium-webdriver';
20
20
  /**
21
21
  * Abstract representation of an editor tab
22
22
  */
23
- export declare abstract class Editor extends ElementWithContexMenu {
23
+ export declare abstract class Editor extends ElementWithContextMenu {
24
24
  constructor(view?: EditorView | EditorGroup, base?: Locator | WebElement);
25
25
  /**
26
26
  * Get title/name of the open editor
@@ -22,7 +22,7 @@ const __1 = require("../..");
22
22
  /**
23
23
  * Abstract representation of an editor tab
24
24
  */
25
- class Editor extends ElementWithContextMenu_1.ElementWithContexMenu {
25
+ class Editor extends ElementWithContextMenu_1.ElementWithContextMenu {
26
26
  constructor(view = new __1.EditorView(), base = Editor.locators.Editor.constructor) {
27
27
  super(base, view);
28
28
  }
@@ -15,12 +15,15 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import { EditorGroup } from './EditorView';
18
- import { AbstractElement } from '../AbstractElement';
19
- import { WebElement } from '../..';
20
- export declare class EditorAction extends AbstractElement {
18
+ import { ContextMenu, WebElement } from '../..';
19
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
20
+ export declare class EditorAction extends ElementWithContextMenu {
21
21
  constructor(element: WebElement, parent: EditorGroup);
22
22
  /**
23
23
  * Get text description of the action.
24
24
  */
25
25
  getTitle(): Promise<string>;
26
26
  }
27
+ export declare class EditorActionDropdown extends EditorAction {
28
+ open(): Promise<ContextMenu>;
29
+ }
@@ -16,9 +16,10 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.EditorAction = void 0;
20
- const AbstractElement_1 = require("../AbstractElement");
21
- class EditorAction extends AbstractElement_1.AbstractElement {
19
+ exports.EditorActionDropdown = exports.EditorAction = void 0;
20
+ const __1 = require("../..");
21
+ const ElementWithContextMenu_1 = require("../ElementWithContextMenu");
22
+ class EditorAction extends ElementWithContextMenu_1.ElementWithContextMenu {
22
23
  constructor(element, parent) {
23
24
  super(element, parent);
24
25
  }
@@ -30,4 +31,38 @@ class EditorAction extends AbstractElement_1.AbstractElement {
30
31
  }
31
32
  }
32
33
  exports.EditorAction = EditorAction;
34
+ class EditorActionDropdown extends EditorAction {
35
+ async open() {
36
+ await this.click();
37
+ const shadowRootHost = await this.enclosingItem.findElements(__1.By.className('shadow-root-host'));
38
+ const actions = this.getDriver().actions();
39
+ await actions.clear();
40
+ await actions.sendKeys(__1.Key.ESCAPE).perform();
41
+ const webdriverCapabilities = await this.getDriver().getCapabilities();
42
+ const chromiumVersion = webdriverCapabilities.getBrowserVersion();
43
+ if (shadowRootHost.length > 0) {
44
+ if ((await this.getAttribute('aria-expanded')) !== 'true') {
45
+ await this.click();
46
+ }
47
+ let shadowRoot;
48
+ const webdriverCapabilities = await this.getDriver().getCapabilities();
49
+ const chromiumVersion = webdriverCapabilities.getBrowserVersion();
50
+ if (chromiumVersion && parseInt(chromiumVersion.split('.')[0]) >= 96) {
51
+ shadowRoot = await shadowRootHost[0].getShadowRoot();
52
+ return new __1.ContextMenu(await shadowRoot.findElement(__1.By.className('monaco-menu-container'))).wait();
53
+ }
54
+ else {
55
+ shadowRoot = (await this.getDriver().executeScript('return arguments[0].shadowRoot', shadowRootHost[0]));
56
+ return new __1.ContextMenu(shadowRoot).wait();
57
+ }
58
+ }
59
+ else if (chromiumVersion && parseInt(chromiumVersion.split('.')[0]) >= 100) {
60
+ await this.click();
61
+ const workbench = await this.getDriver().findElement(ElementWithContextMenu_1.ElementWithContextMenu.locators.Workbench.constructor);
62
+ return new __1.ContextMenu(workbench).wait();
63
+ }
64
+ return await super.openContextMenu();
65
+ }
66
+ }
67
+ exports.EditorActionDropdown = EditorActionDropdown;
33
68
  //# sourceMappingURL=EditorAction.js.map
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import { WebElement } from 'selenium-webdriver';
18
18
  import { AbstractElement } from '../AbstractElement';
19
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
19
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
20
20
  import { Editor } from './Editor';
21
21
  import { EditorAction } from './EditorAction';
22
22
  export declare class EditorTabNotFound extends Error {
@@ -155,7 +155,7 @@ export declare class EditorGroup extends AbstractElement {
155
155
  /**
156
156
  * Page object for editor view tab
157
157
  */
158
- export declare class EditorTab extends ElementWithContexMenu {
158
+ export declare class EditorTab extends ElementWithContextMenu {
159
159
  constructor(element: WebElement, view: EditorView);
160
160
  /**
161
161
  * Get the tab title as string
@@ -314,7 +314,15 @@ class EditorGroup extends AbstractElement_1.AbstractElement {
314
314
  */
315
315
  async getActions() {
316
316
  const actions = await this.findElement(EditorGroup.locators.EditorView.actionContainer).findElements(EditorGroup.locators.EditorView.actionItem);
317
- return actions.map((action) => new EditorAction_1.EditorAction(action, this));
317
+ return Promise.all(actions.map(async (action) => {
318
+ const dropdown = await action.getAttribute(EditorGroup.locators.EditorView.dropdown);
319
+ if (dropdown) {
320
+ return new EditorAction_1.EditorActionDropdown(action, this);
321
+ }
322
+ else {
323
+ return new EditorAction_1.EditorAction(action, this);
324
+ }
325
+ }));
318
326
  }
319
327
  /**
320
328
  * Find an editor action button by predicate or title
@@ -336,7 +344,7 @@ exports.EditorGroup = EditorGroup;
336
344
  /**
337
345
  * Page object for editor view tab
338
346
  */
339
- class EditorTab extends ElementWithContextMenu_1.ElementWithContexMenu {
347
+ class EditorTab extends ElementWithContextMenu_1.ElementWithContextMenu {
340
348
  constructor(element, view) {
341
349
  super(element, view);
342
350
  }
@@ -45,7 +45,7 @@ class SettingsEditor extends Editor_1.Editor {
45
45
  const category = categories.join(this.divider);
46
46
  const searchBox = await this.findElement(SettingsEditor.locators.Editor.inputArea);
47
47
  await searchBox.sendKeys(selenium_webdriver_1.Key.chord(SettingsEditor.ctlKey, 'a'));
48
- await searchBox.sendKeys(`${category}${this.divider}${title}`);
48
+ await searchBox.sendKeys(`${category}>${title}`);
49
49
  return await this._getSettingItem(title, category);
50
50
  }
51
51
  /**
@@ -17,7 +17,7 @@
17
17
  import { ContentAssist, ContextMenu, InputBox } from '../..';
18
18
  import { WebElement } from 'selenium-webdriver';
19
19
  import { Editor } from './Editor';
20
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
20
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
21
21
  import { AbstractElement } from '../AbstractElement';
22
22
  import { Breakpoint } from './Breakpoint';
23
23
  export declare class BreakpointError extends Error {
@@ -184,7 +184,7 @@ export declare class TextEditor extends Editor {
184
184
  /**
185
185
  * Text selection block
186
186
  */
187
- declare class Selection extends ElementWithContexMenu {
187
+ declare class Selection extends ElementWithContextMenu {
188
188
  constructor(el: WebElement, editor: TextEditor);
189
189
  openContextMenu(): Promise<ContextMenu>;
190
190
  }
@@ -511,7 +511,7 @@ exports.TextEditor = TextEditor;
511
511
  /**
512
512
  * Text selection block
513
513
  */
514
- class Selection extends ElementWithContextMenu_1.ElementWithContexMenu {
514
+ class Selection extends ElementWithContextMenu_1.ElementWithContextMenu {
515
515
  constructor(el, editor) {
516
516
  super(el, editor);
517
517
  }
@@ -20,8 +20,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.WebView = void 0;
23
- /* eslint-disable no-redeclare */
24
- const selenium_webdriver_1 = require("selenium-webdriver");
25
23
  const WebviewMixin_1 = __importDefault(require("../WebviewMixin"));
26
24
  const Editor_1 = require("./Editor");
27
25
  /**
@@ -38,17 +36,7 @@ class WebViewBase extends Editor_1.Editor {
38
36
  }
39
37
  }
40
38
  await this.getDriver().switchTo().window(handle);
41
- const reference = await this.findElement(WebViewBase.locators.EditorView.webView);
42
- const containers = await this.getDriver().wait(selenium_webdriver_1.until.elementsLocated(WebViewBase.locators.WebView.container(await reference.getAttribute(WebViewBase.locators.WebView.attribute))), 5000);
43
- return (await containers[0].getDriver().wait(async () => {
44
- for (const container of containers) {
45
- const tries = await container.findElements(WebViewBase.locators.WebView.iframe);
46
- if (tries.length > 0) {
47
- return tries[0];
48
- }
49
- }
50
- return undefined;
51
- }, 5000));
39
+ return await this.getDriver().findElement(WebViewBase.locators.WebView.iframe);
52
40
  }
53
41
  }
54
42
  exports.WebView = (0, WebviewMixin_1.default)(WebViewBase);
@@ -14,13 +14,13 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
17
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
18
18
  import { AbstractElement } from '../AbstractElement';
19
19
  import { WebElement, By } from 'selenium-webdriver';
20
20
  /**
21
21
  * Arbitrary item in the side bar view
22
22
  */
23
- export declare abstract class ViewItem extends ElementWithContexMenu {
23
+ export declare abstract class ViewItem extends ElementWithContextMenu {
24
24
  /**
25
25
  * Select the item in the view.
26
26
  * Note that selecting the item will toggle its expand state when applicable.
@@ -24,7 +24,7 @@ const NullAttributeError_1 = require("../../errors/NullAttributeError");
24
24
  /**
25
25
  * Arbitrary item in the side bar view
26
26
  */
27
- class ViewItem extends ElementWithContextMenu_1.ElementWithContexMenu {
27
+ class ViewItem extends ElementWithContextMenu_1.ElementWithContextMenu {
28
28
  /**
29
29
  * Select the item in the view.
30
30
  * Note that selecting the item will toggle its expand state when applicable.
@@ -130,7 +130,7 @@ class ViewSection extends AbstractElement_1.AbstractElement {
130
130
  return undefined;
131
131
  }
132
132
  const section = this;
133
- const btn = new (class extends ElementWithContextMenu_1.ElementWithContexMenu {
133
+ const btn = new (class extends ElementWithContextMenu_1.ElementWithContextMenu {
134
134
  async openContextMenu() {
135
135
  await this.click();
136
136
  const shadowRootHost = await section.findElements(selenium_webdriver_1.By.className('shadow-root-host'));
@@ -172,7 +172,7 @@ class ViewPanelAction extends AbstractElement_1.AbstractElement {
172
172
  return await this.getAttribute(ViewSection.locators.ViewSection.buttonLabel);
173
173
  }
174
174
  async wait(timeout = 1000) {
175
- await this.getDriver().wait(selenium_webdriver_1.until.elementIsEnabled(this), timeout);
175
+ await this.getDriver().wait(selenium_webdriver_1.until.elementLocated(ViewSection.locators.ViewSection.actions), timeout);
176
176
  return this;
177
177
  }
178
178
  }
@@ -14,13 +14,13 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
17
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
18
18
  import { AbstractElement } from '../AbstractElement';
19
19
  import { By, SideBarView } from '../..';
20
20
  /**
21
21
  * Page object representing the top (title) part of a side bar view
22
22
  */
23
- export declare class ViewTitlePart extends ElementWithContexMenu {
23
+ export declare class ViewTitlePart extends ElementWithContextMenu {
24
24
  constructor(view?: SideBarView);
25
25
  /**
26
26
  * Returns the displayed title of the view
@@ -23,7 +23,7 @@ const __1 = require("../..");
23
23
  /**
24
24
  * Page object representing the top (title) part of a side bar view
25
25
  */
26
- class ViewTitlePart extends ElementWithContextMenu_1.ElementWithContexMenu {
26
+ class ViewTitlePart extends ElementWithContextMenu_1.ElementWithContextMenu {
27
27
  constructor(view = new __1.SideBarView()) {
28
28
  super(ViewTitlePart.locators.ViewTitlePart.constructor, view);
29
29
  }
@@ -163,7 +163,7 @@ class MultiScmProvider extends ScmView_1.ScmProvider {
163
163
  }
164
164
  }
165
165
  exports.MultiScmProvider = MultiScmProvider;
166
- class MultiMoreAction extends ElementWithContextMenu_1.ElementWithContexMenu {
166
+ class MultiMoreAction extends ElementWithContextMenu_1.ElementWithContextMenu {
167
167
  constructor(scm) {
168
168
  super(ScmView_1.MoreAction.locators.ScmView.multiMore, scm);
169
169
  }
@@ -18,7 +18,7 @@ import { SideBarView } from '../SideBarView';
18
18
  import { WebElement } from 'selenium-webdriver';
19
19
  import { AbstractElement } from '../../AbstractElement';
20
20
  import { ContextMenu } from '../../..';
21
- import { ElementWithContexMenu } from '../../ElementWithContextMenu';
21
+ import { ElementWithContextMenu } from '../../ElementWithContextMenu';
22
22
  /**
23
23
  * Page object representing the Source Control view
24
24
  */
@@ -87,7 +87,7 @@ export declare class ScmProvider extends AbstractElement {
87
87
  /**
88
88
  * Page object representing a SCM change tree item
89
89
  */
90
- export declare class ScmChange extends ElementWithContexMenu {
90
+ export declare class ScmChange extends ElementWithContextMenu {
91
91
  constructor(row: WebElement, provider: ScmProvider);
92
92
  /**
93
93
  * Get label as a string
@@ -120,7 +120,7 @@ export declare class ScmChange extends ElementWithContexMenu {
120
120
  */
121
121
  takeAction(title: string): Promise<boolean>;
122
122
  }
123
- export declare class MoreAction extends ElementWithContexMenu {
123
+ export declare class MoreAction extends ElementWithContextMenu {
124
124
  constructor(scm: ScmProvider | ScmView);
125
125
  openContextMenu(): Promise<ContextMenu>;
126
126
  }
@@ -177,7 +177,7 @@ exports.ScmProvider = ScmProvider;
177
177
  /**
178
178
  * Page object representing a SCM change tree item
179
179
  */
180
- class ScmChange extends ElementWithContextMenu_1.ElementWithContexMenu {
180
+ class ScmChange extends ElementWithContextMenu_1.ElementWithContextMenu {
181
181
  constructor(row, provider) {
182
182
  super(row, provider);
183
183
  }
@@ -251,7 +251,7 @@ class ScmChange extends ElementWithContextMenu_1.ElementWithContexMenu {
251
251
  }
252
252
  }
253
253
  exports.ScmChange = ScmChange;
254
- class MoreAction extends ElementWithContextMenu_1.ElementWithContexMenu {
254
+ class MoreAction extends ElementWithContextMenu_1.ElementWithContextMenu {
255
255
  constructor(scm) {
256
256
  super(MoreAction.locators.ScmView.more, scm);
257
257
  }
@@ -281,7 +281,7 @@ class MoreAction extends ElementWithContextMenu_1.ElementWithContexMenu {
281
281
  }
282
282
  else if (chromiumVersion && parseInt(chromiumVersion.split('.')[0]) >= 100) {
283
283
  await this.click();
284
- const workbench = await this.getDriver().findElement(ElementWithContextMenu_1.ElementWithContexMenu.locators.Workbench.constructor);
284
+ const workbench = await this.getDriver().findElement(ElementWithContextMenu_1.ElementWithContextMenu.locators.Workbench.constructor);
285
285
  return new __1.ContextMenu(workbench).wait();
286
286
  }
287
287
  return await super.openContextMenu();
@@ -14,6 +14,6 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ElementWithContexMenu } from '../../../ElementWithContextMenu';
18
- export declare class SectionBreakpoint extends ElementWithContexMenu {
17
+ import { ElementWithContextMenu } from '../../../ElementWithContextMenu';
18
+ export declare class SectionBreakpoint extends ElementWithContextMenu {
19
19
  }
@@ -18,7 +18,7 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.SectionBreakpoint = void 0;
20
20
  const ElementWithContextMenu_1 = require("../../../ElementWithContextMenu");
21
- class SectionBreakpoint extends ElementWithContextMenu_1.ElementWithContexMenu {
21
+ class SectionBreakpoint extends ElementWithContextMenu_1.ElementWithContextMenu {
22
22
  }
23
23
  exports.SectionBreakpoint = SectionBreakpoint;
24
24
  //# sourceMappingURL=SectionBreakpoint.js.map
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ElementWithContexMenu } from '../ElementWithContextMenu';
17
+ import { ElementWithContextMenu } from '../ElementWithContextMenu';
18
18
  import { AbstractElement } from '../AbstractElement';
19
19
  import { By, WebElement } from 'selenium-webdriver';
20
20
  /**
@@ -29,7 +29,7 @@ export declare enum NotificationType {
29
29
  /**
30
30
  * Abstract element representing a notification
31
31
  */
32
- export declare abstract class Notification extends ElementWithContexMenu {
32
+ export declare abstract class Notification extends ElementWithContextMenu {
33
33
  /**
34
34
  * Get the message of the notification
35
35
  * @returns Promise resolving to notification message
@@ -33,7 +33,7 @@ var NotificationType;
33
33
  /**
34
34
  * Abstract element representing a notification
35
35
  */
36
- class Notification extends ElementWithContextMenu_1.ElementWithContexMenu {
36
+ class Notification extends ElementWithContextMenu_1.ElementWithContextMenu {
37
37
  /**
38
38
  * Get the message of the notification
39
39
  * @returns Promise resolving to notification message
@@ -114,6 +114,7 @@ export interface Locators {
114
114
  actionContainer: By;
115
115
  actionItem: By;
116
116
  attribute: string;
117
+ dropdown: string;
117
118
  };
118
119
  Editor: {
119
120
  constructor: By;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redhat-developer/page-objects",
3
- "version": "1.1.3",
3
+ "version": "1.2.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",
@@ -39,12 +39,12 @@
39
39
  "dependencies": {
40
40
  "clipboardy": "^4.0.0",
41
41
  "clone-deep": "^4.0.1",
42
- "compare-versions": "^6.1.0",
42
+ "compare-versions": "^6.1.1",
43
43
  "fs-extra": "^11.2.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "selenium-webdriver": ">=4.6.1",
47
47
  "typescript": ">=4.6.2"
48
48
  },
49
- "gitHead": "d60b9bb6451e776a9ceefbaee32d9becdee5430d"
49
+ "gitHead": "184a5eb785998e5956c78b3b06706bd1d3bd3557"
50
50
  }