Skip to content

Commit

Permalink
feat: bump vscode-max from 1.95.3 to 1.96.2 (#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
djelinek authored Jan 7, 2025
1 parent ee33588 commit 7e53545
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="https://www.npmjs.com/package/@redhat-developer/page-objects"><img src="https://img.shields.io/npm/v/@redhat-developer/page-objects?color=orange&label=page%20objects&style=for-the-badge&logo=npm" alt="ExTester Page Objects"/></a>
<a href="https://github.com/redhat-developer/vscode-extension-tester/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202-yellow.svg?style=for-the-badge&logo=appveyor" alt="License"/></a>
</br>
<a href="https://code.visualstudio.com"><img src="https://img.shields.io/badge/VS_Code-1.95.x-blue?style=for-the-badge&logo=visualstudiocode" alt="Maximal supported version of VS Code"></a>
<a href="https://code.visualstudio.com"><img src="https://img.shields.io/badge/VS_Code-1.96.x-blue?style=for-the-badge&logo=visualstudiocode" alt="Maximal supported version of VS Code"></a>
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge" alt="Code styled by Prettier"></a>
<a href="https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/main.yml"><img src="https://img.shields.io/github/actions/workflow/status/redhat-developer/vscode-extension-tester/main.yml?label=Main%20CI&style=for-the-badge&logo=githubactions" alt="Main CI"></a>
<a href="https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/insiders.yml"><img src="https://img.shields.io/github/actions/workflow/status/redhat-developer/vscode-extension-tester/insiders.yml?branch=main&label=Insider%20CI&style=for-the-badge&logo=githubactions" alt="Insider CI"></a>
Expand Down Expand Up @@ -41,7 +41,7 @@

| NodeJS | Visual Studio Code | Operating System |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <table style="text-align:center;"> <tr><th>20.x.x</th><th>LTS</th><th>Latest</th></tr><tr><td>✅</td><td>✅❓</td><td>✅❓</td></tr><tr><td colspan="3">❓ Best-effort</td></tr> </table> | <table style="text-align:center;"> <tr><th>min</th><th>-</th><th>max</th></tr><tr><td>1.93.x</td><td>1.94.x</td><td>1.95.x</td></tr> </table> | <table style="text-align:center;"> <tr><th>Linux</th><th>Windows</th><th>macOS</th></tr><tr><td>✅</td><td>✅</td><td>✅ ⚠️</td></tr><tr><td colspan="3">⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)</td></tr> </table> |
| <table style="text-align:center;"> <tr><th>20.x.x</th><th>LTS</th><th>Latest</th></tr><tr><td>✅</td><td>✅❓</td><td>✅❓</td></tr><tr><td colspan="3">❓ Best-effort</td></tr> </table> | <table style="text-align:center;"> <tr><th>min</th><th>-</th><th>max</th></tr><tr><td>1.94.x</td><td>1.95.x</td><td>1.96.x</td></tr> </table> | <table style="text-align:center;"> <tr><th>Linux</th><th>Windows</th><th>macOS</th></tr><tr><td>✅</td><td>✅</td><td>✅ ⚠️</td></tr><tr><td colspan="3">⚠️ [Known Issues](KNOWN_ISSUES.md#macos-known-limitations-of-native-objects)</td></tr> </table> |

#### NodeJS Support Policy

Expand Down
2 changes: 2 additions & 0 deletions docs/ExtensionEditorDetailsSections.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/ExtensionEditorView.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions packages/extester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -89,4 +89,13 @@ export class ExtensionEditorDetailsSection extends ExtensionEditorView {
async getReadme(): Promise<WebView> {
throw Error('Not implemented yet.');
}

/**
* Get version of extension.
* @returns Promise resolving version of extension.
*/
async getVersion(): Promise<string> {
const moreInfo = await this.getMoreInfo();
return moreInfo['Version'];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
const name = await this.findElement(ExtensionEditorView.locators.ExtensionEditorView.version);
Expand Down
3 changes: 2 additions & 1 deletion tests/test-project/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"window.title": "${activeEditorShort}${separator}folder: ${rootPath}"
"window.title": "${activeEditorShort}${separator}folder: ${rootPath}",
"window.zoomLevel": -1
}
23 changes: 20 additions & 3 deletions tests/test-project/src/test/editor/extensionEditor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 () {
Expand All @@ -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();
Expand All @@ -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');
});

Expand Down Expand Up @@ -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 () {});
});
Expand Down
6 changes: 3 additions & 3 deletions tests/test-project/src/test/editor/textEditor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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);
});
Expand Down

0 comments on commit 7e53545

Please sign in to comment.