From 3db7e4d3d08a7b4294c12a44596ed9671fd6ef11 Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Mon, 11 Sep 2023 09:21:21 -0400 Subject: [PATCH 1/3] add check for selection in quickpick Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- .../__tests__/__unit__/job/actions.unit.test.ts | 8 ++++---- packages/zowe-explorer/src/dataset/actions.ts | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts index c91bcb9607..48ffeaeb74 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts @@ -513,25 +513,25 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { ); }); - it("Checking failed attempt to submit of active text editor content as JCL", async () => { + it("Checking failed attempt to submit of active text editor content as JCL without profile chosen from quickpick", async () => { createGlobalMocks(); const blockMocks = createBlockMocks(); mocked(zowe.ZosmfSession.createSessCfgFromArgs).mockReturnValue(blockMocks.session.ISession); mocked(Profiles.getInstance).mockReturnValue(blockMocks.profileInstance); - mocked(vscode.window.showQuickPick).mockResolvedValueOnce(null); // Here we imitate the case when no profile was selected + mocked(vscode.window.showQuickPick).mockResolvedValueOnce(undefined); // Here we imitate the case when no profile was selected blockMocks.testDatasetTree.getChildren.mockResolvedValueOnce([ new ZoweDatasetNode("node", vscode.TreeItemCollapsibleState.None, blockMocks.datasetSessionNode, null), blockMocks.datasetSessionNode, ]); activeTextEditorDocument.mockReturnValue(blockMocks.textDocument); + const messageSpy = jest.spyOn(Gui, "infoMessage"); const submitJclSpy = jest.spyOn(blockMocks.jesApi, "submitJcl"); submitJclSpy.mockClear(); await dsActions.submitJcl(blockMocks.testDatasetTree); expect(submitJclSpy).not.toBeCalled(); - expect(mocked(ZoweLogger.error)).toBeCalled(); - expect(mocked(ZoweLogger.error).mock.calls[0][0]).toEqual("Session for submitting JCL was null or undefined!"); + expect(messageSpy).toBeCalledWith("Operation Cancelled"); }); it("Checking API error on submit of active text editor content as JCL", async () => { diff --git a/packages/zowe-explorer/src/dataset/actions.ts b/packages/zowe-explorer/src/dataset/actions.ts index d27f5ae6c8..3b21508f32 100644 --- a/packages/zowe-explorer/src/dataset/actions.ts +++ b/packages/zowe-explorer/src/dataset/actions.ts @@ -961,6 +961,10 @@ export async function submitJcl(datasetProvider: api.IZoweTree Date: Mon, 11 Sep 2023 09:30:31 -0400 Subject: [PATCH 2/3] add CHANGELOG Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- packages/zowe-explorer/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 0e21e50642..82a537b452 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### Bug fixes - Remove the 'Show Attributes' context menu action for migrated datasets. [#2033](https://github.com/zowe/vscode-extension-for-zowe/issues/2033) +- Fixed submitting local JCL using command pallet option Zowe Explorer: Submit JCL by adding a check for chosen profile returned to continue the action. [#1625](https://github.com/zowe/vscode-extension-for-zowe/issues/1625) ## `2.10.0` From 32f0aec598e468f3fb839a52040c8de41b5b38b0 Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Mon, 11 Sep 2023 09:31:52 -0400 Subject: [PATCH 3/3] add ticks around command in CHANGELOG Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- packages/zowe-explorer/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 82a537b452..04dc2ee3e3 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -11,7 +11,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### Bug fixes - Remove the 'Show Attributes' context menu action for migrated datasets. [#2033](https://github.com/zowe/vscode-extension-for-zowe/issues/2033) -- Fixed submitting local JCL using command pallet option Zowe Explorer: Submit JCL by adding a check for chosen profile returned to continue the action. [#1625](https://github.com/zowe/vscode-extension-for-zowe/issues/1625) +- Fixed submitting local JCL using command pallet option `Zowe Explorer: Submit JCL` by adding a check for chosen profile returned to continue the action. [#1625](https://github.com/zowe/vscode-extension-for-zowe/issues/1625) ## `2.10.0`