diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4bc9b3429..3de5649c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - version: [min, 1.94.2, max] + version: [min, 1.95.3, max] uses: ./.github/workflows/template-main.yaml with: version: ${{ matrix.version }} diff --git a/README.md b/README.md index 6976df64c..d9bf0a2e4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ExTester Page Objects License
- Maximal supported version of VS Code + Maximal supported version of VS Code Code styled by Prettier Main CI Insider CI @@ -41,7 +41,7 @@ | NodeJS | Visual Studio Code | Operating System | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -|
20.x.xLTSLatest
✅❓✅❓
❓ Best-effort
|
min-max
1.93.x1.94.x1.95.x
|
LinuxWindowsmacOS
✅ ⚠️
⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)
| +|
20.x.xLTSLatest
✅❓✅❓
❓ Best-effort
|
min-max
1.94.x1.95.x1.96.x
|
LinuxWindowsmacOS
✅ ⚠️
⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)
| #### NodeJS Support Policy diff --git a/docs/ExtensionEditorDetailsSections.md b/docs/ExtensionEditorDetailsSections.md index 82ac926d5..22eadb8ab 100644 --- a/docs/ExtensionEditorDetailsSections.md +++ b/docs/ExtensionEditorDetailsSections.md @@ -17,6 +17,8 @@ await extensionEditorDetails.getResources(); await extensionEditorDetails.getMoreInfo(); +await extensionEditorDetails.getVersion(); // For VS Code 1.96+ + await extensionEditorDetails.getMoreInfoItem("Identifier"); await extensionEditorDetails.getReadme(); // currently not supported (Blocked by https://github.com/redhat-developer/vscode-extension-tester/issues/1492) diff --git a/docs/ExtensionEditorView.md b/docs/ExtensionEditorView.md index d6564abd2..48d822e01 100644 --- a/docs/ExtensionEditorView.md +++ b/docs/ExtensionEditorView.md @@ -15,7 +15,7 @@ You can get individual values using following functions: ```typescript await extensionEditor.getName(); -await extensionEditor.getVersion(); +await extensionEditor.getVersion(); // For VS Code 1.96+ it is required to use 'extensionEditorDetailsSection.getVersion()' instead await extensionEditor.getPublisher(); diff --git a/packages/extester/package.json b/packages/extester/package.json index ff978aaa1..76cae125d 100644 --- a/packages/extester/package.json +++ b/packages/extester/package.json @@ -52,8 +52,8 @@ "ui-test" ], "supportedVersions": { - "vscode-min": "1.93.1", - "vscode-max": "1.95.3", + "vscode-min": "1.94.2", + "vscode-max": "1.96.2", "nodejs": "20" }, "dependencies": { diff --git a/packages/page-objects/src/components/editor/ExtensionEditorDetailsSection.ts b/packages/page-objects/src/components/editor/ExtensionEditorDetailsSection.ts index 3159d5e59..77c4fd45a 100644 --- a/packages/page-objects/src/components/editor/ExtensionEditorDetailsSection.ts +++ b/packages/page-objects/src/components/editor/ExtensionEditorDetailsSection.ts @@ -63,8 +63,8 @@ export class ExtensionEditorDetailsSection extends ExtensionEditorView { for (const entry of moreInfoInContainer) { const elmnts = await entry.findElements(ExtensionEditorDetailsSection.locators.ExtensionEditorDetailsSection.moreInfoElements); - const name = await (await elmnts.at(0))?.getText(); - const value = await (await elmnts.at(1))?.getText(); + const name = await elmnts.at(0)?.getText(); + const value = await elmnts.at(1)?.getText(); if (name !== undefined && value !== undefined) { moreInfo[name] = value; } @@ -89,4 +89,13 @@ export class ExtensionEditorDetailsSection extends ExtensionEditorView { async getReadme(): Promise { throw Error('Not implemented yet.'); } + + /** + * Get version of extension. + * @returns Promise resolving version of extension. + */ + async getVersion(): Promise { + const moreInfo = await this.getMoreInfo(); + return moreInfo['Version']; + } } diff --git a/packages/page-objects/src/components/editor/ExtensionEditorView.ts b/packages/page-objects/src/components/editor/ExtensionEditorView.ts index b0982b595..1a37bc926 100644 --- a/packages/page-objects/src/components/editor/ExtensionEditorView.ts +++ b/packages/page-objects/src/components/editor/ExtensionEditorView.ts @@ -34,6 +34,7 @@ export class ExtensionEditorView extends Editor { /** * Get version of extension. * @returns Promise resolving version of extension. + * @deprecated It is no more actual for VS Code 1.96+. Version can accessed using ExtensionEditorDetailsSection. */ async getVersion(): Promise { const name = await this.findElement(ExtensionEditorView.locators.ExtensionEditorView.version); diff --git a/tests/test-project/.vscode/settings.json b/tests/test-project/.vscode/settings.json index 2cf486489..47f7ca3aa 100644 --- a/tests/test-project/.vscode/settings.json +++ b/tests/test-project/.vscode/settings.json @@ -1,3 +1,4 @@ { - "window.title": "${activeEditorShort}${separator}folder: ${rootPath}" + "window.title": "${activeEditorShort}${separator}folder: ${rootPath}", + "window.zoomLevel": -1 } diff --git a/tests/test-project/src/test/editor/extensionEditor.test.ts b/tests/test-project/src/test/editor/extensionEditor.test.ts index 11dfc69e5..38e7c972e 100644 --- a/tests/test-project/src/test/editor/extensionEditor.test.ts +++ b/tests/test-project/src/test/editor/extensionEditor.test.ts @@ -27,8 +27,11 @@ import { ViewControl, VSBrowser, WebDriver, + Workbench, + BottomBarPanel, } from 'vscode-extension-tester'; import * as pjson from '../../../package.json'; +import * as path from 'path'; describe('Extension Editor', function () { let driver: WebDriver; @@ -43,6 +46,7 @@ describe('Extension Editor', function () { before(async function () { driver = VSBrowser.instance.driver; + await VSBrowser.instance.openResources(path.resolve(__dirname, '..', '..', '..', 'resources', 'test-folder')); viewControl = (await new ActivityBar().getViewControl('Extensions')) as ViewControl; extensionsView = await viewControl.openView(); await driver.wait(async function () { @@ -64,6 +68,15 @@ describe('Extension Editor', function () { await item.click(); }); + // ensure clean workbench + before(async function () { + const panel = new BottomBarPanel(); + if (await panel.isDisplayed()) { + await panel.toggle(false); + } + await (await new Workbench().openNotificationsCenter()).clearAllNotifications(); + }); + after(async function () { await viewControl.closeView(); await new EditorView().closeAllEditors(); @@ -78,7 +91,7 @@ describe('Extension Editor', function () { expect(await extensionEditor.getName()).equal('Test Project'); }); - it('getVersion', async function () { + (VSBrowser.instance.version < '1.96.0' ? it : it.skip)('getVersion', async function () { expect(await extensionEditor.getVersion()).equal('v0.1.0'); }); @@ -126,14 +139,18 @@ describe('Extension Editor', function () { it('getMoreInfo', async function () { const moreInfo = await extensionEditorDetails.getMoreInfo(); expect(moreInfo).not.to.be.undefined; - expect(Object.keys(moreInfo)[0]).equal('Last updated'); - expect(Object.values(moreInfo)[1]).equal('extester.extester-test'); + expect(Object.keys(moreInfo)).to.contain.oneOf(['Last updated', 'Last Updated']); + expect(Object.values(moreInfo)).to.contain('extester.extester-test'); }); it('getMoreInfoItem', async function () { expect(await extensionEditorDetails.getMoreInfoItem('Identifier')).equal('extester.extester-test'); }); + (VSBrowser.instance.version >= '1.96.0' ? it : it.skip)('getVersion', async function () { + expect(await extensionEditorDetails.getVersion()).equal('0.1.0'); + }); + // Blocked by https://github.com/redhat-developer/vscode-extension-tester/issues/1492 it.skip('getReadme', async function () {}); }); diff --git a/tests/test-project/src/test/editor/textEditor.test.ts b/tests/test-project/src/test/editor/textEditor.test.ts index 91312a82c..e20d6ee0d 100644 --- a/tests/test-project/src/test/editor/textEditor.test.ts +++ b/tests/test-project/src/test/editor/textEditor.test.ts @@ -65,12 +65,12 @@ describe('ContentAssist', async function () { beforeEach(async () => { this.timeout(8000); assist = (await editor.toggleContentAssist(true)) as ContentAssist; - await new Promise((res) => setTimeout(res, 2000)); + await new Promise((res) => setTimeout(res, 2500)); }); afterEach(async function () { await editor.toggleContentAssist(false); - await new Promise((res) => setTimeout(res, 1000)); + await new Promise((res) => setTimeout(res, 1500)); }); after(async function () { @@ -93,7 +93,7 @@ describe('ContentAssist', async function () { }).timeout(15000); it('hasItem finds items beyond visible range', async function () { - const exists = await assist.hasItem('CSSRule'); + const exists = await assist.hasItem('Error'); expect(exists).is.true; }).timeout(15000); });