Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[next] Merge from maintenance with 2.12.1 & 2.12.2 #2588

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions packages/eslint-plugin-zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,9 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documen
- Added placeholder `madge` script to `package.json` for workspace script to succeed.
- Migrated to new package manager PNPM from Yarn.

## `2.11.2`

### New features and enhancements

### Bug fixes
## `2.12.2`

## `2.11.1`

### New features and enhancements

### Bug fixes
## `2.12.1`

## `2.12.0`

Expand Down
4 changes: 4 additions & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t
- Added `madge` script in `package.json` to track circular dependencies. [#2148](https://github.com/zowe/vscode-extension-for-zowe/issues/2148)
- Migrated to new package manager PNPM from Yarn.

## `2.12.2`

## `2.12.1`

## `2.12.0`

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

- Fixed ECONNRESET error when trying to upload or create an empty data set member. [#2350](https://github.com/zowe/vscode-extension-for-zowe/issues/2350)

## `2.12.0`
## `2.12.2`

## `2.12.1`

### Bug fixes

- Fixed ECONNRESET error when trying to upload or create an empty data set member. [#2350](https://github.com/zowe/vscode-extension-for-zowe/issues/2350)
- Fixed issue where temporary files for e-tag comparison were not deleted after use.
- Fixed issue where another connection attempt was made inside `putContents` (in `getContentsTag`) even though a connection was already active.

## `2.12.0`

### Bug fixes

- Fixed ECONNRESET error when trying to upload or create an empty data set member. [#2350](https://github.com/zowe/vscode-extension-for-zowe/issues/2350)

## `2.11.2`

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

### Bug fixes

## `2.12.2`

### Bug fixes

- Fixed issue where etag was not updated for USS files after conflict is detected and user selects Overwrite option.

## `2.12.1`

### Bug fixes

- Fix issue with certain actions displaying profiles that are not registered with the tree that is providing the action. [#2534](https://github.com/zowe/vscode-extension-for-zowe/issues/2534)
- Update when the option to submit local file as JCL will be displayed in context menus. [#2541](https://github.com/zowe/vscode-extension-for-zowe/issues/2541)
- Solved issue with a conflicting keybinding for `Edit History`, changed keybinding to `Ctrl`+`Alt`+`y` for Windows and `⌘ Cmd`+`⌥ Opt`+`y` for macOS. [#2543](https://github.com/zowe/vscode-extension-for-zowe/issues/2543)
- Removed duplicate context menu items displayed in USS view that now exist within the `Manage Profile` option.[#2547](https://github.com/zowe/vscode-extension-for-zowe/issues/2547)
- Fixed issue where sort PDS feature applied the date description to members without a valid date [#2552](https://github.com/zowe/vscode-extension-for-zowe/issues/2552)
- Fixed VSC Compare function, not working with Favorites from Zowe Explorer. [#2549](https://github.com/zowe/vscode-extension-for-zowe/pull/2549)
- Fixed issue where setting `zowe.security.checkForCustomCredentialManagers` appeared in all scopes instead of just the user scope [#2555](https://github.com/zowe/vscode-extension-for-zowe/issues/2555)

## `2.12.0`

### New features and enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ZoweExplorerApiRegister } from "../../../src/ZoweExplorerApiRegister";
import * as globals from "../../../src/globals";
import { ZoweLogger } from "../../../src/utils/LoggerUtils";
import { ZoweLocalStorage } from "../../../src/utils/ZoweLocalStorage";
import { ProfileManagement } from "../../../src/utils/ProfileManagement";

describe("mvsCommandActions unit testing", () => {
const showErrorMessage = jest.fn();
Expand Down Expand Up @@ -64,6 +65,12 @@ describe("mvsCommandActions unit testing", () => {
},
configurable: true,
});
Object.defineProperty(ZoweLogger, "trace", { value: jest.fn(), configurable: true });
Object.defineProperty(ZoweLogger, "error", { value: jest.fn(), configurable: true });
Object.defineProperty(ProfileManagement, "getRegisteredProfileNameList", {
value: jest.fn().mockReturnValue(["firstName", "secondName"]),
configurable: true,
});

createQuickPick.mockReturnValue({
placeholder: 'Choose "Create new..." to define a new profile or select an existing profile to add to the Data Set Explorer',
Expand Down Expand Up @@ -408,25 +415,6 @@ describe("mvsCommandActions unit testing", () => {
expect(showInputBox.mock.calls.length).toBe(0);
});

it("tests the issueMvsCommand function no profiles error", async () => {
Object.defineProperty(profileLoader.Profiles, "getInstance", {
value: jest.fn(() => {
return {
allProfiles: [],
defaultProfile: undefined,
checkCurrentProfile: jest.fn(() => {
return profilesForValidation;
}),
validateProfiles: jest.fn(),
getBaseProfile: jest.fn(),
validProfile: ValidProfileEnum.VALID,
};
}),
});
await mvsActions.issueMvsCommand();
expect(showInformationMessage.mock.calls[0][0]).toEqual("No profiles available");
});

it("tests the issueMvsCommand prompt credentials", async () => {
Object.defineProperty(profileLoader.Profiles, "getInstance", {
value: jest.fn(() => {
Expand Down Expand Up @@ -630,4 +618,27 @@ describe("mvsCommandActions unit testing", () => {
expect(showErrorMessage.mock.calls.length).toBe(1);
expect(showErrorMessage.mock.calls[0][0]).toContain(testError.message);
});

it("tests the issueMvsCommand function no profiles error", async () => {
Object.defineProperty(profileLoader.Profiles, "getInstance", {
value: jest.fn(() => {
return {
allProfiles: [],
defaultProfile: undefined,
checkCurrentProfile: jest.fn(() => {
return profilesForValidation;
}),
validateProfiles: jest.fn(),
getBaseProfile: jest.fn(),
validProfile: ValidProfileEnum.VALID,
};
}),
});
Object.defineProperty(ProfileManagement, "getRegisteredProfileNameList", {
value: jest.fn().mockReturnValue([]),
configurable: true,
});
await mvsActions.issueMvsCommand();
expect(showInformationMessage.mock.calls[0][0]).toEqual("No profiles available");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { imperative } from "@zowe/cli";
import { ZoweExplorerApiRegister } from "../../../src/ZoweExplorerApiRegister";
import { ZoweLogger } from "../../../src/utils/LoggerUtils";
import { ZoweLocalStorage } from "../../../src/utils/ZoweLocalStorage";
import { ProfileManagement } from "../../../src/utils/ProfileManagement";

describe("mvsCommandActions unit testing", () => {
const showErrorMessage = jest.fn();
Expand Down Expand Up @@ -59,6 +60,12 @@ describe("mvsCommandActions unit testing", () => {
},
configurable: true,
});
Object.defineProperty(ZoweLogger, "error", { value: jest.fn(), configurable: true });
Object.defineProperty(ZoweLogger, "trace", { value: jest.fn(), configurable: true });
Object.defineProperty(ProfileManagement, "getRegisteredProfileNameList", {
value: jest.fn().mockReturnValue(["firstName", "secondName"]),
configurable: true,
});

const ProgressLocation = jest.fn().mockImplementation(() => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ import * as utils from "../../../src/utils/ProfilesUtils";
import { imperative } from "@zowe/cli";
import { ZoweDatasetNode } from "../../../src/dataset/ZoweDatasetNode";
import { ZoweExplorerApiRegister } from "../../../src/ZoweExplorerApiRegister";
import * as globals from "../../../src/globals";
import { ZoweLogger } from "../../../src/utils/LoggerUtils";
import { ZoweLocalStorage } from "../../../src/utils/ZoweLocalStorage";
import { ProfileManagement } from "../../../src/utils/ProfileManagement";

describe("TsoCommandHandler unit testing", () => {
const showErrorMessage = jest.fn();
Expand Down Expand Up @@ -112,7 +111,15 @@ describe("TsoCommandHandler unit testing", () => {
failNotFound: false,
};

const testNode = new ZoweDatasetNode("BRTVS99.DDIR", vscode.TreeItemCollapsibleState.Collapsed, null, session, undefined, undefined, profileOne);
const testNode = new ZoweDatasetNode(
"BRTVS99.DDIR",
vscode.TreeItemCollapsibleState.Collapsed,
null as any,
session,
undefined,
undefined,
profileOne
);

Object.defineProperty(vscode.window, "showErrorMessage", { value: showErrorMessage });
Object.defineProperty(vscode.window, "showInputBox", { value: showInputBox });
Expand All @@ -122,6 +129,10 @@ describe("TsoCommandHandler unit testing", () => {
Object.defineProperty(vscode.window, "createOutputChannel", { value: createOutputChannel });
Object.defineProperty(vscode, "ProgressLocation", { value: ProgressLocation });
Object.defineProperty(vscode.window, "withProgress", { value: withProgress });
Object.defineProperty(ProfileManagement, "getRegisteredProfileNameList", {
value: jest.fn().mockReturnValue(["firstName", "secondName"]),
configurable: true,
});

mockLoadNamedProfile.mockReturnValue({ profile: { name: "aProfile", type: "zosmf" } });
getConfiguration.mockReturnValue({
Expand Down Expand Up @@ -410,25 +421,6 @@ describe("TsoCommandHandler unit testing", () => {
expect(showInputBox.mock.calls.length).toBe(0);
});

it("tests the issueTsoCommand function no profiles error", async () => {
Object.defineProperty(profileLoader.Profiles, "getInstance", {
value: jest.fn(() => {
return {
allProfiles: [],
defaultProfile: undefined,
checkCurrentProfile: jest.fn(() => {
return profilesForValidation;
}),
validateProfiles: jest.fn(),
getBaseProfile: jest.fn(),
validProfile: ValidProfileEnum.VALID,
};
}),
});
await tsoActions.issueTsoCommand();
expect(showInformationMessage.mock.calls[0][0]).toEqual("No profiles available");
});

it("tests the issueTsoCommand prompt credentials", async () => {
Object.defineProperty(profileLoader.Profiles, "getInstance", {
value: jest.fn(() => {
Expand Down Expand Up @@ -575,7 +567,7 @@ describe("TsoCommandHandler unit testing", () => {
}),
});

jest.spyOn(tsoActions, "checkCurrentProfile").mockReturnValue(undefined);
jest.spyOn(tsoActions, "checkCurrentProfile").mockReturnValue(undefined as any);

const mockCommandApi = await apiRegisterInstance.getCommandApi(profileOne);
const getCommandApiMock = jest.fn();
Expand All @@ -585,7 +577,7 @@ describe("TsoCommandHandler unit testing", () => {
showInputBox.mockReturnValueOnce("/d iplinfo1");
jest.spyOn(mockCommandApi, "issueTsoCommandWithParms").mockReturnValue("iplinfo1" as any);

await tsoActions.issueTsoCommand(session, null, testNode);
await tsoActions.issueTsoCommand(session, null as any, testNode);

expect(showInputBox.mock.calls.length).toBe(1);
expect(showInformationMessage.mock.calls.length).toBe(0);
Expand Down Expand Up @@ -649,4 +641,27 @@ describe("TsoCommandHandler unit testing", () => {
name: "test1",
});
});

it("tests the issueTsoCommand function no profiles error", async () => {
Object.defineProperty(profileLoader.Profiles, "getInstance", {
value: jest.fn(() => {
return {
allProfiles: [],
defaultProfile: undefined,
checkCurrentProfile: jest.fn(() => {
return profilesForValidation;
}),
validateProfiles: jest.fn(),
getBaseProfile: jest.fn(),
validProfile: ValidProfileEnum.VALID,
};
}),
});
Object.defineProperty(ProfileManagement, "getRegisteredProfileNameList", {
value: jest.fn().mockReturnValue([]),
configurable: true,
});
await tsoActions.issueTsoCommand();
expect(showInformationMessage.mock.calls[0][0]).toEqual("No profiles available");
});
});
Loading
Loading