Skip to content

Commit

Permalink
Merge branch 'main' into fix/add-ds-extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
  • Loading branch information
traeok committed Sep 23, 2024
2 parents ef996c8 + d464418 commit 8b32e87
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- The "Zowe Resources" panel is now hidden by default until Zowe Explorer reveals it to display a table or other data. [#3113](https://github.com/zowe/zowe-explorer-vscode/issues/3113)
- Fixed behavior of logout action when token is defined in both base profile and parent profile. [#3076](https://github.com/zowe/zowe-explorer-vscode/issues/3076)
- Fixed bug that displayed obsolete profiles in the Zowe Explorer tree views after the associated team configuration file was deleted. [#3124](https://github.com/zowe/zowe-explorer-vscode/issues/3124)
- Fix issue with extender profiles not being included in fresh team configuration file. [#3122](https://github.com/zowe/zowe-explorer-vscode/issues/3122)
- Fixed issue where file extensions were removed from data sets, causing language detection to sometimes fail for Zowe Explorer extenders. [#3121](https://github.com/zowe/zowe-explorer-vscode/issues/3121)
- Fixed an issue where copying and pasting a file/folder in the USS tree would fail abruptly, displaying an error. [#3128](https://github.com/zowe/zowe-explorer-vscode/issues/3128)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,27 @@ describe("Profiles Unit Tests - Function createZoweSchema", () => {
spyLayers.mockClear();
spyZoweConfigError.mockClear();
});

it("Test that createZoweSchema will include the extender profiles on config creation", async () => {
const globalMocks = createGlobalMocks();
const blockMocks = createBlockMocks(globalMocks);
const spyQuickPick = jest.spyOn(Gui, "showQuickPick");
globalMocks.mockShowQuickPick.mockResolvedValueOnce("Global: in the Zowe home directory");
const spyLayers = jest.spyOn(Profiles.getInstance() as any, "checkExistingConfig").mockReturnValueOnce("zowe");
jest.spyOn(Profiles.getInstance(), "getConfigArray").mockReturnValue([
{
type: "extenderprofiletype",
schema: undefined as any,
},
]);
const spyConfigBuilder = jest.spyOn(imperative.ConfigBuilder, "build");
await Profiles.getInstance().createZoweSchema(blockMocks.testDatasetTree);
const expected = [{ type: "zosmf" }, { type: "tso" }, undefined, { type: "extenderprofiletype", schema: undefined }, undefined];

expect(spyConfigBuilder.mock.calls[0][0].profiles).toEqual(expected);
spyQuickPick.mockClear();
spyLayers.mockClear();
});
});

describe("Profiles Unit Tests - function getProfileIcon", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/zowe-explorer/src/configuration/Profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ export class Profiles extends ProfilesCache {

// Build new config and merge with existing layer
const impConfig: Partial<imperative.IImperativeConfig> = {
profiles: [...this.getCoreProfileTypes(), ProfileConstants.BaseProfile],
profiles: [...this.getCoreProfileTypes(), ...this.getConfigArray(), ProfileConstants.BaseProfile],
baseProfile: ProfileConstants.BaseProfile,
};
const newConfig: imperative.IConfig = await imperative.ConfigBuilder.build(impConfig, global, opts);
Expand Down

0 comments on commit 8b32e87

Please sign in to comment.