diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 8c37053005..0660d13383 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -29,6 +29,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Fixed an issue where a recalled PDS is expandable after it is migrated through Zowe Explorer. [#3294](https://github.com/zowe/zowe-explorer-vscode/issues/3294) - Fixed an issue where data set nodes did not update if migrated or recalled outside of Zowe Explorer. [#3294](https://github.com/zowe/zowe-explorer-vscode/issues/3294) - Fixed an issue where listing data sets resulted in an error after opening a data set with an encoding. [#3347](https://github.com/zowe/zowe-explorer-vscode/issues/3347) +- Fixed an issue where binary USS files were not fetched using the "Pull from Mainframe" context menu option. [#3355](https://github.com/zowe/zowe-explorer-vscode/issues/3355) ## `3.0.3` diff --git a/packages/zowe-explorer/__tests__/__mocks__/vscode.ts b/packages/zowe-explorer/__tests__/__mocks__/vscode.ts index be4fcc7a8e..2f1501a2dc 100644 --- a/packages/zowe-explorer/__tests__/__mocks__/vscode.ts +++ b/packages/zowe-explorer/__tests__/__mocks__/vscode.ts @@ -842,6 +842,10 @@ export class Disposable { * @param callOnDispose Function that disposes something. */ constructor() {} + /** + * Dispose this object. + */ + public dispose(): any {} } export function RelativePattern(base: string, pattern: string) { diff --git a/packages/zowe-explorer/__tests__/__unit__/trees/uss/USSInit.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/trees/uss/USSInit.unit.test.ts index ef2045d76b..b7819c3882 100644 --- a/packages/zowe-explorer/__tests__/__unit__/trees/uss/USSInit.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/trees/uss/USSInit.unit.test.ts @@ -16,6 +16,7 @@ import { SharedContext } from "../../../../src/trees/shared/SharedContext"; import { USSInit } from "../../../../src/trees/uss/USSInit"; import { SharedActions } from "../../../../src/trees/shared/SharedActions"; import { SharedInit } from "../../../../src/trees/shared/SharedInit"; +import { Gui } from "@zowe/zowe-explorer-api"; describe("Test src/uss/extension", () => { describe("initUSSProvider", () => { @@ -26,6 +27,7 @@ describe("Test src/uss/extension", () => { context: { subscriptions: new Array() }, value: { test: "uss", refreshUSS: jest.fn(), openUSS: jest.fn(), deleteUSSNode: jest.fn(), getUSSDocumentFilePath: jest.fn() }, _: { _: "_" }, + statusMsg: { dispose: jest.fn() }, }; const ussFileProvider: { [key: string]: jest.Mock } = { createZoweSession: jest.fn(), @@ -52,6 +54,8 @@ describe("Test src/uss/extension", () => { mock: [ { spy: jest.spyOn(SharedContext, "isDocument"), arg: [test.value], ret: true }, { spy: jest.spyOn(SharedContext, "isUssDirectory"), arg: [test.value], ret: false }, + { spy: jest.spyOn(Gui, "setStatusBarMessage"), arg: ["$(sync~spin) Pulling from Mainframe..."], ret: test.statusMsg }, + { spy: jest.spyOn(test.statusMsg, "dispose"), arg: [] }, ], }, { diff --git a/packages/zowe-explorer/src/trees/uss/USSInit.ts b/packages/zowe-explorer/src/trees/uss/USSInit.ts index ac38f9273e..9eece1ec49 100644 --- a/packages/zowe-explorer/src/trees/uss/USSInit.ts +++ b/packages/zowe-explorer/src/trees/uss/USSInit.ts @@ -55,7 +55,7 @@ export class USSInit { vscode.commands.registerCommand("zowe.uss.refreshUSS", async (node, nodeList) => { const statusMsg = Gui.setStatusBarMessage(`$(sync~spin) ${vscode.l10n.t("Pulling from Mainframe...")}`); let selectedNodes = SharedUtils.getSelectedNodeList(node, nodeList) as IZoweUSSTreeNode[]; - selectedNodes = selectedNodes.filter((x) => SharedContext.isDocument(x)); + selectedNodes = selectedNodes.filter((x) => SharedContext.isDocument(x) || SharedContext.isBinary(node)); for (const item of selectedNodes) { if (SharedContext.isUssDirectory(item)) { // just refresh item to grab latest files @@ -71,8 +71,8 @@ export class USSInit { }); statusMsg2.dispose(); } - statusMsg.dispose(); } + statusMsg.dispose(); }) ); context.subscriptions.push(