Skip to content

Commit

Permalink
Merge pull request #2872 from zowe/fix/open-new-pds-member
Browse files Browse the repository at this point in the history
Fix command not assigned to new member nodes
  • Loading branch information
t1m0thyj authored Apr 24, 2024
2 parents 612d325 + fe05825 commit c47fdf7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.16.0-SNAPSHOT",
"version": "2.15.4",
"command": {
"version": {
"forcePublish": true,
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen

### Bug fixes

- Fixed issue where new PDS member node cannot be re-opened unless you pull from mainframe. [#2857](https://github.com/zowe/zowe-explorer-vscode/issues/2857)
- Fixed issue where expanding a favorited PDS resulted in an error message. [#2873](https://github.com/zowe/zowe-explorer-vscode/issues/2873)

## `2.15.3`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ describe("Dataset Actions Unit Tests - Function createMember", () => {

await dsActions.createMember(parent, blockMocks.testDatasetTree);

expect(parent.children.find((node) => node.label === "TESTMEMBER")).toBeDefined();
const newNode = parent.children.find((node) => node.label === "TESTMEMBER");
expect(newNode).toBeDefined();
expect(newNode?.contextValue).toBe(globals.DS_MEMBER_CONTEXT);
expect(newNode?.command.command).toBe("zowe.ds.ZoweNode.openPS");
expect(mySpy).toBeCalledWith({
placeHolder: "Name of Member",
validateInput: expect.any(Function),
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/src/dataset/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ export async function createMember(parent: api.IZoweDatasetTreeNode, datasetProv
parentNode: parent,
profile: parent.getProfile(),
});
newNode.command = { command: "zowe.ds.ZoweNode.openPS", title: "", arguments: [newNode] };
await newNode.openDs(false, true, datasetProvider);

parent.children.push(newNode);
Expand Down

0 comments on commit c47fdf7

Please sign in to comment.