Skip to content

Commit

Permalink
Merge branch 'main' into Allocate-like-bug
Browse files Browse the repository at this point in the history
Signed-off-by: Billie Simmons <[email protected]>
  • Loading branch information
JillieBeanSim authored Dec 15, 2023
2 parents efad331 + 14452fb commit 331c0fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
### Bug fixes

- Fixed the allocate-like functionality by removing the inclusion of DS item in the filter history. [#2620](https://github.com/zowe/vscode-extension-for-zowe/issues/2620)
- Fixed issue with `Submit JCL` losing focus on JCL being submitted, causing the wrong job submission. [#2616](https://github.com/zowe/vscode-extension-for-zowe/issues/2616)

## `2.13.0`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,21 +477,21 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => {
new ZoweDatasetNode("node", vscode.TreeItemCollapsibleState.None, blockMocks.datasetSessionNode, null as any),
blockMocks.datasetSessionNode,
]);
const commandSpy = jest.spyOn(vscode.commands, "executeCommand");
const showTextDocumentSpy = jest.spyOn(vscode.window, "showTextDocument");
activeTextEditorDocument.mockReturnValue(blockMocks.textDocument);
const submitJclSpy = jest.spyOn(blockMocks.jesApi, "submitJcl");
submitJclSpy.mockClear();
submitJclSpy.mockResolvedValueOnce(blockMocks.iJob);
await dsActions.submitJcl(blockMocks.testDatasetTree, mockFile);

expect(commandSpy).toBeCalled();
expect(showTextDocumentSpy).toBeCalled();
expect(submitJclSpy).toBeCalled();
expect(mocked(Gui.showMessage)).toBeCalled();
expect(mocked(Gui.showMessage).mock.calls.length).toBe(1);
expect(mocked(Gui.showMessage).mock.calls[0][0]).toEqual(
"Job submitted [JOB1234](command:zowe.jobs.setJobSpool?%5B%22sestest%22%2C%22JOB1234%22%5D)"
);
commandSpy.mockClear();
showTextDocumentSpy.mockClear();
});
it("Checking submit of JCL file from VSC explorer tree", async () => {
createGlobalMocks();
Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/dataset/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ export async function submitJcl(datasetProvider: api.IZoweTree<api.IZoweDatasetT
}

if (file) {
await vscode.commands.executeCommand("filesExplorer.openFilePreserveFocus", file);
await vscode.window.showTextDocument(file, { preview: false });
}
const doc = vscode.window.activeTextEditor.document;
ZoweLogger.debug(localize("submitJcl.submitting", "Submitting as JCL in document {0}", doc.fileName));
Expand Down

0 comments on commit 331c0fe

Please sign in to comment.