Skip to content

Commit

Permalink
Merge branch 'main' into feat/keytar-rs
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Aug 7, 2023
2 parents 8f93581 + 776b987 commit d8ff6aa
Show file tree
Hide file tree
Showing 23 changed files with 772 additions and 313 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Join our [Slack channel](https://slack.openmainframeproject.org/) to connect wit
Client-side prerequisites for development:

- Install [Node.js](https://nodejs.org/en/download/) v14.0 or later.
- Install [Yarn](https://yarnpkg.com/getting-started/install).
- Install [Yarn](https://classic.yarnpkg.com) Classic.

Host-side prerequisites for connection:

Expand Down
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
"vscode-test": "^1.4.0",
"yarn": "1.22.19"
},
"resolutions": {
"**/json5": "^2.2.2",
"**/optionator": "^0.9.3",
"**/semver": "^7.5.2"
},
"scripts": {
"clean": "yarn workspaces run clean",
"fresh-clone": "yarn workspaces run fresh-clone && rimraf node_modules",
Expand Down
6 changes: 6 additions & 0 deletions packages/eslint-plugin-zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documen

### Bug fixes

## `2.9.2`

### New features and enhancements

### Bug fixes

## `2.9.1`

### New features and enhancements
Expand Down
6 changes: 6 additions & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t

### Bug fixes

## `2.9.2`

### New features and enhancements

### Bug fixes

## `2.9.1`

### New features and enhancements
Expand Down
6 changes: 6 additions & 0 deletions packages/zowe-explorer-ftp-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum

### Bug fixes

## `2.9.2`

### New features and enhancements

### Bug fixes

## `2.9.1`

### Bug fixes
Expand Down
10 changes: 10 additions & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
### Bug fixes

- Fix the USS refresh icon (replacing "download" with "refresh")
- Fix error for Theia check when token authentication returns 401.

## `2.9.2`

### Bug fixes

- Added jobs not found message when no results are returned from filter [#2362](https://github.com/zowe/vscode-extension-for-zowe/issues/2362)
- Fixed loop when user selects Cancel on the Check Credentials message. [#2262](https://github.com/zowe/vscode-extension-for-zowe/issues/2262)
- Fixed issue where job session nodes were not adding new job nodes when refreshed. [#2370](https://github.com/zowe/vscode-extension-for-zowe/issues/2370)
- Fixed error when listing data set members that include control characters in the name.

## `2.9.1`

Expand Down
4 changes: 4 additions & 0 deletions packages/zowe-explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
[![codecov](https://codecov.io/gh/zowe/vscode-extension-for-zowe/branch/main/graph/badge.svg)](https://codecov.io/gh/zowe/vscode-extension-for-zowe)
[![slack](https://img.shields.io/badge/chat-on%20Slack-blue)](https://slack.openmainframeproject.org/)

> ## With the removal of keytar shim from VS Code we will be replacing `node-keytar` with `@zowe/secrets-for-zowe-sdk` in our v2.10.0 release to avoid user interruptions
>
> ## v3 Pre-release coming soon with the removal of v1 profile support. Extenders, keep an eye on [changes affecting extenders](https://github.com/zowe/vscode-extension-for-zowe/wiki/Changes-Affecting-Extenders) for the full list of changes
## Introduction

[Zowe Explorer](https://github.com/zowe/community#zowe-explorer) is a sub-project of Zowe, focusing on modernizing mainframe experience. [Zowe](https://www.zowe.org/) is a project hosted by the [Open Mainframe Project](https://www.openmainframeproject.org/), a [Linux Foundation](https://www.linuxfoundation.org/) project.
Expand Down
69 changes: 41 additions & 28 deletions packages/zowe-explorer/__tests__/__unit__/ZoweNode.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,33 +183,6 @@ describe("Unit Tests (Jest)", () => {
expect(subChildren).toEqual(sampleChildren);
});

/*************************************************************************************************************
* Checks that the catch block is reached when an error is thrown
*************************************************************************************************************/
it(
"Checks that when bright.List.dataSet/allMembers() causes an error on the zowe call, " + "it throws an error and the catch block is reached",
async () => {
Object.defineProperty(Profiles, "getInstance", {
value: jest.fn(() => {
return {
loadNamedProfile: jest.fn().mockReturnValue(profileOne),
};
}),
});
showErrorMessage.mockReset();
// Creating a rootNode
const rootNode = new ZoweDatasetNode("root", vscode.TreeItemCollapsibleState.Collapsed, null, session, undefined, undefined, profileOne);
rootNode.contextValue = globals.DS_SESSION_CONTEXT;
rootNode.pattern = "THROW ERROR";
rootNode.dirty = true;
await rootNode.getChildren();
expect(showErrorMessage.mock.calls.length).toEqual(1);
expect(showErrorMessage.mock.calls[0][0]).toEqual(
"Retrieving response from zowe.List Error: Throwing an error to check error handling for unit tests!"
);
}
);

/*************************************************************************************************************
* Checks that returning an unsuccessful response results in an error being thrown and caught
*************************************************************************************************************/
Expand Down Expand Up @@ -372,10 +345,50 @@ describe("Unit Tests (Jest)", () => {
expect((await pds.getChildren())[0].label).toEqual("BRTVS99");
});

/*************************************************************************************************************
* Multiple member names returned
*************************************************************************************************************/
it("Testing what happens when response has multiple members", async () => {
Object.defineProperty(Profiles, "getInstance", {
value: jest.fn(() => {
return {
loadNamedProfile: jest.fn().mockReturnValue(profileOne),
};
}),
});
// Creating a rootNode
const pds = new ZoweDatasetNode(
"[root]: something",
vscode.TreeItemCollapsibleState.Collapsed,
{ getSessionNode: jest.fn() } as unknown as ZoweDatasetNode,
session,
undefined,
undefined,
profileOne
);
pds.dirty = true;
pds.contextValue = globals.DS_PDS_CONTEXT;
const allMembers = jest.fn();
allMembers.mockImplementationOnce(() => {
return {
success: true,
apiResponse: {
items: [{ member: "BADMEM\ufffd" }, { member: "GOODMEM1" }],
},
};
});
Object.defineProperty(List, "allMembers", { value: allMembers });
const pdsChildren = await pds.getChildren();
expect(pdsChildren[0].label).toEqual("BADMEM\ufffd");
expect(pdsChildren[0].contextValue).toEqual(globals.DS_FILE_ERROR_CONTEXT);
expect(pdsChildren[1].label).toEqual("GOODMEM1");
expect(pdsChildren[1].contextValue).toEqual(globals.DS_MEMBER_CONTEXT);
});

/*************************************************************************************************************
* No values returned
*************************************************************************************************************/
it("Testing what happens when response is zero", async () => {
it("Testing what happens when response has no members", async () => {
Object.defineProperty(Profiles, "getInstance", {
value: jest.fn(() => {
return {
Expand Down
Loading

0 comments on commit d8ff6aa

Please sign in to comment.