From 10bd3dcfd86bfeadbb30c3b9f167c11de59d9b25 Mon Sep 17 00:00:00 2001 From: Dominik Jelinek Date: Wed, 17 Jul 2024 16:14:02 +0200 Subject: [PATCH] fix: Correct typo in ElementWithContextMenu Signed-off-by: Dominik Jelinek --- .../src/components/ElementWithContextMenu.ts | 10 +++++----- .../src/components/activityBar/ActionsControl.ts | 4 ++-- .../src/components/activityBar/ActivityBar.ts | 4 ++-- .../src/components/activityBar/ViewControl.ts | 4 ++-- .../src/components/bottomBar/AbstractViews.ts | 4 ++-- .../src/components/bottomBar/ProblemsView.ts | 4 ++-- .../page-objects/src/components/bottomBar/Views.ts | 4 ++-- packages/page-objects/src/components/editor/Editor.ts | 4 ++-- .../page-objects/src/components/editor/EditorAction.ts | 7 +++---- .../page-objects/src/components/editor/EditorView.ts | 4 ++-- .../page-objects/src/components/editor/TextEditor.ts | 4 ++-- .../page-objects/src/components/sidebar/ViewItem.ts | 4 ++-- .../page-objects/src/components/sidebar/ViewSection.ts | 4 ++-- .../src/components/sidebar/ViewTitlePart.ts | 4 ++-- .../src/components/sidebar/scm/NewScmView.ts | 4 ++-- .../page-objects/src/components/sidebar/scm/ScmView.ts | 8 ++++---- .../components/sidebar/tree/debug/SectionBreakpoint.ts | 4 ++-- .../src/components/workbench/Notification.ts | 4 ++-- 18 files changed, 42 insertions(+), 43 deletions(-) diff --git a/packages/page-objects/src/components/ElementWithContextMenu.ts b/packages/page-objects/src/components/ElementWithContextMenu.ts index 90f5c30de..b98083708 100644 --- a/packages/page-objects/src/components/ElementWithContextMenu.ts +++ b/packages/page-objects/src/components/ElementWithContextMenu.ts @@ -22,19 +22,19 @@ import { until, error } from 'selenium-webdriver'; /** * Abstract element that has a context menu */ -export abstract class ElementWithContexMenu extends AbstractElement { +export abstract class ElementWithContextMenu extends AbstractElement { /** * Open context menu on the element */ async openContextMenu(): Promise { - const workbench = await this.getDriver().findElement(ElementWithContexMenu.locators.Workbench.constructor); - const menus = await workbench.findElements(ElementWithContexMenu.locators.ContextMenu.contextView); + const workbench = await this.getDriver().findElement(ElementWithContextMenu.locators.Workbench.constructor); + const menus = await workbench.findElements(ElementWithContextMenu.locators.ContextMenu.contextView); if (menus.length < 1) { await this.getDriver().actions().contextClick(this).perform(); - await this.getDriver().wait(until.elementLocated(ElementWithContexMenu.locators.ContextMenu.contextView), 2000); + await this.getDriver().wait(until.elementLocated(ElementWithContextMenu.locators.ContextMenu.contextView), 2000); return new ContextMenu(workbench).wait(); - } else if ((await workbench.findElements(ElementWithContexMenu.locators.ContextMenu.viewBlock)).length > 0) { + } else if ((await workbench.findElements(ElementWithContextMenu.locators.ContextMenu.viewBlock)).length > 0) { await this.getDriver().actions().contextClick(this).perform(); try { await this.getDriver().wait(until.elementIsNotVisible(this), 1000); diff --git a/packages/page-objects/src/components/activityBar/ActionsControl.ts b/packages/page-objects/src/components/activityBar/ActionsControl.ts index 97f59e626..aca74a91e 100644 --- a/packages/page-objects/src/components/activityBar/ActionsControl.ts +++ b/packages/page-objects/src/components/activityBar/ActionsControl.ts @@ -17,12 +17,12 @@ import { WebElement } from 'selenium-webdriver'; import { ActivityBar, ContextMenu } from '../..'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; /** * Page object representing the global action controls on the bottom of the action bar */ -export class ActionsControl extends ElementWithContexMenu { +export class ActionsControl extends ElementWithContextMenu { constructor(element: WebElement, bar: ActivityBar) { super(element, bar); } diff --git a/packages/page-objects/src/components/activityBar/ActivityBar.ts b/packages/page-objects/src/components/activityBar/ActivityBar.ts index d9bcd3959..22e933a31 100644 --- a/packages/page-objects/src/components/activityBar/ActivityBar.ts +++ b/packages/page-objects/src/components/activityBar/ActivityBar.ts @@ -16,12 +16,12 @@ */ import { ActionsControl, ViewControl } from '../..'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; /** * Page object representing the left side activity bar in VS Code */ -export class ActivityBar extends ElementWithContexMenu { +export class ActivityBar extends ElementWithContextMenu { constructor() { super(ActivityBar.locators.ActivityBar.constructor, ActivityBar.locators.Workbench.constructor); } diff --git a/packages/page-objects/src/components/activityBar/ViewControl.ts b/packages/page-objects/src/components/activityBar/ViewControl.ts index 07b97fad6..6d3652d15 100644 --- a/packages/page-objects/src/components/activityBar/ViewControl.ts +++ b/packages/page-objects/src/components/activityBar/ViewControl.ts @@ -16,14 +16,14 @@ */ import { ActivityBar, DebugView, SideBarView, ScmView } from '../..'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { WebElement } from 'selenium-webdriver'; import { NewScmView } from '../sidebar/scm/NewScmView'; /** * Page object representing a view container item in the activity bar */ -export class ViewControl extends ElementWithContexMenu { +export class ViewControl extends ElementWithContextMenu { constructor(element: WebElement, bar: ActivityBar) { super(element, bar); } diff --git a/packages/page-objects/src/components/bottomBar/AbstractViews.ts b/packages/page-objects/src/components/bottomBar/AbstractViews.ts index 4a03f1c4a..97eda1237 100644 --- a/packages/page-objects/src/components/bottomBar/AbstractViews.ts +++ b/packages/page-objects/src/components/bottomBar/AbstractViews.ts @@ -16,12 +16,12 @@ */ import { Key } from 'selenium-webdriver'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; /** * View with channel selector */ -export abstract class ChannelView extends ElementWithContexMenu { +export abstract class ChannelView extends ElementWithContextMenu { protected actionsLabel!: string; /** diff --git a/packages/page-objects/src/components/bottomBar/ProblemsView.ts b/packages/page-objects/src/components/bottomBar/ProblemsView.ts index d53042c9d..463af7fd0 100644 --- a/packages/page-objects/src/components/bottomBar/ProblemsView.ts +++ b/packages/page-objects/src/components/bottomBar/ProblemsView.ts @@ -18,7 +18,7 @@ import { BottomBarPanel } from '../..'; import { AbstractElement } from '../AbstractElement'; import { WebElement } from 'selenium-webdriver'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; /** * Problems view in the bottom panel @@ -102,7 +102,7 @@ export class ProblemsView extends AbstractElement { /** * Page object for a Marker in Problems view */ -export class Marker extends ElementWithContexMenu { +export class Marker extends ElementWithContextMenu { constructor(element: WebElement, view: ProblemsView) { super(element, view); } diff --git a/packages/page-objects/src/components/bottomBar/Views.ts b/packages/page-objects/src/components/bottomBar/Views.ts index 8c85ccd5e..1132d2dd9 100644 --- a/packages/page-objects/src/components/bottomBar/Views.ts +++ b/packages/page-objects/src/components/bottomBar/Views.ts @@ -18,7 +18,7 @@ import { Key, until } from 'selenium-webdriver'; import { BottomBarPanel, ContentAssist, Workbench } from '../..'; import { TextView, ChannelView } from './AbstractViews'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; /** * Output view of the bottom panel @@ -42,7 +42,7 @@ export class OutputView extends TextView { * Debug Console view on the bottom panel * Most functionality will only be available when a debug session is running */ -export class DebugConsoleView extends ElementWithContexMenu { +export class DebugConsoleView extends ElementWithContextMenu { constructor(panel: BottomBarPanel = new BottomBarPanel()) { super(DebugConsoleView.locators.DebugConsoleView.constructor, panel); } diff --git a/packages/page-objects/src/components/editor/Editor.ts b/packages/page-objects/src/components/editor/Editor.ts index 1b48ef722..89eead6fa 100644 --- a/packages/page-objects/src/components/editor/Editor.ts +++ b/packages/page-objects/src/components/editor/Editor.ts @@ -15,14 +15,14 @@ * limitations under the License. */ -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { EditorTab, EditorView, EditorGroup } from '../..'; import { WebElement, Locator } from 'selenium-webdriver'; /** * Abstract representation of an editor tab */ -export abstract class Editor extends ElementWithContexMenu { +export abstract class Editor extends ElementWithContextMenu { constructor(view: EditorView | EditorGroup = new EditorView(), base: Locator | WebElement = Editor.locators.Editor.constructor) { super(base, view); } diff --git a/packages/page-objects/src/components/editor/EditorAction.ts b/packages/page-objects/src/components/editor/EditorAction.ts index 6909495f9..58bf5ff91 100644 --- a/packages/page-objects/src/components/editor/EditorAction.ts +++ b/packages/page-objects/src/components/editor/EditorAction.ts @@ -17,11 +17,10 @@ import { EditorGroup } from './EditorView'; import { By, ContextMenu, Key, WebElement } from '../..'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { ChromiumWebDriver } from 'selenium-webdriver/chromium'; -export class EditorAction extends ElementWithContexMenu { - +export class EditorAction extends ElementWithContextMenu { constructor(element: WebElement, parent: EditorGroup) { super(element, parent); } @@ -59,7 +58,7 @@ export class EditorActionDropdown extends EditorAction { } } else if (chromiumVersion && parseInt(chromiumVersion.split('.')[0]) >= 100) { await this.click(); - const workbench = await this.getDriver().findElement(ElementWithContexMenu.locators.Workbench.constructor); + const workbench = await this.getDriver().findElement(ElementWithContextMenu.locators.Workbench.constructor); return new ContextMenu(workbench).wait(); } return await super.openContextMenu(); diff --git a/packages/page-objects/src/components/editor/EditorView.ts b/packages/page-objects/src/components/editor/EditorView.ts index afcc68fc6..977450368 100644 --- a/packages/page-objects/src/components/editor/EditorView.ts +++ b/packages/page-objects/src/components/editor/EditorView.ts @@ -18,7 +18,7 @@ import { error, WebElement } from 'selenium-webdriver'; import { TextEditor } from '../..'; import { AbstractElement } from '../AbstractElement'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { DiffEditor } from './DiffEditor'; import { Editor } from './Editor'; import { EditorAction, EditorActionDropdown } from './EditorAction'; @@ -374,7 +374,7 @@ export class EditorGroup extends AbstractElement { /** * Page object for editor view tab */ -export class EditorTab extends ElementWithContexMenu { +export class EditorTab extends ElementWithContextMenu { constructor(element: WebElement, view: EditorView) { super(element, view); } diff --git a/packages/page-objects/src/components/editor/TextEditor.ts b/packages/page-objects/src/components/editor/TextEditor.ts index b45a98d77..17928c96f 100644 --- a/packages/page-objects/src/components/editor/TextEditor.ts +++ b/packages/page-objects/src/components/editor/TextEditor.ts @@ -20,7 +20,7 @@ import { By, Key, until, WebElement } from 'selenium-webdriver'; import { fileURLToPath } from 'url'; import { StatusBar } from '../statusBar/StatusBar'; import { Editor } from './Editor'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { AbstractElement } from '../AbstractElement'; import { Breakpoint } from './Breakpoint'; import { ChromiumWebDriver } from 'selenium-webdriver/chromium'; @@ -545,7 +545,7 @@ export class TextEditor extends Editor { /** * Text selection block */ -class Selection extends ElementWithContexMenu { +class Selection extends ElementWithContextMenu { constructor(el: WebElement, editor: TextEditor) { super(el, editor); } diff --git a/packages/page-objects/src/components/sidebar/ViewItem.ts b/packages/page-objects/src/components/sidebar/ViewItem.ts index 35f801e79..fd63bf58d 100644 --- a/packages/page-objects/src/components/sidebar/ViewItem.ts +++ b/packages/page-objects/src/components/sidebar/ViewItem.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { AbstractElement } from '../AbstractElement'; import { WebElement, By, error } from 'selenium-webdriver'; import { NullAttributeError } from '../../errors/NullAttributeError'; @@ -23,7 +23,7 @@ import { NullAttributeError } from '../../errors/NullAttributeError'; /** * Arbitrary item in the side bar view */ -export abstract class ViewItem extends ElementWithContexMenu { +export abstract class ViewItem extends ElementWithContextMenu { /** * Select the item in the view. * Note that selecting the item will toggle its expand state when applicable. diff --git a/packages/page-objects/src/components/sidebar/ViewSection.ts b/packages/page-objects/src/components/sidebar/ViewSection.ts index f91adaa2d..170c544a8 100644 --- a/packages/page-objects/src/components/sidebar/ViewSection.ts +++ b/packages/page-objects/src/components/sidebar/ViewSection.ts @@ -18,7 +18,7 @@ import { By, until, WebElement } from 'selenium-webdriver'; import { ContextMenu, ViewContent, ViewItem, waitForAttributeValue, WelcomeContentSection } from '../..'; import { AbstractElement } from '../AbstractElement'; -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { ChromiumWebDriver } from 'selenium-webdriver/chromium'; export type ViewSectionConstructor = { @@ -177,7 +177,7 @@ export abstract class ViewSection extends AbstractElement { return undefined; } const section = this; - const btn = new (class extends ElementWithContexMenu { + const btn = new (class extends ElementWithContextMenu { async openContextMenu() { await this.click(); const shadowRootHost = await section.findElements(By.className('shadow-root-host')); diff --git a/packages/page-objects/src/components/sidebar/ViewTitlePart.ts b/packages/page-objects/src/components/sidebar/ViewTitlePart.ts index 1196bc010..8d9051101 100644 --- a/packages/page-objects/src/components/sidebar/ViewTitlePart.ts +++ b/packages/page-objects/src/components/sidebar/ViewTitlePart.ts @@ -15,14 +15,14 @@ * limitations under the License. */ -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { AbstractElement } from '../AbstractElement'; import { By, SideBarView } from '../..'; /** * Page object representing the top (title) part of a side bar view */ -export class ViewTitlePart extends ElementWithContexMenu { +export class ViewTitlePart extends ElementWithContextMenu { constructor(view: SideBarView = new SideBarView()) { super(ViewTitlePart.locators.ViewTitlePart.constructor, view); } diff --git a/packages/page-objects/src/components/sidebar/scm/NewScmView.ts b/packages/page-objects/src/components/sidebar/scm/NewScmView.ts index 682483211..f80cf8a76 100644 --- a/packages/page-objects/src/components/sidebar/scm/NewScmView.ts +++ b/packages/page-objects/src/components/sidebar/scm/NewScmView.ts @@ -18,7 +18,7 @@ import { ScmView, ScmProvider, MoreAction, ScmChange } from './ScmView'; import { WebElement, Key } from 'selenium-webdriver'; import { ContextMenu } from '../../menu/ContextMenu'; -import { ElementWithContexMenu } from '../../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../../ElementWithContextMenu'; import { TitleActionButton } from '../ViewTitlePart'; /** @@ -181,7 +181,7 @@ export class MultiScmProvider extends ScmProvider { } } -class MultiMoreAction extends ElementWithContexMenu { +class MultiMoreAction extends ElementWithContextMenu { constructor(scm: ScmProvider) { super(MoreAction.locators.ScmView.multiMore, scm); } diff --git a/packages/page-objects/src/components/sidebar/scm/ScmView.ts b/packages/page-objects/src/components/sidebar/scm/ScmView.ts index f49a7819c..baab53d4a 100644 --- a/packages/page-objects/src/components/sidebar/scm/ScmView.ts +++ b/packages/page-objects/src/components/sidebar/scm/ScmView.ts @@ -19,7 +19,7 @@ import { SideBarView } from '../SideBarView'; import { WebElement, Key, By } from 'selenium-webdriver'; import { AbstractElement } from '../../AbstractElement'; import { ContextMenu } from '../../..'; -import { ElementWithContexMenu } from '../../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../../ElementWithContextMenu'; import { ChromiumWebDriver } from 'selenium-webdriver/chromium'; /** @@ -188,7 +188,7 @@ export class ScmProvider extends AbstractElement { /** * Page object representing a SCM change tree item */ -export class ScmChange extends ElementWithContexMenu { +export class ScmChange extends ElementWithContextMenu { constructor(row: WebElement, provider: ScmProvider) { super(row, provider); } @@ -270,7 +270,7 @@ export class ScmChange extends ElementWithContexMenu { } } -export class MoreAction extends ElementWithContexMenu { +export class MoreAction extends ElementWithContextMenu { constructor(scm: ScmProvider | ScmView) { super(MoreAction.locators.ScmView.more, scm); } @@ -299,7 +299,7 @@ export class MoreAction extends ElementWithContexMenu { } } else if (chromiumVersion && parseInt(chromiumVersion.split('.')[0]) >= 100) { await this.click(); - const workbench = await this.getDriver().findElement(ElementWithContexMenu.locators.Workbench.constructor); + const workbench = await this.getDriver().findElement(ElementWithContextMenu.locators.Workbench.constructor); return new ContextMenu(workbench).wait(); } return await super.openContextMenu(); diff --git a/packages/page-objects/src/components/sidebar/tree/debug/SectionBreakpoint.ts b/packages/page-objects/src/components/sidebar/tree/debug/SectionBreakpoint.ts index 9c8c06457..f47db605d 100644 --- a/packages/page-objects/src/components/sidebar/tree/debug/SectionBreakpoint.ts +++ b/packages/page-objects/src/components/sidebar/tree/debug/SectionBreakpoint.ts @@ -15,6 +15,6 @@ * limitations under the License. */ -import { ElementWithContexMenu } from '../../../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../../../ElementWithContextMenu'; -export class SectionBreakpoint extends ElementWithContexMenu {} +export class SectionBreakpoint extends ElementWithContextMenu {} diff --git a/packages/page-objects/src/components/workbench/Notification.ts b/packages/page-objects/src/components/workbench/Notification.ts index 18b8501d0..c5ae4eefc 100644 --- a/packages/page-objects/src/components/workbench/Notification.ts +++ b/packages/page-objects/src/components/workbench/Notification.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { ElementWithContexMenu } from '../ElementWithContextMenu'; +import { ElementWithContextMenu } from '../ElementWithContextMenu'; import { AbstractElement } from '../AbstractElement'; import { By, until, WebElement } from 'selenium-webdriver'; @@ -32,7 +32,7 @@ export enum NotificationType { /** * Abstract element representing a notification */ -export abstract class Notification extends ElementWithContexMenu { +export abstract class Notification extends ElementWithContextMenu { /** * Get the message of the notification * @returns Promise resolving to notification message