Skip to content

Commit 292e9fd

Browse files
committed
feat: Add support for VS Code 1.98
test: fix get workbench title test: fix scm view changes locator fix: allow to get auto hidden view action buttons
1 parent caf5e72 commit 292e9fd

File tree

6 files changed

+42
-14
lines changed

6 files changed

+42
-14
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.96.4, max]
20+
version: [min, 1.97.2, max]
2121
uses: ./.github/workflows/template-main.yaml
2222
with:
2323
version: ${{ matrix.version }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
| NodeJS | Visual Studio Code | Operating System |
4242
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
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> |
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.96.x</td><td>1.97.x</td><td>1.98.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> |
4444

4545
#### NodeJS Support Policy
4646

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.95.3",
56-
"vscode-max": "1.97.2",
55+
"vscode-min": "1.96.4",
56+
"vscode-max": "1.98.2",
5757
"nodejs": "20"
5858
},
5959
"dependencies": {

packages/locators/lib/1.98.0.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License", destination); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import { By, LocatorDiff } from '@redhat-developer/page-objects';
19+
20+
export const diff: LocatorDiff = {
21+
locators: {
22+
ScmView: {
23+
sourceControlSection: By.xpath(`.//div[@aria-label='Changes Section']`),
24+
},
25+
ViewSection: {
26+
button: By.xpath(`.//a[contains(@class, 'action-label')]`),
27+
},
28+
},
29+
};

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,11 @@ export abstract class ViewSection extends AbstractElement {
143143
* @returns Promise resolving to array of ViewPanelAction objects
144144
*/
145145
async getActions(): Promise<ViewPanelAction[]> {
146+
await this.getDriver().actions().move({ origin: this }).perform(); // move mouse to bring auto-hided buttons visible
146147
const actions = await this.findElement(ViewSection.locators.ViewSection.actions).findElements(ViewSection.locators.ViewSection.button);
147148
return Promise.all(
148149
actions.map(async (action) => {
149-
const dropdown = await action.getAttribute('aria-haspopup');
150+
const dropdown = (await action.getAttribute('aria-haspopup')) || (await action.getAttribute('aria-expanded'));
150151
if (dropdown) {
151152
return new ViewPanelActionDropdown(action, this);
152153
} else {

tests/test-project/src/test/01_general/resource.test.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,14 @@ describe('Open resource test', function () {
4747

4848
const index = title?.indexOf(prefix) ?? 0;
4949

50-
if (index > 0) {
51-
let openFolderPath = title?.slice(index + prefix.length);
52-
if (openFolderPath) {
53-
if (openFolderPath.startsWith('~/')) {
54-
openFolderPath = path.join(os.homedir(), openFolderPath.slice(2));
55-
}
56-
57-
expect(openFolderPath.split(' ')[0]).equals(process.cwd());
58-
return true;
50+
let openFolderPath = title?.slice(index + prefix.length);
51+
if (openFolderPath) {
52+
if (openFolderPath.startsWith('~/')) {
53+
openFolderPath = path.join(os.homedir(), openFolderPath.slice(2));
5954
}
55+
56+
expect(openFolderPath.split(' ')[0]).equals(process.cwd());
57+
return true;
6058
}
6159

6260
return false;

0 commit comments

Comments
 (0)