diff --git a/packages/page-objects/src/components/menu/TitleBar.ts b/packages/page-objects/src/components/menu/TitleBar.ts index 9d22d93f0..84a60a0bf 100644 --- a/packages/page-objects/src/components/menu/TitleBar.ts +++ b/packages/page-objects/src/components/menu/TitleBar.ts @@ -68,6 +68,7 @@ export class TitleBar extends Menu { /** * Get a reference to the WindowControls + * @deprecated Window Control is no more available in a DOM of Visual Studio Code */ getWindowControls(): WindowControls { return new WindowControls(this); diff --git a/packages/page-objects/src/components/menu/WindowControls.ts b/packages/page-objects/src/components/menu/WindowControls.ts index 3f88f72d4..e83ed15d9 100644 --- a/packages/page-objects/src/components/menu/WindowControls.ts +++ b/packages/page-objects/src/components/menu/WindowControls.ts @@ -21,6 +21,7 @@ import { WebElement } from 'selenium-webdriver'; /** * Page object for the windows controls part of the title bar + * @deprecated Window Control is no more available in a DOM of Visual Studio Code */ export class WindowControls extends AbstractElement { constructor(bar: TitleBar = new TitleBar()) { @@ -30,6 +31,7 @@ export class WindowControls extends AbstractElement { /** * Use the minimize window button * @returns Promise resolving when minimize button is pressed + * @deprecated Window Control is no more available in a DOM of Visual Studio Code */ async minimize(): Promise { const minButton = await this.findElement(WindowControls.locators.WindowControls.minimize); @@ -39,6 +41,7 @@ export class WindowControls extends AbstractElement { /** * Use the maximize window button if the window is not maximized * @returns Promise resolving when maximize button is pressed + * @deprecated Window Control is no more available in a DOM of Visual Studio Code */ async maximize(): Promise { let maxButton: WebElement; @@ -53,6 +56,7 @@ export class WindowControls extends AbstractElement { /** * Use the restore window button if the window is maximized * @returns Promise resolving when restore button is pressed + * @deprecated Window Control is no more available in a DOM of Visual Studio Code */ async restore(): Promise { let maxButton: WebElement; @@ -67,6 +71,7 @@ export class WindowControls extends AbstractElement { /** * Use the window close button. Use at your own risk. * @returns Promise resolving when close button is pressed + * @deprecated Window Control is no more available in a DOM of Visual Studio Code */ async close(): Promise { const closeButton = await this.findElement(WindowControls.locators.WindowControls.close); diff --git a/tests/test-project/src/test/menu/titleBar.test.ts b/tests/test-project/src/test/menu/titleBar.test.ts index 22691c416..0b77befb2 100644 --- a/tests/test-project/src/test/menu/titleBar.test.ts +++ b/tests/test-project/src/test/menu/titleBar.test.ts @@ -46,7 +46,10 @@ import { ActivityBar, TitleBar, ContextMenu, TitleBarItem, EditorView, VSBrowser expect(title).to.includes('Visual Studio Code'); }); - it('getWindowControls works', async function () { + /** + * @deprecated Window Control is no more available in a DOM of Visual Studio Code + */ + it.skip('getWindowControls works', async function () { const controls = bar.getWindowControls(); expect(controls).not.undefined; });