Skip to content

Commit 7461eb9

Browse files
authored
feat: add support for VS Code 1.97 (#1753)
1 parent 0fff79b commit 7461eb9

File tree

7 files changed

+24
-21
lines changed

7 files changed

+24
-21
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
version: [min, 1.95.3, max]
20+
version: [min, 1.96.4, max]
2121
uses: ./.github/workflows/template-main.yaml
2222
with:
2323
version: ${{ matrix.version }}

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
<a href="https://www.npmjs.com/package/vscode-extension-tester"><img src="https://img.shields.io/npm/v/vscode-extension-tester?label=extester&color=orange&style=for-the-badge&logo=npm" alt="ExTester"/></a>
77
<a href="https://www.npmjs.com/package/@redhat-developer/locators"><img src="https://img.shields.io/npm/v/@redhat-developer/locators?color=orange&label=locators&style=for-the-badge&logo=npm" alt="ExTester Locators"/></a>
88
<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>
9-
<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>
9+
<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=apache" alt="License"/></a>
1010
</br>
11-
<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>
12-
<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>
13-
<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>
14-
<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>
11+
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge&logo=prettier" alt="Code styled by Prettier"></a>
12+
<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&logoColor=white" alt="Main CI"></a>
13+
<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&logoColor=white" alt="Insider CI"></a>
1514
</p><br/>
1615

1716
<h2 align="center">UI Testing Framework for Visual Studio Code.</h2>
@@ -39,9 +38,9 @@
3938

4039
### Requirements
4140

42-
| NodeJS | Visual Studio Code | Operating System |
43-
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44-
| <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)</td></tr> </table> |
41+
| NodeJS | Visual Studio Code | Operating System |
42+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43+
| <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.95.x</td><td>1.96.x</td><td>1.97.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)</td></tr> </table> |
4544

4645
#### NodeJS Support Policy
4746

docs/ViewSection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ const section = await new SideBarView().getContent().getSection('workspace');
1818
// get the section title
1919
const title = section.getTitle();
2020
// collapse section if possible
21-
await section.collapse();
21+
await section.collapse(timeout: ms);
2222
// expand if possible
23-
await section.expand();
23+
await section.expand(timeout: ms);
2424
// find if section is expanded
2525
const expanded = await section.isExpanded();
2626
```

packages/extester/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
"ui-test"
5353
],
5454
"supportedVersions": {
55-
"vscode-min": "1.94.2",
56-
"vscode-max": "1.96.4",
55+
"vscode-min": "1.95.3",
56+
"vscode-max": "1.97.1",
5757
"nodejs": "20"
5858
},
5959
"dependencies": {

packages/locators/lib/1.37.0.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ const sideBar = {
301301
titleText: 'textContent',
302302
header: By.className('panel-header'),
303303
headerExpanded: 'aria-expanded',
304+
headerCollapseExpandButton: By.className('twisty-container'),
304305
actions: By.className('actions'),
305306
actionConstructor: (label: string) => By.xpath(`.//a[contains(@class, 'action-label') and @role='button' and @title='${label}']`),
306307
button: By.xpath(`.//a[@role='button']`),

packages/page-objects/src/components/sidebar/ViewSection.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,31 @@ export abstract class ViewSection extends AbstractElement {
4646
* Expand the section if collapsed
4747
* @returns Promise resolving when the section is expanded
4848
*/
49-
async expand(): Promise<void> {
49+
async expand(timeout: number = 1_000): Promise<void> {
5050
if (await this.isHeaderHidden()) {
5151
return;
5252
}
5353
if (!(await this.isExpanded())) {
54-
const panel = await this.findElement(ViewSection.locators.ViewSection.header);
55-
await panel.click();
56-
await this.getDriver().wait(waitForAttributeValue(panel, ViewSection.locators.ViewSection.headerExpanded, 'true'), 1000);
54+
const header = await this.findElement(ViewSection.locators.ViewSection.header);
55+
const collapseExpandButton = await header.findElement(ViewSection.locators.ViewSection.headerCollapseExpandButton);
56+
await collapseExpandButton.click();
57+
await this.getDriver().wait(waitForAttributeValue(header, ViewSection.locators.ViewSection.headerExpanded, 'true'), timeout);
5758
}
5859
}
5960

6061
/**
6162
* Collapse the section if expanded
6263
* @returns Promise resolving when the section is collapsed
6364
*/
64-
async collapse(): Promise<void> {
65+
async collapse(timeout: number = 1_000): Promise<void> {
6566
if (await this.isHeaderHidden()) {
6667
return;
6768
}
6869
if (await this.isExpanded()) {
69-
const panel = await this.findElement(ViewSection.locators.ViewSection.header);
70-
await panel.click();
71-
await this.getDriver().wait(waitForAttributeValue(panel, ViewSection.locators.ViewSection.headerExpanded, 'false'), 1000);
70+
const header = await this.findElement(ViewSection.locators.ViewSection.header);
71+
const collapseExpandButton = await header.findElement(ViewSection.locators.ViewSection.headerCollapseExpandButton);
72+
await collapseExpandButton.click();
73+
await this.getDriver().wait(waitForAttributeValue(header, ViewSection.locators.ViewSection.headerExpanded, 'false'), timeout);
7274
}
7375
}
7476

packages/page-objects/src/locators/locators.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ export interface Locators {
302302
titleText: string;
303303
header: By;
304304
headerExpanded: string;
305+
headerCollapseExpandButton: By;
305306
actions: By;
306307
actionConstructor: (label: string) => By;
307308
button: By;

0 commit comments

Comments
 (0)