Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 2.15.0-release
Browse files Browse the repository at this point in the history
  • Loading branch information
JillieBeanSim committed Feb 28, 2024
2 parents 57e9488 + e6e0f79 commit 8cc44f4
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t

- Fix login and logout operations when APIML dynamic tokens are enabled. [#2692](https://github.com/zowe/vscode-extension-for-zowe/pull/2692)
- Fixed issue where `zosmf` profiles did not respect the `protocol` property. [#2703](https://github.com/zowe/vscode-extension-for-zowe/issues/2703)
- Fix to restore accessibility to all profiles when default profile has APIML token authentication. [#2111](https://github.com/zowe/vscode-extension-for-zowe/issues/2111)

## `2.14.1`

Expand Down
7 changes: 4 additions & 3 deletions packages/zowe-explorer-api/src/profiles/ProfilesCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,12 @@ export class ProfilesCache {
}

private shouldRemoveTokenFromProfile(profile: zowe.imperative.IProfileLoaded, baseProfile: zowe.imperative.IProfileLoaded): boolean {
return (baseProfile?.profile?.host &&
baseProfile?.profile?.port &&
return ((baseProfile?.profile?.host || baseProfile?.profile?.port) &&
profile?.profile?.host &&
profile?.profile?.port &&
(baseProfile?.profile.host !== profile?.profile.host || baseProfile?.profile.port !== profile?.profile.port) &&
(baseProfile?.profile.host !== profile?.profile.host ||
baseProfile?.profile.port !== profile?.profile.port ||
(profile?.profile.user && profile?.profile.password)) &&
profile?.profile.tokenType?.startsWith(zowe.imperative.SessConstants.TOKEN_TYPE_APIML)) as boolean;
}

Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen

- Adjusted order of 'Manage Profile' and 'Edit History' in the jobs tree's context menu to match the other trees. [#2670](https://github.com/zowe/vscode-extension-for-zowe/issues/2670)
- Fixed issue where spools with duplicate DD names would overwrite each other causing less spools in job output view [#2315](https://github.com/zowe/vscode-extension-for-zowe/issues/2315)
- To fix Strange behaviour with the Job label in Job Favorites [#2632](https://github.com/zowe/vscode-extension-for-zowe/issues/2632)

## `2.14.1`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,34 @@ describe("ZosJobsProvider unit tests - Function initializeFavChildNodeForProfile

expect(favChildNodeForProfile).toEqual(node);
});
it("To check job label under favorited is correct", async () => {
await createGlobalMocks();
const blockMocks = createBlockMocks();
const testTree = new ZosJobsProvider();

const favProfileNode = new ZoweJobNode({
label: "testProfile",
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
parentNode: blockMocks.jobFavoritesNode,
});
favProfileNode.contextValue = globals.FAV_PROFILE_CONTEXT;
const node = new ZoweJobNode({
label: "testJob(JOB123)",
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
parentNode: favProfileNode,
job: new MockJobDetail("testJob(JOB123)"),
});
node.contextValue = globals.JOBS_JOB_CONTEXT + globals.FAV_SUFFIX;
node.command = { command: "zowe.zosJobsSelectjob", title: "", arguments: [node] };
const targetIcon = getIconByNode(node);
if (targetIcon) {
node.iconPath = targetIcon.path;
}

const favChildNodeForProfile = await testTree.initializeFavChildNodeForProfile("testJob(JOB123)", globals.JOBS_JOB_CONTEXT, favProfileNode);

expect(favChildNodeForProfile.label).toEqual("testJob(JOB123)");
});
});

describe("ZosJobsProvider unit tests - Function loadProfilesForFavorites", () => {
Expand Down
5 changes: 4 additions & 1 deletion packages/zowe-explorer/src/job/ZoweJobNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export class ZoweJobNode extends ZoweTreeNode implements IZoweJobTreeNode {
for (let i = 0; i < labelOpts.length; i++) {
const opt = labelOpts[i];
const [key, val] = opt.split(":");
finalLabel += `${key}: ${val}`;
finalLabel += `${key}`;
if (val !== undefined) {
finalLabel += `: ${val}`;
}
if (i != labelOpts.length - 1) {
finalLabel += " | ";
}
Expand Down
24 changes: 20 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4960,13 +4960,14 @@ error-ex@^1.2.0, error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"

es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
version "0.10.61"
resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz"
integrity sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.62, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
version "0.10.63"
resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz#9c222a63b6a332ac80b1e373b426af723b895bd6"
integrity sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ==
dependencies:
es6-iterator "^2.0.3"
es6-symbol "^3.1.3"
esniff "^2.0.1"
next-tick "^1.1.0"

es6-iterator@^2.0.1, es6-iterator@^2.0.3:
Expand Down Expand Up @@ -5212,6 +5213,16 @@ eslint@^8.34.0:
strip-json-comments "^3.1.0"
text-table "^0.2.0"

esniff@^2.0.1:
version "2.0.1"
resolved "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308"
integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==
dependencies:
d "^1.0.1"
es5-ext "^0.10.62"
event-emitter "^0.3.5"
type "^2.7.2"

espree@^7.3.0, espree@^7.3.1:
version "7.3.1"
resolved "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz"
Expand Down Expand Up @@ -11243,6 +11254,11 @@ type@^2.5.0:
resolved "https://registry.npmjs.org/type/-/type-2.6.0.tgz"
integrity sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==

type@^2.7.2:
version "2.7.2"
resolved "https://registry.npmjs.org/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0"
integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==

typed-rest-client@^1.8.4:
version "1.8.6"
resolved "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.6.tgz"
Expand Down

0 comments on commit 8cc44f4

Please sign in to comment.