From ba85798b21ff0cd72a90a3aade519cb47f5cc6ce Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:54:07 +0000 Subject: [PATCH 1/9] fix: Login and Logout with APIML Dynamic Token support Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- .../zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts b/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts index d5193f22b8..9b8a893a26 100644 --- a/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts +++ b/packages/zowe-explorer-api/src/vscode/ZoweVsCodeExtension.ts @@ -175,7 +175,8 @@ export class ZoweVsCodeExtension { if (typeof serviceProfile === "string") { serviceProfile = await ZoweVsCodeExtension.getServiceProfileForAuthPurposes(cache, serviceProfile); } - const tokenType = loginTokenType ?? serviceProfile.profile.tokenType ?? imperative.SessConstants.TOKEN_TYPE_APIML; + const tokenType = + serviceProfile.profile.tokenType ?? baseProfile.profile.tokenType ?? loginTokenType ?? imperative.SessConstants.TOKEN_TYPE_APIML; const updSession = new imperative.Session({ hostname: serviceProfile.profile.host, port: serviceProfile.profile.port, @@ -195,7 +196,7 @@ export class ZoweVsCodeExtension { const loginToken = await (zeRegister?.getCommonApi(serviceProfile).login ?? Login.apimlLogin)(updSession); const updBaseProfile: imperative.IProfile = { - tokenType, + tokenType: updSession.ISession.tokenType ?? tokenType, tokenValue: loginToken, }; @@ -248,8 +249,9 @@ export class ZoweVsCodeExtension { serviceProfile = await ZoweVsCodeExtension.getServiceProfileForAuthPurposes(cache, serviceProfile); } const tokenType = - zeRegister?.getCommonApi(serviceProfile).getTokenTypeName() ?? serviceProfile.profile.tokenType ?? + baseProfile.profile.tokenType ?? + zeRegister?.getCommonApi(serviceProfile).getTokenTypeName() ?? imperative.SessConstants.TOKEN_TYPE_APIML; const updSession = new imperative.Session({ hostname: serviceProfile.profile.host, From 55bfa5302f0459c63e9ff5d6cbbea1710ad45607 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:54:44 +0000 Subject: [PATCH 2/9] update tests and changelog Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- packages/zowe-explorer-api/CHANGELOG.md | 4 ++++ .../__unit__/vscode/ZoweVsCodeExtension.unit.test.ts | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 91454e811b..de2af5c2ff 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -12,6 +12,10 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t - `IZoweUSSTreeNode.setBinary()` -> `IZoweUSSTreeNode.setEncoding()` - **Breaking:** Removed `ZoweTreeNode.binary`, `ZoweTreeNode.binaryFiles`, and `ZoweTreeNode.shortLabel`. These properties are not applicable for all tree nodes and should be defined in subclasses of `ZoweTreeNode` if necessary. +### Bug fixes + +- Fix login and logout operations when APIML dynamic tokens are enabled. [#2692](https://github.com/zowe/vscode-extension-for-zowe/pull/2692) + ## `3.0.0-next.202402071248` ### New features and enhancements diff --git a/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts index 0c9d67abdf..5b91095e7f 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/vscode/ZoweVsCodeExtension.unit.test.ts @@ -314,10 +314,18 @@ describe("ZoweVsCodeExtension", () => { delete testSession.ISession.password; testSession.ISession.hostname = "service"; testSession.ISession.base64EncodedAuth = "dXNlcjpwYXNz"; + testSession.ISession.tokenType = tempBaseProfile.profile.tokenType; expect(loginSpy).toHaveBeenCalledWith(testSession); expect(testSpy).toHaveBeenCalledWith(testCache, "service"); - expect(testCache.updateBaseProfileFileLogin).toHaveBeenCalledWith(newServiceProfile, updProfile, true); + expect(testCache.updateBaseProfileFileLogin).toHaveBeenCalledWith( + newServiceProfile, + { + tokenType: tempBaseProfile.profile.tokenType, + tokenValue: "tokenValue", + }, + true + ); }); it("should logout using the service profile given a simple profile name", async () => { testCache.fetchBaseProfile.mockResolvedValue(baseProfile); From 74a15fa8f1b7bb58932ef13607e2b3f80ced95ab Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:31:55 +0000 Subject: [PATCH 3/9] update FTP plig-in version :yum: port #2533 Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- packages/zowe-explorer-ftp-extension/package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/zowe-explorer-ftp-extension/package.json b/packages/zowe-explorer-ftp-extension/package.json index 763a02a2c1..e112bc423d 100644 --- a/packages/zowe-explorer-ftp-extension/package.json +++ b/packages/zowe-explorer-ftp-extension/package.json @@ -48,7 +48,7 @@ "vscode": "^1.79.0" }, "dependencies": { - "@zowe/zos-ftp-for-zowe-cli": "2.1.2", + "@zowe/zos-ftp-for-zowe-cli": "2.1.8", "@zowe/zowe-explorer-api": "3.0.0-next.202402071248", "tmp": "0.2.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6214439f81..f7141ac94c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -268,8 +268,8 @@ importers: packages/zowe-explorer-ftp-extension: dependencies: "@zowe/zos-ftp-for-zowe-cli": - specifier: 2.1.2 - version: 2.1.2(@zowe/imperative@5.19.0) + specifier: 2.1.8 + version: 2.1.8(@zowe/imperative@5.19.0) "@zowe/zowe-explorer-api": specifier: 3.0.0-next.202402071248 version: link:../zowe-explorer-api @@ -2687,13 +2687,13 @@ packages: minimatch: 5.1.6 dev: false - /@zowe/zos-ftp-for-zowe-cli@2.1.2(@zowe/imperative@5.19.0): - resolution: { integrity: sha512-YWojS16Vr79tNV+3Rm9mfNwTYISCDvQ3NUSiQ3WajNrJ4GEmEnsB1RRSpUwb7CSmpbVlbs5n2JUY3jL8u30tlg== } + /@zowe/zos-ftp-for-zowe-cli@2.1.8(@zowe/imperative@5.19.0): + resolution: { integrity: sha512-TDLiECMYQsmD5R7ndUnt2cft49Xd8zkXdkZenhRpowTvOTsrZYYj85JfIcwBglrjGER8APAfWH0+lSfTqCkOhw== } peerDependencies: "@zowe/imperative": ^5.0.0 dependencies: "@zowe/imperative": 5.19.0 - zos-node-accessor: 1.0.14 + zos-node-accessor: 1.0.16 transitivePeerDependencies: - supports-color dev: false @@ -10764,8 +10764,8 @@ packages: engines: { node: ">=10" } dev: true - /zos-node-accessor@1.0.14: - resolution: { integrity: sha512-+DXcOSBcixulEGPXVEn8ktXZqIP/eSzrQLO8daIELcak1zP89z7rdFRhMcKmEXk11PLq2wcoDzzIq3KPSHBLiA== } + /zos-node-accessor@1.0.16: + resolution: { integrity: sha512-7IsneaFw7sryn2ovopz4lr3W57LRXZ3p4tEdnRLSJav3xYY7qkbnfV5nni5kdWusd2rLaArf4omZY1O/LD4lhA== } engines: { node: ">= 0.10.0" } dependencies: debug: 3.1.0 From f5e12972966335980021a79cf30ce42e54fce397 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:55:33 +0000 Subject: [PATCH 4/9] update changelogs Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- packages/zowe-explorer-api/CHANGELOG.md | 2 +- packages/zowe-explorer-ftp-extension/CHANGELOG.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index de2af5c2ff..86c3d0f62d 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in this file. -## Recent Changes +## TBD Release ### New features and enhancements diff --git a/packages/zowe-explorer-ftp-extension/CHANGELOG.md b/packages/zowe-explorer-ftp-extension/CHANGELOG.md index 1e29acbac8..a206a893f6 100644 --- a/packages/zowe-explorer-ftp-extension/CHANGELOG.md +++ b/packages/zowe-explorer-ftp-extension/CHANGELOG.md @@ -1,5 +1,13 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be documented in this file. +## TBD Release + +## New features and enhancements + +## Bug fixes + +- Fix Windows-specific hangs when saving members that contain JCL via the FTP extension. Thanks @tiantn & @std4lqi. [#2533](https://github.com/zowe/vscode-extension-for-zowe/issues/2533) + ## `3.0.0-next.202402071248` ## New features and enhancements From 1b6e071426e204c9e08a5383bafd8d77560c6c6f Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:27:09 -0500 Subject: [PATCH 5/9] run prepublish Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- packages/zowe-explorer/l10n/bundle.l10n.json | 521 ++++++++++++++----- 1 file changed, 393 insertions(+), 128 deletions(-) diff --git a/packages/zowe-explorer/l10n/bundle.l10n.json b/packages/zowe-explorer/l10n/bundle.l10n.json index 9b1abedfd4..9baff74244 100644 --- a/packages/zowe-explorer/l10n/bundle.l10n.json +++ b/packages/zowe-explorer/l10n/bundle.l10n.json @@ -22,7 +22,9 @@ "Zowe Explorer is running in Theia environment.": "Zowe Explorer is running in Theia environment.", "Zowe Explorer's temp folder is located at {0}/Zowe temp folder": { "message": "Zowe Explorer's temp folder is located at {0}", - "comment": ["Zowe temp folder"] + "comment": [ + "Zowe temp folder" + ] }, "Zowe Explorer has activated successfully.": "Zowe Explorer has activated successfully.", "Zowe explorer profiles are being set as unsecured.": "Zowe explorer profiles are being set as unsecured.", @@ -34,23 +36,33 @@ "Internal error: A Zowe Explorer extension client tried to register an invalid Command API.": "Internal error: A Zowe Explorer extension client tried to register an invalid Command API.", "Internal error: Tried to call a non-existing USS API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing USS API in API register: {0}", - "comment": ["Profile type"] + "comment": [ + "Profile type" + ] }, "Internal error: Tried to call a non-existing MVS API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing MVS API in API register: {0}", - "comment": ["Profile type"] + "comment": [ + "Profile type" + ] }, "Internal error: Tried to call a non-existing JES API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing JES API in API register: {0}", - "comment": ["Profile type"] + "comment": [ + "Profile type" + ] }, "Internal error: Tried to call a non-existing Command API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing Command API in API register: {0}", - "comment": ["Profile type"] + "comment": [ + "Profile type" + ] }, "Internal error: Tried to call a non-existing Common API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing Common API in API register: {0}", - "comment": ["Profile type"] + "comment": [ + "Profile type" + ] }, "Operation Cancelled": "Operation Cancelled", "The Team configuration file has been opened in the editor. Editing or removal of profiles will need to be done manually.": "The Team configuration file has been opened in the editor. Editing or removal of profiles will need to be done manually.", @@ -62,7 +74,10 @@ "Profile selection has been cancelled.": "Profile selection has been cancelled.", "The profile {0} has been added to the {1} tree./chosen profiletree type": { "message": "The profile {0} has been added to the {1} tree.", - "comment": ["chosen profile", "tree type"] + "comment": [ + "chosen profile", + "tree type" + ] }, "Profile Type": "Profile Type", "User Name": "User Name", @@ -73,33 +88,49 @@ "Select the profile you want to delete": "Select the profile you want to delete", "Validating {0} Profile./The profile name": { "message": "Validating {0} Profile.", - "comment": ["The profile name"] + "comment": [ + "The profile name" + ] }, "Validating {0} was cancelled./The profile name": { "message": "Validating {0} was cancelled.", - "comment": ["The profile name"] + "comment": [ + "The profile name" + ] }, "Profile validation failed for {0}./The profile name": { "message": "Profile validation failed for {0}.", - "comment": ["The profile name"] + "comment": [ + "The profile name" + ] }, "This profile is using basic authentication and does not support token authentication.": "This profile is using basic authentication and does not support token authentication.", "Error getting supported tokenType value for profile {0}/Service profile name": { "message": "Error getting supported tokenType value for profile {0}", - "comment": ["Service profile name"] + "comment": [ + "Service profile name" + ] }, "Login to authentication service was successful.": "Login to authentication service was successful.", "Unable to log in with {0}. {1}/Service profile nameError message": { "message": "Unable to log in with {0}. {1}", - "comment": ["Service profile name", "Error message"] + "comment": [ + "Service profile name", + "Error message" + ] }, "Logout from authentication service was successful for {0}./Service profile name": { "message": "Logout from authentication service was successful for {0}.", - "comment": ["Service profile name"] + "comment": [ + "Service profile name" + ] }, "Unable to log out with {0}. {1}/Service profile nameError message": { "message": "Unable to log out with {0}. {1}", - "comment": ["Service profile name", "Error message"] + "comment": [ + "Service profile name", + "Error message" + ] }, "Select the location where the config file will be initialized": "Select the location where the config file will be initialized", "Select the location of the config file to edit": "Select the location of the config file to edit", @@ -108,7 +139,9 @@ "Create New": "Create New", "A Team Configuration File already exists in this location\n{0}\nContinuing may alter the existing file, would you like to proceed?/File path": { "message": "A Team Configuration File already exists in this location\n{0}\nContinuing may alter the existing file, would you like to proceed?", - "comment": ["File path"] + "comment": [ + "File path" + ] }, "Refresh": "Refresh", "Delete Selected": "Delete Selected", @@ -120,37 +153,49 @@ "Error encountered when creating temporary folder!": "Error encountered when creating temporary folder!", "Unable to delete temporary folder. {0}/Error message": { "message": "Unable to delete temporary folder. {0}", - "comment": ["Error message"] + "comment": [ + "Error message" + ] }, "Reload Window": "Reload Window", "Settings have been successfully migrated for Zowe Explorer version 2 and above. To apply these settings, please reload your VS Code window.": "Settings have been successfully migrated for Zowe Explorer version 2 and above. To apply these settings, please reload your VS Code window.", "Required parameter 'host' must not be blank.": "Required parameter 'host' must not be blank.", "Invalid Credentials for profile '{0}'. Please ensure the username and password are valid or this may lead to a lock-out./Label": { "message": "Invalid Credentials for profile '{0}'. Please ensure the username and password are valid or this may lead to a lock-out.", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "Your connection is no longer active for profile '{0}'. Please log in to an authentication service to restore the connection./Label": { "message": "Your connection is no longer active for profile '{0}'. Please log in to an authentication service to restore the connection.", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "Log in to Authentication Service": "Log in to Authentication Service", "Update Credentials": "Update Credentials", "Custom credential manager failed to activate": "Custom credential manager failed to activate", "Custom credential manager {0} found, attempting to activate./Credential manager display name": { "message": "Custom credential manager {0} found, attempting to activate.", - "comment": ["Credential manager display name"] + "comment": [ + "Credential manager display name" + ] }, "No custom credential managers found, using the default instead.": "No custom credential managers found, using the default instead.", "Custom credential manager {0} found/Credential manager display name": { "message": "Custom credential manager {0} found", - "comment": ["Credential manager display name"] + "comment": [ + "Credential manager display name" + ] }, "Do you wish to use this credential manager instead?": "Do you wish to use this credential manager instead?", "Yes": "Yes", "Don't ask again": "Don't ask again", "Plugin of name '{0}' was defined for custom credential management on imperative.json file./Credential manager display name": { "message": "Plugin of name '{0}' was defined for custom credential management on imperative.json file.", - "comment": ["Credential manager display name"] + "comment": [ + "Credential manager display name" + ] }, "Please install associated VS Code extension for custom credential manager or revert to default.": "Please install associated VS Code extension for custom credential manager or revert to default.", "Use Default": "Use Default", @@ -163,28 +208,41 @@ "Enter a name for the connection.": "Enter a name for the connection.", "Credentials for {0} were successfully updated/Profile name": { "message": "Credentials for {0} were successfully updated", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Zowe home directory is located at {0}/Zowe directory path": { "message": "Zowe home directory is located at {0}", - "comment": ["Zowe directory path"] + "comment": [ + "Zowe directory path" + ] }, "Reading imperative.json failed. Will try to create file.": "Reading imperative.json failed. Will try to create file.", "Reading imperative.json Credential Manager.\n {0}/File content": { "message": "Reading imperative.json Credential Manager.\n {0}", - "comment": ["File content"] + "comment": [ + "File content" + ] }, "Failed to parse JSON file {0}. Will try to re-create the file./Settings file": { "message": "Failed to parse JSON file {0}. Will try to re-create the file.", - "comment": ["Settings file"] + "comment": [ + "Settings file" + ] }, "Updating imperative.json Credential Manager to {0}.\n{1}/Default credential override settingNew credential override setting": { "message": "Updating imperative.json Credential Manager to {0}.\n{1}", - "comment": ["Default credential override setting", "New credential override setting"] + "comment": [ + "Default credential override setting", + "New credential override setting" + ] }, "Failed to initialize Zowe folder: {0}/Error message": { "message": "Failed to initialize Zowe folder: {0}", - "comment": ["Error message"] + "comment": [ + "Error message" + ] }, "Zowe Profiles initialized successfully.": "Zowe Profiles initialized successfully.", "Zowe Temp folder initialized successfully.": "Zowe Temp folder initialized successfully.", @@ -212,73 +270,97 @@ "Do you wish to apply this for all trees?": "Do you wish to apply this for all trees?", "Profile {0} is using basic authentication. Choose a profile action./Profile name": { "message": "Profile {0} is using basic authentication. Choose a profile action.", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Profile {0} is using token authentication. Choose a profile action./Profile name": { "message": "Profile {0} is using token authentication. Choose a profile action.", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Profile {0} doesn't specify an authentication method. Choose a profile action./Profile name": { "message": "Profile {0} doesn't specify an authentication method. Choose a profile action.", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Error encountered while activating and initializing logger": "Error encountered while activating and initializing logger", "Zowe Explorer": "Zowe Explorer", "Initialized logger for Zowe Explorer": "Initialized logger for Zowe Explorer", "This log file can be found at {0}/Log file location": { "message": "This log file can be found at {0}", - "comment": ["Log file location"] + "comment": [ + "Log file location" + ] }, "Zowe Explorer log level: {0}/Log setting": { "message": "Zowe Explorer log level: {0}", - "comment": ["Log setting"] + "comment": [ + "Log setting" + ] }, "Update": "Update", "Zowe Explorer now has a VS Code logger with a default log level of INFO.\n \nIt looks like the Zowe CLI's ZOWE_APP_LOG_LEVEL={0}.\n \nWould you like Zowe Explorer to update to the the same log level?/CLI setting": { "message": "Zowe Explorer now has a VS Code logger with a default log level of INFO.\n \nIt looks like the Zowe CLI's ZOWE_APP_LOG_LEVEL={0}.\n \nWould you like Zowe Explorer to update to the the same log level?", - "comment": ["CLI setting"] + "comment": [ + "CLI setting" + ] }, "Remote file has changed. Presenting with way to resolve file.": "Remote file has changed. Presenting with way to resolve file.", "Something went wrong with compare of files.": "Something went wrong with compare of files.", "Downloaded: {0}/Download time": { "message": "Downloaded: {0}", - "comment": ["Download time"] + "comment": [ + "Download time" + ] }, "Binary": "Binary", "Encoding: {0}/Encoding name": { "message": "Encoding: {0}", - "comment": ["Encoding name"] + "comment": [ + "Encoding name" + ] }, "{0} location/Node type": { "message": "{0} location", - "comment": ["Node type"] + "comment": [ + "Node type" + ] }, "Choose a location to create the {0}/Node type": { "message": "Choose a location to create the {0}", - "comment": ["Node type"] + "comment": [ + "Node type" + ] }, "Name of file or directory": "Name of file or directory", - "There is already a file with the same name. \n Please change your OS file system settings if you want to give case sensitive file names.": "There is already a file with the same name. \n Please change your OS file system settings if you want to give case sensitive file names.", + "There is already a file with the same name.\n Please change your OS file system settings if you want to give case sensitive file names.": "There is already a file with the same name.\n Please change your OS file system settings if you want to give case sensitive file names.", "Unable to create node:": "Unable to create node:", "Uploading USS file": "Uploading USS file", "Copy Path is not yet supported in Theia.": "Copy Path is not yet supported in Theia.", "save requested for USS file {0}/Document file name": { "message": "save requested for USS file {0}", - "comment": ["Document file name"] + "comment": [ + "Document file name" + ] }, "Could not locate session when saving USS file.": "Could not locate session when saving USS file.", "Saving file...": "Saving file...", "Delete": "Delete", "Are you sure you want to delete the following item?\nThis will permanently remove the following file or folder from your system.\n\n{0}/File names": { "message": "Are you sure you want to delete the following item?\nThis will permanently remove the following file or folder from your system.\n\n{0}", - "comment": ["File names"] + "comment": [ + "File names" + ] }, "Delete action was canceled.": "Delete action was canceled.", "Copying file structure...": "Copying file structure...", "The paste operation is not supported for this node.": "The paste operation is not supported for this node.", "Pasting files...": "Pasting files...", "open() called from invalid node.": "open() called from invalid node.", - "There is already a file with the same name. \n Please change your OS file system settings if you want to give case sensitive file names": "There is already a file with the same name. \n Please change your OS file system settings if you want to give case sensitive file names", + "There is already a file with the same name.\n Please change your OS file system settings if you want to give case sensitive file names": "There is already a file with the same name.\n Please change your OS file system settings if you want to give case sensitive file names", "$(sync~spin) Downloading USS file...": "$(sync~spin) Downloading USS file...", "Invalid node": "Invalid node", "Profile auth error": "Profile auth error", @@ -289,17 +371,23 @@ "Delete action was cancelled.": "Delete action was cancelled.", "Unable to delete node: {0}/Error message": { "message": "Unable to delete node: {0}", - "comment": ["Error message"] + "comment": [ + "Error message" + ] }, "The item {0} has been deleted./Label": { "message": "The item {0} has been deleted.", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "refreshUSS() called from invalid node.": "refreshUSS() called from invalid node.", "not found": "not found", "Unable to find file: {0} was probably deleted./Label": { "message": "Unable to find file: {0} was probably deleted.", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "Re-download": "Re-download", "Cancel": "Cancel", @@ -311,20 +399,29 @@ "Favorites": "Favorites", "Unable to rename {0} because you have unsaved changes in this {1}. Please save your work before renaming the {1}./Node pathNode type": { "message": "Unable to rename {0} because you have unsaved changes in this {1}. Please save your work before renaming the {1}.", - "comment": ["Node path", "Node type"] + "comment": [ + "Node path", + "Node type" + ] }, "Enter a new name for the {0}/Node type": { "message": "Enter a new name for the {0}", - "comment": ["Node type"] + "comment": [ + "Node type" + ] }, "Unable to rename node:": "Unable to rename node:", "A {0} already exists with this name. Please choose a different name./Node type": { "message": "A {0} already exists with this name. Please choose a different name.", - "comment": ["Node type"] + "comment": [ + "Node type" + ] }, "This will remove all favorited USS items for profile {0}. Continue?/Profile name": { "message": "This will remove all favorited USS items for profile {0}. Continue?", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Continue": "Continue", "Prompting the user to choose a member from the filtered list": "Prompting the user to choose a member from the filtered list", @@ -337,12 +434,17 @@ "No USS favorites found.": "No USS favorites found.", "Loading profile: {0} for USS favorites/Profile name": { "message": "Loading profile: {0} for USS favorites", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "You must authenticate to view favorites.": "You must authenticate to view favorites.", "Error: You have Zowe USS favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's USS view.\n Would you like to do this now? {1}/Profile nameApplication name": { "message": "Error: You have Zowe USS favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's USS view.\n Would you like to do this now? {1}", - "comment": ["Profile name", "Application name"] + "comment": [ + "Profile name", + "Application name" + ] }, "initializeUSSFavorites.error.buttonRemove": "initializeUSSFavorites.error.buttonRemove", "File does not exist. It may have been deleted.": "File does not exist. It may have been deleted.", @@ -365,27 +467,39 @@ "Specify another codepage": "Specify another codepage", "From profile {0}/Profile name": { "message": "From profile {0}", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "USS file tag": "USS file tag", "Choose encoding for {0}/Node label": { "message": "Choose encoding for {0}", - "comment": ["Node label"] + "comment": [ + "Node label" + ] }, "Current encoding is {0}/Encoding name": { "message": "Current encoding is {0}", - "comment": ["Encoding name"] + "comment": [ + "Encoding name" + ] }, "Enter a codepage (e.g., 1047, IBM-1047)": "Enter a codepage (e.g., 1047, IBM-1047)", "File was saved -- determining whether the file is a USS file or Data set.\n \n Comparing (case insensitive) {0} against directory {1} and {2}/Saved file nameData Set directoryUSS directory": { "message": "File was saved -- determining whether the file is a USS file or Data set.\n \n Comparing (case insensitive) {0} against directory {1} and {2}", - "comment": ["Saved file name", "Data Set directory", "USS directory"] + "comment": [ + "Saved file name", + "Data Set directory", + "USS directory" + ] }, "File is a Data Set-- saving ": "File is a Data Set-- saving ", "File is a USS file -- saving": "File is a USS file -- saving", "File {0} is not a Data Set or USS file/Saved file name": { "message": "File {0} is not a Data Set or USS file", - "comment": ["Saved file name"] + "comment": [ + "Saved file name" + ] }, "Team config file created, refreshing Zowe Explorer.": "Team config file created, refreshing Zowe Explorer.", "Team config file deleted, refreshing Zowe Explorer.": "Team config file deleted, refreshing Zowe Explorer.", @@ -412,57 +526,80 @@ "Download Single Spool operation not implemented by extender. Please contact the extension developer(s).": "Download Single Spool operation not implemented by extender. Please contact the extension developer(s).", "$(sync~spin) Opening spool file.../Label": { "message": "$(sync~spin) Opening spool file...", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "$(sync~spin) Polling: {0}.../Document file name": { "message": "$(sync~spin) Polling: {0}...", - "comment": ["Document file name"] + "comment": [ + "Document file name" + ] }, "$(sync~spin) Fetching spool files...": "$(sync~spin) Fetching spool files...", "Modify Command": "Modify Command", "Command response: {0}/Command response": { "message": "Command response: {0}", - "comment": ["Command response"] + "comment": [ + "Command response" + ] }, "jobActions.modifyCommand.apiNonExisting": "jobActions.modifyCommand.apiNonExisting", "Not implemented yet for profile of type: {0}/Job profile type": { "message": "Not implemented yet for profile of type: {0}", - "comment": ["Job profile type"] + "comment": [ + "Job profile type" + ] }, "Owner": "Owner", "Prefix": "Prefix", "Are you sure you want to delete the following item?\nThis will permanently remove the following job from your system.\n\n{0}/Job name": { "message": "Are you sure you want to delete the following item?\nThis will permanently remove the following job from your system.\n\n{0}", - "comment": ["Job name"] + "comment": [ + "Job name" + ] }, "Job {0} was deleted./Job name": { "message": "Job {0} was deleted.", - "comment": ["Job name"] + "comment": [ + "Job name" + ] }, "Are you sure you want to delete the following {0} items?\nThis will permanently remove the following jobs from your system.\n\n{1}/Jobs lengthJob names": { "message": "Are you sure you want to delete the following {0} items?\nThis will permanently remove the following jobs from your system.\n\n{1}", - "comment": ["Jobs length", "Job names"] + "comment": [ + "Jobs length", + "Job names" + ] }, "The following jobs were deleted: {0}/Deleted jobs": { "message": "The following jobs were deleted: {0}", - "comment": ["Deleted jobs"] + "comment": [ + "Deleted jobs" + ] }, "The selected jobs were already cancelled.": "The selected jobs were already cancelled.", "The cancel function is not implemented in this API.": "The cancel function is not implemented in this API.", "The job was not cancelled.": "The job was not cancelled.", "One or more jobs failed to cancel: {0}/Failed to cancel jobs": { "message": "One or more jobs failed to cancel: {0}", - "comment": ["Failed to cancel jobs"] + "comment": [ + "Failed to cancel jobs" + ] }, "Cancelled selected jobs successfully.": "Cancelled selected jobs successfully.", "Select a sorting option for jobs in {0}/Session label": { "message": "Select a sorting option for jobs in {0}", - "comment": ["Session label"] + "comment": [ + "Session label" + ] }, "Select a sorting direction": "Select a sorting direction", "$(check) Sorting updated for {0}/Session label": { "message": "$(check) Sorting updated for {0}", - "comment": ["Session label"] + "comment": [ + "Session label" + ] }, "Use the search button to display jobs": "Use the search button to display jobs", "There are no JES spool messages to display": "There are no JES spool messages to display", @@ -480,45 +617,64 @@ "No jobs favorites found.": "No jobs favorites found.", "Loading profile: {0} for jobs favorites/Profile name": { "message": "Loading profile: {0} for jobs favorites", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Error: You have Zowe Job favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Jobs view.\n Would you like to do this now? {1}/Profile nameApplication name": { "message": "Error: You have Zowe Job favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Jobs view.\n Would you like to do this now? {1}", - "comment": ["Profile name", "Application name"] + "comment": [ + "Profile name", + "Application name" + ] }, "Remove": "Remove", "This will remove all favorited Jobs items for profile {0}. Continue?/Profile name": { "message": "This will remove all favorited Jobs items for profile {0}. Continue?", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Enter a job ID": "Enter a job ID", "Job search cancelled.": "Job search cancelled.", "The polling interval must be greater than or equal to 1000ms.": "The polling interval must be greater than or equal to 1000ms.", "Poll interval (in ms) for: {0}/URI path": { "message": "Poll interval (in ms) for: {0}", - "comment": ["URI path"] + "comment": [ + "URI path" + ] }, "Polling dismissed for {0}; operation cancelled./Encoded URI path": { "message": "Polling dismissed for {0}; operation cancelled.", - "comment": ["Encoded URI path"] + "comment": [ + "Encoded URI path" + ] }, "$(sync~spin) Polling: {0}.../Encoded URI path": { "message": "$(sync~spin) Polling: {0}...", - "comment": ["Encoded URI path"] + "comment": [ + "Encoded URI path" + ] }, "Filter: {0}/The new filter": { "message": "Filter: {0}", - "comment": ["The new filter"] + "comment": [ + "The new filter" + ] }, "Set a filter...": "Set a filter...", "$(check) Filter cleared for {0}/Job label": { "message": "$(check) Filter cleared for {0}", - "comment": ["Job label"] + "comment": [ + "Job label" + ] }, "Enter local filter...": "Enter local filter...", "$(check) Filter updated for {0}/Job label": { "message": "$(check) Filter updated for {0}", - "comment": ["Job label"] + "comment": [ + "Job label" + ] }, "$(case-sensitive) Name (default)": "$(case-sensitive) Name (default)", "$(calendar) Date Modified": "$(calendar) Date Modified", @@ -540,41 +696,58 @@ "You must enter a new data set name.": "You must enter a new data set name.", "Allocating data set like {0}./Like Data Set name": { "message": "Allocating data set like {0}.", - "comment": ["Like Data Set name"] + "comment": [ + "Like Data Set name" + ] }, "allocateLike.inputBox.placeHolder": "allocateLike.inputBox.placeHolder", "Unable to create data set.": "Unable to create data set.", "{0} was created like {1}./New Data Set nameLike Data Set name": { "message": "{0} was created like {1}.", - "comment": ["New Data Set name", "Like Data Set name"] + "comment": [ + "New Data Set name", + "Like Data Set name" + ] }, "Uploading to data set": "Uploading to data set", "Upload action was cancelled.": "Upload action was cancelled.", "No data sets selected for deletion, cancelling...": "No data sets selected for deletion, cancelling...", "Deleting data set(s): {0}/Data Sets to delete": { "message": "Deleting data set(s): {0}", - "comment": ["Data Sets to delete"] + "comment": [ + "Data Sets to delete" + ] }, "Are you sure you want to delete the following {0} item(s)?\nThis will permanently remove these data sets and/or members from your system.\n\n{1}/Data Sets to delete lengthData Sets to delete": { "message": "Are you sure you want to delete the following {0} item(s)?\nThis will permanently remove these data sets and/or members from your system.\n\n{1}", - "comment": ["Data Sets to delete length", "Data Sets to delete"] + "comment": [ + "Data Sets to delete length", + "Data Sets to delete" + ] }, "Deleting items": "Deleting items", "The following {0} item(s) were deleted: {1}/Data Sets deleted lengthData Sets deleted": { "message": "The following {0} item(s) were deleted: {1}", - "comment": ["Data Sets deleted length", "Data Sets deleted"] + "comment": [ + "Data Sets deleted length", + "Data Sets deleted" + ] }, "Name of Member": "Name of Member", "Enter valid member name": "Enter valid member name", "Creating new data set member {0}/Data Set member name": { "message": "Creating new data set member {0}", - "comment": ["Data Set member name"] + "comment": [ + "Data Set member name" + ] }, "Unable to create member.": "Unable to create member.", "Invalid data set or member.": "Invalid data set or member.", "Downloading {0}/Label": { "message": "Downloading {0}", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "$(sync~spin) Downloading data set...": "$(sync~spin) Downloading data set...", "Allocating new data set": "Allocating new data set", @@ -587,83 +760,117 @@ "Name of Data Set Template": "Name of Data Set Template", "Showing attributes for {0}./Label": { "message": "Showing attributes for {0}.", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "No matching names found for query: {0}/Label": { "message": "No matching names found for query: {0}", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "Unable to list attributes.": "Unable to list attributes.", "Attributes": "Attributes", "No editor with a document that could be submitted as JCL is currently open.": "No editor with a document that could be submitted as JCL is currently open.", "Submitting as JCL in document {0}/Document file name": { "message": "Submitting as JCL in document {0}", - "comment": ["Document file name"] + "comment": [ + "Document file name" + ] }, "Select the Profile to use to submit the job": "Select the Profile to use to submit the job", "Session for submitting JCL was null or undefined!": "Session for submitting JCL was null or undefined!", "Job submitted {0}/Job ID and set job command": { "message": "Job submitted {0}", - "comment": ["Job ID and set job command"] + "comment": [ + "Job ID and set job command" + ] }, "Job submitted {0} using profile {1}./Job IDProfile name": { "message": "Job submitted {0} using profile {1}.", - "comment": ["Job ID", "Profile name"] + "comment": [ + "Job ID", + "Profile name" + ] }, "Job submission failed.": "Job submission failed.", "Are you sure you want to submit the following job?\n\n{0}/JCL name": { "message": "Are you sure you want to submit the following job?\n\n{0}", - "comment": ["JCL name"] + "comment": [ + "JCL name" + ] }, "Cannot submit, item invalid.": "Cannot submit, item invalid.", "Job submitted {0} using profile {1}./Job IDSession name": { "message": "Job submitted {0} using profile {1}.", - "comment": ["Job ID", "Session name"] + "comment": [ + "Job ID", + "Session name" + ] }, "Cannot delete, item invalid.": "Cannot delete, item invalid.", "Error encountered when deleting data set. {0}/Stringified JSON error": { "message": "Error encountered when deleting data set. {0}", - "comment": ["Stringified JSON error"] + "comment": [ + "Stringified JSON error" + ] }, "Unable to find file {0}/Label": { "message": "Unable to find file {0}", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "Item invalid.": "Item invalid.", "Error encountered when refreshing data set view. {0}/Stringified JSON error": { "message": "Error encountered when refreshing data set view. {0}", - "comment": ["Stringified JSON error"] + "comment": [ + "Stringified JSON error" + ] }, "Search Data Sets: use a comma to separate multiple patterns": "Search Data Sets: use a comma to separate multiple patterns", "Prompted for a data set pattern, recieved {0}./Data Set pattern": { "message": "Prompted for a data set pattern, recieved {0}.", - "comment": ["Data Set pattern"] + "comment": [ + "Data Set pattern" + ] }, "Cannot perform the copy operation as the data sets selected have different types": "Cannot perform the copy operation as the data sets selected have different types", "Migration of data set {0} requested./Data Set name": { "message": "Migration of data set {0} requested.", - "comment": ["Data Set name"] + "comment": [ + "Data Set name" + ] }, "Recall of data set {0} requested./Data Set name": { "message": "Recall of data set {0} requested.", - "comment": ["Data Set name"] + "comment": [ + "Data Set name" + ] }, "Unable to gather more information": "Unable to gather more information", "Invalid paste. Copy data set(s) first.": "Invalid paste. Copy data set(s) first.", "Name of Data Set Member": "Name of Data Set Member", "Requested to save data set {0}/Document file name": { "message": "Requested to save data set {0}", - "comment": ["Document file name"] + "comment": [ + "Document file name" + ] }, "path.relative returned a non-blank directory. Assuming we are not in the DS_DIR directory: {0}/Relative path to Data Set directory": { "message": "path.relative returned a non-blank directory. Assuming we are not in the DS_DIR directory: {0}", - "comment": ["Relative path to Data Set directory"] + "comment": [ + "Relative path to Data Set directory" + ] }, "Could not locate session when saving data set.": "Could not locate session when saving data set.", "Could not find session node": "Could not find session node", "Saving file {0}/Label": { "message": "Saving file {0}", - "comment": ["Label"] + "comment": [ + "Label" + ] }, "Data set failed to save. Data set may have been deleted or renamed on mainframe.": "Data set failed to save. Data set may have been deleted or renamed on mainframe.", "Saving data set...": "Saving data set...", @@ -677,7 +884,9 @@ "Use the search button to display data sets": "Use the search button to display data sets", "Cannot access member with control characters in the name: {0}/Data Set member": { "message": "Cannot access member with control characters in the name: {0}", - "comment": ["Data Set member"] + "comment": [ + "Data Set member" + ] }, "No data sets found": "No data sets found", "$(plus) Create a new filter. For example: HLQ.*, HLQ.aaa.bbb, HLQ.ccc.ddd(member)": "$(plus) Create a new filter. For example: HLQ.*, HLQ.aaa.bbb, HLQ.ccc.ddd(member)", @@ -685,68 +894,99 @@ "No data set favorites found.": "No data set favorites found.", "Invalid Data Sets favorite: {0}. Please check formatting of the zowe.ds.history 'favorites' settings in the {1} user settings./Data Sets Favorite lineApplication name": { "message": "Invalid Data Sets favorite: {0}. Please check formatting of the zowe.ds.history 'favorites' settings in the {1} user settings.", - "comment": ["Data Sets Favorite line", "Application name"] + "comment": [ + "Data Sets Favorite line", + "Application name" + ] }, "Error creating data set favorite node: {0} for profile {1}./LabelProfile name": { "message": "Error creating data set favorite node: {0} for profile {1}.", - "comment": ["Label", "Profile name"] + "comment": [ + "Label", + "Profile name" + ] }, "Loading profile: {0} for data set favorites/Profile name": { "message": "Loading profile: {0} for data set favorites", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, - "Error: You have Zowe Data Set favorites that refer to a non-existent CLI profile named: {0}. \n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Data Sets view. \n Would you like to do this now? {1}/Profile nameApplication name": { - "message": "Error: You have Zowe Data Set favorites that refer to a non-existent CLI profile named: {0}. \n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Data Sets view. \n Would you like to do this now? {1}", - "comment": ["Profile name", "Application name"] + "Error: You have Zowe Data Set favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Data Sets view.\n Would you like to do this now? {1}/Profile nameApplication name": { + "message": "Error: You have Zowe Data Set favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Data Sets view.\n Would you like to do this now? {1}", + "comment": [ + "Profile name", + "Application name" + ] }, "PDS already in favorites": "PDS already in favorites", "This will remove all favorited Data Sets items for profile {0}. Continue?/Profile name": { "message": "This will remove all favorited Data Sets items for profile {0}. Continue?", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Node does not exist. It may have been deleted.": "Node does not exist. It may have been deleted.", "Prompting the user for a data set pattern": "Prompting the user for a data set pattern", "Rename operation cancelled.": "Rename operation cancelled.", "Renaming data set {0}/Old Data Set name": { "message": "Renaming data set {0}", - "comment": ["Old Data Set name"] + "comment": [ + "Old Data Set name" + ] }, "Unable to rename data set:": "Unable to rename data set:", "all PDS members in {0}/Node label": { "message": "all PDS members in {0}", - "comment": ["Node label"] + "comment": [ + "Node label" + ] }, "the PDS members in {0}/Node label": { "message": "the PDS members in {0}", - "comment": ["Node label"] + "comment": [ + "Node label" + ] }, "Select a sorting option for {0}/Specifier": { "message": "Select a sorting option for {0}", - "comment": ["Specifier"] + "comment": [ + "Specifier" + ] }, "$(check) Sorting updated for {0}/Node label": { "message": "$(check) Sorting updated for {0}", - "comment": ["Node label"] + "comment": [ + "Node label" + ] }, "Filter: {0}/Filter value": { "message": "Filter: {0}", - "comment": ["Filter value"] + "comment": [ + "Filter value" + ] }, "$(clear-all) Clear filter for PDS": "$(clear-all) Clear filter for PDS", "Set a filter for {0}/Specifier": { "message": "Set a filter for {0}", - "comment": ["Specifier"] + "comment": [ + "Specifier" + ] }, "$(check) Filter cleared for {0}/Node label": { "message": "$(check) Filter cleared for {0}", - "comment": ["Node label"] + "comment": [ + "Node label" + ] }, "Invalid date format specified": "Invalid date format specified", "Enter a value to filter by": "Enter a value to filter by", "Invalid filter specified": "Invalid filter specified", "$(check) Filter updated for {0}/Node label": { "message": "$(check) Filter updated for {0}", - "comment": ["Node label"] + "comment": [ + "Node label" + ] }, "$(plus) Create a new Unix command": "$(plus) Create a new Unix command", "Zowe Unix Command": "Zowe Unix Command", @@ -757,7 +997,9 @@ "Operation cancelled.": "Operation cancelled.", "Not implemented yet for profile of type: {0}/Profile type": { "message": "Not implemented yet for profile of type: {0}", - "comment": ["Profile type"] + "comment": [ + "Profile type" + ] }, "Select the ssh Profile.": "Select the ssh Profile.", "No SSH profile found. Please create an SSH profile before issuing Unix commands.": "No SSH profile found. Please create an SSH profile before issuing Unix commands.", @@ -765,15 +1007,21 @@ "(An option to edit will follow)": "(An option to edit will follow)", "Select a Unix command to run against {0}/Current work directory": { "message": "Select a Unix command to run against {0}", - "comment": ["Current work directory"] + "comment": [ + "Current work directory" + ] }, "Select a Unix command to run against {0} (An option to edit will follow)/Current work directory": { "message": "Select a Unix command to run against {0} (An option to edit will follow)", - "comment": ["Current work directory"] + "comment": [ + "Current work directory" + ] }, "Select a Unix command to run immediately against {0}/Current work directory": { "message": "Select a Unix command to run immediately against {0}", - "comment": ["Current work directory"] + "comment": [ + "Current work directory" + ] }, "Enter or update the Unix command": "Enter or update the Unix command", "No command entered.": "No command entered.", @@ -783,16 +1031,22 @@ "Select the Profile to use to submit the TSO command": "Select the Profile to use to submit the TSO command", "Select a TSO command to run against {0}/Host name": { "message": "Select a TSO command to run against {0}", - "comment": ["Host name"] + "comment": [ + "Host name" + ] }, "No selection made.": "No selection made.", "Select a TSO command to run against {0} (An option to edit will follow)/Host name": { "message": "Select a TSO command to run against {0} (An option to edit will follow)", - "comment": ["Host name"] + "comment": [ + "Host name" + ] }, "Select a TSO command to run immediately against {0}/Host name": { "message": "Select a TSO command to run immediately against {0}", - "comment": ["Host name"] + "comment": [ + "Host name" + ] }, "Enter or update the TSO command": "Enter or update the TSO command", "TSO command submitted.": "TSO command submitted.", @@ -806,24 +1060,35 @@ "Select the Profile to use to submit the command": "Select the Profile to use to submit the command", "Select an MVS command to run against {0}/Host name": { "message": "Select an MVS command to run against {0}", - "comment": ["Host name"] + "comment": [ + "Host name" + ] }, "Select an MVS command to run against {0} (An option to edit will follow)/Host name": { "message": "Select an MVS command to run against {0} (An option to edit will follow)", - "comment": ["Host name"] + "comment": [ + "Host name" + ] }, "Select an MVS command to run immediately against {0}/Host name": { "message": "Select an MVS command to run immediately against {0}", - "comment": ["Host name"] + "comment": [ + "Host name" + ] }, "Enter or update the MVS command": "Enter or update the MVS command", "MVS command submitted.": "MVS command submitted.", "Profile Name {0} is inactive. Please check if your Zowe server is active or if the URL and port in your profile is correct./Profile name": { "message": "Profile Name {0} is inactive. Please check if your Zowe server is active or if the URL and port in your profile is correct.", - "comment": ["Profile name"] + "comment": [ + "Profile name" + ] }, "Failed to upload changes for {0}: {1}/Build file hyperlinkError message": { "message": "Failed to upload changes for {0}: {1}", - "comment": ["Build file hyperlink", "Error message"] + "comment": [ + "Build file hyperlink", + "Error message" + ] } -} +} \ No newline at end of file From 6a497f96238df458a2833dce82895ae758a4409b Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:47:05 +0000 Subject: [PATCH 6/9] update dependencies for tech currency Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- package.json | 2 +- packages/zowe-explorer-api/package.json | 2 +- packages/zowe-explorer/l10n/bundle.l10n.json | 513 +++++-------------- packages/zowe-explorer/package.json | 2 +- pnpm-lock.yaml | 161 +++--- samples/uss-profile-sample/package.json | 2 +- 6 files changed, 214 insertions(+), 468 deletions(-) diff --git a/package.json b/package.json index 676d65c0ad..12fa72a853 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@vscode/l10n": "^0.0.18", - "@zowe/cli": "8.0.0-next.202401262128" + "@zowe/cli": "8.0.0-next.202402132108" }, "devDependencies": { "@types/jest": "^29.2.3", diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index 432b34df48..0a8f84078d 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@types/vscode": "^1.53.2", - "@zowe/cli": "8.0.0-next.202401262128", + "@zowe/cli": "8.0.0-next.202402132108", "@zowe/secrets-for-zowe-sdk": "7.18.6", "handlebars": "^4.7.7", "semver": "^7.5.3" diff --git a/packages/zowe-explorer/l10n/bundle.l10n.json b/packages/zowe-explorer/l10n/bundle.l10n.json index 7bed5fdee6..00a6d67999 100644 --- a/packages/zowe-explorer/l10n/bundle.l10n.json +++ b/packages/zowe-explorer/l10n/bundle.l10n.json @@ -22,9 +22,7 @@ "Zowe Explorer is running in Theia environment.": "Zowe Explorer is running in Theia environment.", "Zowe Explorer's temp folder is located at {0}/Zowe temp folder": { "message": "Zowe Explorer's temp folder is located at {0}", - "comment": [ - "Zowe temp folder" - ] + "comment": ["Zowe temp folder"] }, "Zowe Explorer has activated successfully.": "Zowe Explorer has activated successfully.", "Zowe explorer profiles are being set as unsecured.": "Zowe explorer profiles are being set as unsecured.", @@ -36,33 +34,23 @@ "Internal error: A Zowe Explorer extension client tried to register an invalid Command API.": "Internal error: A Zowe Explorer extension client tried to register an invalid Command API.", "Internal error: Tried to call a non-existing USS API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing USS API in API register: {0}", - "comment": [ - "Profile type" - ] + "comment": ["Profile type"] }, "Internal error: Tried to call a non-existing MVS API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing MVS API in API register: {0}", - "comment": [ - "Profile type" - ] + "comment": ["Profile type"] }, "Internal error: Tried to call a non-existing JES API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing JES API in API register: {0}", - "comment": [ - "Profile type" - ] + "comment": ["Profile type"] }, "Internal error: Tried to call a non-existing Command API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing Command API in API register: {0}", - "comment": [ - "Profile type" - ] + "comment": ["Profile type"] }, "Internal error: Tried to call a non-existing Common API in API register: {0}/Profile type": { "message": "Internal error: Tried to call a non-existing Common API in API register: {0}", - "comment": [ - "Profile type" - ] + "comment": ["Profile type"] }, "Operation Cancelled": "Operation Cancelled", "The Team configuration file has been opened in the editor. Editing or removal of profiles will need to be done manually.": "The Team configuration file has been opened in the editor. Editing or removal of profiles will need to be done manually.", @@ -74,10 +62,7 @@ "Profile selection has been cancelled.": "Profile selection has been cancelled.", "The profile {0} has been added to the {1} tree./chosen profiletree type": { "message": "The profile {0} has been added to the {1} tree.", - "comment": [ - "chosen profile", - "tree type" - ] + "comment": ["chosen profile", "tree type"] }, "Profile Type": "Profile Type", "User Name": "User Name", @@ -88,49 +73,33 @@ "Select the profile you want to delete": "Select the profile you want to delete", "Validating {0} Profile./The profile name": { "message": "Validating {0} Profile.", - "comment": [ - "The profile name" - ] + "comment": ["The profile name"] }, "Validating {0} was cancelled./The profile name": { "message": "Validating {0} was cancelled.", - "comment": [ - "The profile name" - ] + "comment": ["The profile name"] }, "Profile validation failed for {0}./The profile name": { "message": "Profile validation failed for {0}.", - "comment": [ - "The profile name" - ] + "comment": ["The profile name"] }, "This profile is using basic authentication and does not support token authentication.": "This profile is using basic authentication and does not support token authentication.", "Error getting supported tokenType value for profile {0}/Service profile name": { "message": "Error getting supported tokenType value for profile {0}", - "comment": [ - "Service profile name" - ] + "comment": ["Service profile name"] }, "Login to authentication service was successful.": "Login to authentication service was successful.", "Unable to log in with {0}. {1}/Service profile nameError message": { "message": "Unable to log in with {0}. {1}", - "comment": [ - "Service profile name", - "Error message" - ] + "comment": ["Service profile name", "Error message"] }, "Logout from authentication service was successful for {0}./Service profile name": { "message": "Logout from authentication service was successful for {0}.", - "comment": [ - "Service profile name" - ] + "comment": ["Service profile name"] }, "Unable to log out with {0}. {1}/Service profile nameError message": { "message": "Unable to log out with {0}. {1}", - "comment": [ - "Service profile name", - "Error message" - ] + "comment": ["Service profile name", "Error message"] }, "Select the location where the config file will be initialized": "Select the location where the config file will be initialized", "Select the location of the config file to edit": "Select the location of the config file to edit", @@ -139,9 +108,7 @@ "Create New": "Create New", "A Team Configuration File already exists in this location\n{0}\nContinuing may alter the existing file, would you like to proceed?/File path": { "message": "A Team Configuration File already exists in this location\n{0}\nContinuing may alter the existing file, would you like to proceed?", - "comment": [ - "File path" - ] + "comment": ["File path"] }, "Refresh": "Refresh", "Delete Selected": "Delete Selected", @@ -153,49 +120,37 @@ "Error encountered when creating temporary folder!": "Error encountered when creating temporary folder!", "Unable to delete temporary folder. {0}/Error message": { "message": "Unable to delete temporary folder. {0}", - "comment": [ - "Error message" - ] + "comment": ["Error message"] }, "Reload Window": "Reload Window", "Settings have been successfully migrated for Zowe Explorer version 2 and above. To apply these settings, please reload your VS Code window.": "Settings have been successfully migrated for Zowe Explorer version 2 and above. To apply these settings, please reload your VS Code window.", "Required parameter 'host' must not be blank.": "Required parameter 'host' must not be blank.", "Invalid Credentials for profile '{0}'. Please ensure the username and password are valid or this may lead to a lock-out./Label": { "message": "Invalid Credentials for profile '{0}'. Please ensure the username and password are valid or this may lead to a lock-out.", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "Your connection is no longer active for profile '{0}'. Please log in to an authentication service to restore the connection./Label": { "message": "Your connection is no longer active for profile '{0}'. Please log in to an authentication service to restore the connection.", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "Log in to Authentication Service": "Log in to Authentication Service", "Update Credentials": "Update Credentials", "Custom credential manager failed to activate": "Custom credential manager failed to activate", "Custom credential manager {0} found, attempting to activate./Credential manager display name": { "message": "Custom credential manager {0} found, attempting to activate.", - "comment": [ - "Credential manager display name" - ] + "comment": ["Credential manager display name"] }, "No custom credential managers found, using the default instead.": "No custom credential managers found, using the default instead.", "Custom credential manager {0} found/Credential manager display name": { "message": "Custom credential manager {0} found", - "comment": [ - "Credential manager display name" - ] + "comment": ["Credential manager display name"] }, "Do you wish to use this credential manager instead?": "Do you wish to use this credential manager instead?", "Yes": "Yes", "Don't ask again": "Don't ask again", "Plugin of name '{0}' was defined for custom credential management on imperative.json file./Credential manager display name": { "message": "Plugin of name '{0}' was defined for custom credential management on imperative.json file.", - "comment": [ - "Credential manager display name" - ] + "comment": ["Credential manager display name"] }, "Please install associated VS Code extension for custom credential manager or revert to default.": "Please install associated VS Code extension for custom credential manager or revert to default.", "Use Default": "Use Default", @@ -207,41 +162,28 @@ "Enter a name for the connection.": "Enter a name for the connection.", "Credentials for {0} were successfully updated/Profile name": { "message": "Credentials for {0} were successfully updated", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Zowe home directory is located at {0}/Zowe directory path": { "message": "Zowe home directory is located at {0}", - "comment": [ - "Zowe directory path" - ] + "comment": ["Zowe directory path"] }, "Reading imperative.json failed. Will try to create file.": "Reading imperative.json failed. Will try to create file.", "Reading imperative.json Credential Manager.\n {0}/File content": { "message": "Reading imperative.json Credential Manager.\n {0}", - "comment": [ - "File content" - ] + "comment": ["File content"] }, "Failed to parse JSON file {0}. Will try to re-create the file./Settings file": { "message": "Failed to parse JSON file {0}. Will try to re-create the file.", - "comment": [ - "Settings file" - ] + "comment": ["Settings file"] }, "Updating imperative.json Credential Manager to {0}.\n{1}/Default credential override settingNew credential override setting": { "message": "Updating imperative.json Credential Manager to {0}.\n{1}", - "comment": [ - "Default credential override setting", - "New credential override setting" - ] + "comment": ["Default credential override setting", "New credential override setting"] }, "Failed to initialize Zowe folder: {0}/Error message": { "message": "Failed to initialize Zowe folder: {0}", - "comment": [ - "Error message" - ] + "comment": ["Error message"] }, "Zowe Profiles initialized successfully.": "Zowe Profiles initialized successfully.", "Zowe Temp folder initialized successfully.": "Zowe Temp folder initialized successfully.", @@ -271,70 +213,50 @@ "Do you wish to apply this for all trees?": "Do you wish to apply this for all trees?", "Profile {0} is using basic authentication. Choose a profile action./Profile name": { "message": "Profile {0} is using basic authentication. Choose a profile action.", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Profile {0} is using token authentication. Choose a profile action./Profile name": { "message": "Profile {0} is using token authentication. Choose a profile action.", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Profile {0} doesn't specify an authentication method. Choose a profile action./Profile name": { "message": "Profile {0} doesn't specify an authentication method. Choose a profile action.", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Error encountered while activating and initializing logger": "Error encountered while activating and initializing logger", "Zowe Explorer": "Zowe Explorer", "Initialized logger for Zowe Explorer": "Initialized logger for Zowe Explorer", "This log file can be found at {0}/Log file location": { "message": "This log file can be found at {0}", - "comment": [ - "Log file location" - ] + "comment": ["Log file location"] }, "Zowe Explorer log level: {0}/Log setting": { "message": "Zowe Explorer log level: {0}", - "comment": [ - "Log setting" - ] + "comment": ["Log setting"] }, "Update": "Update", "Zowe Explorer now has a VS Code logger with a default log level of INFO.\n \nIt looks like the Zowe CLI's ZOWE_APP_LOG_LEVEL={0}.\n \nWould you like Zowe Explorer to update to the the same log level?/CLI setting": { "message": "Zowe Explorer now has a VS Code logger with a default log level of INFO.\n \nIt looks like the Zowe CLI's ZOWE_APP_LOG_LEVEL={0}.\n \nWould you like Zowe Explorer to update to the the same log level?", - "comment": [ - "CLI setting" - ] + "comment": ["CLI setting"] }, "Remote file has changed. Presenting with way to resolve file.": "Remote file has changed. Presenting with way to resolve file.", "Something went wrong with compare of files.": "Something went wrong with compare of files.", "Downloaded: {0}/Download time": { "message": "Downloaded: {0}", - "comment": [ - "Download time" - ] + "comment": ["Download time"] }, "Binary": "Binary", "Encoding: {0}/Encoding name": { "message": "Encoding: {0}", - "comment": [ - "Encoding name" - ] + "comment": ["Encoding name"] }, "{0} location/Node type": { "message": "{0} location", - "comment": [ - "Node type" - ] + "comment": ["Node type"] }, "Choose a location to create the {0}/Node type": { "message": "Choose a location to create the {0}", - "comment": [ - "Node type" - ] + "comment": ["Node type"] }, "Name of file or directory": "Name of file or directory", "There is already a file with the same name.\n Please change your OS file system settings if you want to give case sensitive file names.": "There is already a file with the same name.\n Please change your OS file system settings if you want to give case sensitive file names.", @@ -343,18 +265,14 @@ "Copy Path is not yet supported in Theia.": "Copy Path is not yet supported in Theia.", "save requested for USS file {0}/Document file name": { "message": "save requested for USS file {0}", - "comment": [ - "Document file name" - ] + "comment": ["Document file name"] }, "Could not locate session when saving USS file.": "Could not locate session when saving USS file.", "Saving file...": "Saving file...", "Delete": "Delete", "Are you sure you want to delete the following item?\nThis will permanently remove the following file or folder from your system.\n\n{0}/File names": { "message": "Are you sure you want to delete the following item?\nThis will permanently remove the following file or folder from your system.\n\n{0}", - "comment": [ - "File names" - ] + "comment": ["File names"] }, "Delete action was canceled.": "Delete action was canceled.", "Copying file structure...": "Copying file structure...", @@ -372,23 +290,17 @@ "Delete action was cancelled.": "Delete action was cancelled.", "Unable to delete node: {0}/Error message": { "message": "Unable to delete node: {0}", - "comment": [ - "Error message" - ] + "comment": ["Error message"] }, "The item {0} has been deleted./Label": { "message": "The item {0} has been deleted.", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "refreshUSS() called from invalid node.": "refreshUSS() called from invalid node.", "not found": "not found", "Unable to find file: {0} was probably deleted./Label": { "message": "Unable to find file: {0} was probably deleted.", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "Re-download": "Re-download", "Cancel": "Cancel", @@ -400,29 +312,20 @@ "Favorites": "Favorites", "Unable to rename {0} because you have unsaved changes in this {1}. Please save your work before renaming the {1}./Node pathNode type": { "message": "Unable to rename {0} because you have unsaved changes in this {1}. Please save your work before renaming the {1}.", - "comment": [ - "Node path", - "Node type" - ] + "comment": ["Node path", "Node type"] }, "Enter a new name for the {0}/Node type": { "message": "Enter a new name for the {0}", - "comment": [ - "Node type" - ] + "comment": ["Node type"] }, "Unable to rename node:": "Unable to rename node:", "A {0} already exists with this name. Please choose a different name./Node type": { "message": "A {0} already exists with this name. Please choose a different name.", - "comment": [ - "Node type" - ] + "comment": ["Node type"] }, "This will remove all favorited USS items for profile {0}. Continue?/Profile name": { "message": "This will remove all favorited USS items for profile {0}. Continue?", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Continue": "Continue", "Prompting the user to choose a member from the filtered list": "Prompting the user to choose a member from the filtered list", @@ -435,17 +338,12 @@ "No USS favorites found.": "No USS favorites found.", "Loading profile: {0} for USS favorites/Profile name": { "message": "Loading profile: {0} for USS favorites", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "You must authenticate to view favorites.": "You must authenticate to view favorites.", "Error: You have Zowe USS favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's USS view.\n Would you like to do this now? {1}/Profile nameApplication name": { "message": "Error: You have Zowe USS favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's USS view.\n Would you like to do this now? {1}", - "comment": [ - "Profile name", - "Application name" - ] + "comment": ["Profile name", "Application name"] }, "initializeUSSFavorites.error.buttonRemove": "initializeUSSFavorites.error.buttonRemove", "File does not exist. It may have been deleted.": "File does not exist. It may have been deleted.", @@ -468,39 +366,27 @@ "Specify another codepage": "Specify another codepage", "From profile {0}/Profile name": { "message": "From profile {0}", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "USS file tag": "USS file tag", "Choose encoding for {0}/Node label": { "message": "Choose encoding for {0}", - "comment": [ - "Node label" - ] + "comment": ["Node label"] }, "Current encoding is {0}/Encoding name": { "message": "Current encoding is {0}", - "comment": [ - "Encoding name" - ] + "comment": ["Encoding name"] }, "Enter a codepage (e.g., 1047, IBM-1047)": "Enter a codepage (e.g., 1047, IBM-1047)", "File was saved -- determining whether the file is a USS file or Data set.\n \n Comparing (case insensitive) {0} against directory {1} and {2}/Saved file nameData Set directoryUSS directory": { "message": "File was saved -- determining whether the file is a USS file or Data set.\n \n Comparing (case insensitive) {0} against directory {1} and {2}", - "comment": [ - "Saved file name", - "Data Set directory", - "USS directory" - ] + "comment": ["Saved file name", "Data Set directory", "USS directory"] }, "File is a Data Set-- saving ": "File is a Data Set-- saving ", "File is a USS file -- saving": "File is a USS file -- saving", "File {0} is not a Data Set or USS file/Saved file name": { "message": "File {0} is not a Data Set or USS file", - "comment": [ - "Saved file name" - ] + "comment": ["Saved file name"] }, "Team config file created, refreshing Zowe Explorer.": "Team config file created, refreshing Zowe Explorer.", "Team config file deleted, refreshing Zowe Explorer.": "Team config file deleted, refreshing Zowe Explorer.", @@ -527,80 +413,57 @@ "Download Single Spool operation not implemented by extender. Please contact the extension developer(s).": "Download Single Spool operation not implemented by extender. Please contact the extension developer(s).", "$(sync~spin) Opening spool file.../Label": { "message": "$(sync~spin) Opening spool file...", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "$(sync~spin) Polling: {0}.../Document file name": { "message": "$(sync~spin) Polling: {0}...", - "comment": [ - "Document file name" - ] + "comment": ["Document file name"] }, "$(sync~spin) Fetching spool files...": "$(sync~spin) Fetching spool files...", "Modify Command": "Modify Command", "Command response: {0}/Command response": { "message": "Command response: {0}", - "comment": [ - "Command response" - ] + "comment": ["Command response"] }, "jobActions.modifyCommand.apiNonExisting": "jobActions.modifyCommand.apiNonExisting", "Not implemented yet for profile of type: {0}/Job profile type": { "message": "Not implemented yet for profile of type: {0}", - "comment": [ - "Job profile type" - ] + "comment": ["Job profile type"] }, "Owner": "Owner", "Prefix": "Prefix", "Are you sure you want to delete the following item?\nThis will permanently remove the following job from your system.\n\n{0}/Job name": { "message": "Are you sure you want to delete the following item?\nThis will permanently remove the following job from your system.\n\n{0}", - "comment": [ - "Job name" - ] + "comment": ["Job name"] }, "Job {0} was deleted./Job name": { "message": "Job {0} was deleted.", - "comment": [ - "Job name" - ] + "comment": ["Job name"] }, "Are you sure you want to delete the following {0} items?\nThis will permanently remove the following jobs from your system.\n\n{1}/Jobs lengthJob names": { "message": "Are you sure you want to delete the following {0} items?\nThis will permanently remove the following jobs from your system.\n\n{1}", - "comment": [ - "Jobs length", - "Job names" - ] + "comment": ["Jobs length", "Job names"] }, "The following jobs were deleted: {0}/Deleted jobs": { "message": "The following jobs were deleted: {0}", - "comment": [ - "Deleted jobs" - ] + "comment": ["Deleted jobs"] }, "The selected jobs were already cancelled.": "The selected jobs were already cancelled.", "The cancel function is not implemented in this API.": "The cancel function is not implemented in this API.", "The job was not cancelled.": "The job was not cancelled.", "One or more jobs failed to cancel: {0}/Failed to cancel jobs": { "message": "One or more jobs failed to cancel: {0}", - "comment": [ - "Failed to cancel jobs" - ] + "comment": ["Failed to cancel jobs"] }, "Cancelled selected jobs successfully.": "Cancelled selected jobs successfully.", "Select a sorting option for jobs in {0}/Session label": { "message": "Select a sorting option for jobs in {0}", - "comment": [ - "Session label" - ] + "comment": ["Session label"] }, "Select a sorting direction": "Select a sorting direction", "$(check) Sorting updated for {0}/Session label": { "message": "$(check) Sorting updated for {0}", - "comment": [ - "Session label" - ] + "comment": ["Session label"] }, "Use the search button to display jobs": "Use the search button to display jobs", "There are no JES spool messages to display": "There are no JES spool messages to display", @@ -618,64 +481,45 @@ "No jobs favorites found.": "No jobs favorites found.", "Loading profile: {0} for jobs favorites/Profile name": { "message": "Loading profile: {0} for jobs favorites", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Error: You have Zowe Job favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Jobs view.\n Would you like to do this now? {1}/Profile nameApplication name": { "message": "Error: You have Zowe Job favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Jobs view.\n Would you like to do this now? {1}", - "comment": [ - "Profile name", - "Application name" - ] + "comment": ["Profile name", "Application name"] }, "Remove": "Remove", "This will remove all favorited Jobs items for profile {0}. Continue?/Profile name": { "message": "This will remove all favorited Jobs items for profile {0}. Continue?", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Enter a job ID": "Enter a job ID", "Job search cancelled.": "Job search cancelled.", "The polling interval must be greater than or equal to 1000ms.": "The polling interval must be greater than or equal to 1000ms.", "Poll interval (in ms) for: {0}/URI path": { "message": "Poll interval (in ms) for: {0}", - "comment": [ - "URI path" - ] + "comment": ["URI path"] }, "Polling dismissed for {0}; operation cancelled./Encoded URI path": { "message": "Polling dismissed for {0}; operation cancelled.", - "comment": [ - "Encoded URI path" - ] + "comment": ["Encoded URI path"] }, "$(sync~spin) Polling: {0}.../Encoded URI path": { "message": "$(sync~spin) Polling: {0}...", - "comment": [ - "Encoded URI path" - ] + "comment": ["Encoded URI path"] }, "Filter: {0}/The new filter": { "message": "Filter: {0}", - "comment": [ - "The new filter" - ] + "comment": ["The new filter"] }, "Set a filter...": "Set a filter...", "$(check) Filter cleared for {0}/Job label": { "message": "$(check) Filter cleared for {0}", - "comment": [ - "Job label" - ] + "comment": ["Job label"] }, "Enter local filter...": "Enter local filter...", "$(check) Filter updated for {0}/Job label": { "message": "$(check) Filter updated for {0}", - "comment": [ - "Job label" - ] + "comment": ["Job label"] }, "$(case-sensitive) Name (default)": "$(case-sensitive) Name (default)", "$(calendar) Date Modified": "$(calendar) Date Modified", @@ -697,58 +541,41 @@ "You must enter a new data set name.": "You must enter a new data set name.", "Allocating data set like {0}./Like Data Set name": { "message": "Allocating data set like {0}.", - "comment": [ - "Like Data Set name" - ] + "comment": ["Like Data Set name"] }, "allocateLike.inputBox.placeHolder": "allocateLike.inputBox.placeHolder", "Unable to create data set.": "Unable to create data set.", "{0} was created like {1}./New Data Set nameLike Data Set name": { "message": "{0} was created like {1}.", - "comment": [ - "New Data Set name", - "Like Data Set name" - ] + "comment": ["New Data Set name", "Like Data Set name"] }, "Uploading to data set": "Uploading to data set", "Upload action was cancelled.": "Upload action was cancelled.", "No data sets selected for deletion, cancelling...": "No data sets selected for deletion, cancelling...", "Deleting data set(s): {0}/Data Sets to delete": { "message": "Deleting data set(s): {0}", - "comment": [ - "Data Sets to delete" - ] + "comment": ["Data Sets to delete"] }, "Are you sure you want to delete the following {0} item(s)?\nThis will permanently remove these data sets and/or members from your system.\n\n{1}/Data Sets to delete lengthData Sets to delete": { "message": "Are you sure you want to delete the following {0} item(s)?\nThis will permanently remove these data sets and/or members from your system.\n\n{1}", - "comment": [ - "Data Sets to delete length", - "Data Sets to delete" - ] + "comment": ["Data Sets to delete length", "Data Sets to delete"] }, "Deleting items": "Deleting items", "The following {0} item(s) were deleted: {1}/Data Sets deleted lengthData Sets deleted": { "message": "The following {0} item(s) were deleted: {1}", - "comment": [ - "Data Sets deleted length", - "Data Sets deleted" - ] + "comment": ["Data Sets deleted length", "Data Sets deleted"] }, "Name of Member": "Name of Member", "Enter valid member name": "Enter valid member name", "Creating new data set member {0}/Data Set member name": { "message": "Creating new data set member {0}", - "comment": [ - "Data Set member name" - ] + "comment": ["Data Set member name"] }, "Unable to create member.": "Unable to create member.", "Invalid data set or member.": "Invalid data set or member.", "Downloading {0}/Label": { "message": "Downloading {0}", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "$(sync~spin) Downloading data set...": "$(sync~spin) Downloading data set...", "Allocating new data set": "Allocating new data set", @@ -761,117 +588,83 @@ "Name of Data Set Template": "Name of Data Set Template", "Showing attributes for {0}./Label": { "message": "Showing attributes for {0}.", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "No matching names found for query: {0}/Label": { "message": "No matching names found for query: {0}", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "Unable to list attributes.": "Unable to list attributes.", "Attributes": "Attributes", "No editor with a document that could be submitted as JCL is currently open.": "No editor with a document that could be submitted as JCL is currently open.", "Submitting as JCL in document {0}/Document file name": { "message": "Submitting as JCL in document {0}", - "comment": [ - "Document file name" - ] + "comment": ["Document file name"] }, "Select the Profile to use to submit the job": "Select the Profile to use to submit the job", "Session for submitting JCL was null or undefined!": "Session for submitting JCL was null or undefined!", "Job submitted {0}/Job ID and set job command": { "message": "Job submitted {0}", - "comment": [ - "Job ID and set job command" - ] + "comment": ["Job ID and set job command"] }, "Job submitted {0} using profile {1}./Job IDProfile name": { "message": "Job submitted {0} using profile {1}.", - "comment": [ - "Job ID", - "Profile name" - ] + "comment": ["Job ID", "Profile name"] }, "Job submission failed.": "Job submission failed.", "Are you sure you want to submit the following job?\n\n{0}/JCL name": { "message": "Are you sure you want to submit the following job?\n\n{0}", - "comment": [ - "JCL name" - ] + "comment": ["JCL name"] }, "Cannot submit, item invalid.": "Cannot submit, item invalid.", "Job submitted {0} using profile {1}./Job IDSession name": { "message": "Job submitted {0} using profile {1}.", - "comment": [ - "Job ID", - "Session name" - ] + "comment": ["Job ID", "Session name"] }, "Cannot delete, item invalid.": "Cannot delete, item invalid.", "Error encountered when deleting data set. {0}/Stringified JSON error": { "message": "Error encountered when deleting data set. {0}", - "comment": [ - "Stringified JSON error" - ] + "comment": ["Stringified JSON error"] }, "Unable to find file {0}/Label": { "message": "Unable to find file {0}", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "Item invalid.": "Item invalid.", "Error encountered when refreshing data set view. {0}/Stringified JSON error": { "message": "Error encountered when refreshing data set view. {0}", - "comment": [ - "Stringified JSON error" - ] + "comment": ["Stringified JSON error"] }, "Search Data Sets: use a comma to separate multiple patterns": "Search Data Sets: use a comma to separate multiple patterns", "Prompted for a data set pattern, recieved {0}./Data Set pattern": { "message": "Prompted for a data set pattern, recieved {0}.", - "comment": [ - "Data Set pattern" - ] + "comment": ["Data Set pattern"] }, "Cannot perform the copy operation as the data sets selected have different types": "Cannot perform the copy operation as the data sets selected have different types", "Migration of data set {0} requested./Data Set name": { "message": "Migration of data set {0} requested.", - "comment": [ - "Data Set name" - ] + "comment": ["Data Set name"] }, "Recall of data set {0} requested./Data Set name": { "message": "Recall of data set {0} requested.", - "comment": [ - "Data Set name" - ] + "comment": ["Data Set name"] }, "Unable to gather more information": "Unable to gather more information", "Invalid paste. Copy data set(s) first.": "Invalid paste. Copy data set(s) first.", "Name of Data Set Member": "Name of Data Set Member", "Requested to save data set {0}/Document file name": { "message": "Requested to save data set {0}", - "comment": [ - "Document file name" - ] + "comment": ["Document file name"] }, "path.relative returned a non-blank directory. Assuming we are not in the DS_DIR directory: {0}/Relative path to Data Set directory": { "message": "path.relative returned a non-blank directory. Assuming we are not in the DS_DIR directory: {0}", - "comment": [ - "Relative path to Data Set directory" - ] + "comment": ["Relative path to Data Set directory"] }, "Could not locate session when saving data set.": "Could not locate session when saving data set.", "Could not find session node": "Could not find session node", "Saving file {0}/Label": { "message": "Saving file {0}", - "comment": [ - "Label" - ] + "comment": ["Label"] }, "Data set failed to save. Data set may have been deleted or renamed on mainframe.": "Data set failed to save. Data set may have been deleted or renamed on mainframe.", "Saving data set...": "Saving data set...", @@ -885,9 +678,7 @@ "Use the search button to display data sets": "Use the search button to display data sets", "Cannot access member with control characters in the name: {0}/Data Set member": { "message": "Cannot access member with control characters in the name: {0}", - "comment": [ - "Data Set member" - ] + "comment": ["Data Set member"] }, "No data sets found": "No data sets found", "$(plus) Create a new filter. For example: HLQ.*, HLQ.aaa.bbb, HLQ.ccc.ddd(member)": "$(plus) Create a new filter. For example: HLQ.*, HLQ.aaa.bbb, HLQ.ccc.ddd(member)", @@ -895,99 +686,68 @@ "No data set favorites found.": "No data set favorites found.", "Invalid Data Sets favorite: {0}. Please check formatting of the zowe.ds.history 'favorites' settings in the {1} user settings./Data Sets Favorite lineApplication name": { "message": "Invalid Data Sets favorite: {0}. Please check formatting of the zowe.ds.history 'favorites' settings in the {1} user settings.", - "comment": [ - "Data Sets Favorite line", - "Application name" - ] + "comment": ["Data Sets Favorite line", "Application name"] }, "Error creating data set favorite node: {0} for profile {1}./LabelProfile name": { "message": "Error creating data set favorite node: {0} for profile {1}.", - "comment": [ - "Label", - "Profile name" - ] + "comment": ["Label", "Profile name"] }, "Loading profile: {0} for data set favorites/Profile name": { "message": "Loading profile: {0} for data set favorites", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Error: You have Zowe Data Set favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Data Sets view.\n Would you like to do this now? {1}/Profile nameApplication name": { "message": "Error: You have Zowe Data Set favorites that refer to a non-existent CLI profile named: {0}.\n To resolve this, you can remove {0} from the Favorites section of Zowe Explorer's Data Sets view.\n Would you like to do this now? {1}", - "comment": [ - "Profile name", - "Application name" - ] + "comment": ["Profile name", "Application name"] }, "PDS already in favorites": "PDS already in favorites", "This will remove all favorited Data Sets items for profile {0}. Continue?/Profile name": { "message": "This will remove all favorited Data Sets items for profile {0}. Continue?", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Node does not exist. It may have been deleted.": "Node does not exist. It may have been deleted.", "Prompting the user for a data set pattern": "Prompting the user for a data set pattern", "Rename operation cancelled.": "Rename operation cancelled.", "Renaming data set {0}/Old Data Set name": { "message": "Renaming data set {0}", - "comment": [ - "Old Data Set name" - ] + "comment": ["Old Data Set name"] }, "Unable to rename data set:": "Unable to rename data set:", "all PDS members in {0}/Node label": { "message": "all PDS members in {0}", - "comment": [ - "Node label" - ] + "comment": ["Node label"] }, "the PDS members in {0}/Node label": { "message": "the PDS members in {0}", - "comment": [ - "Node label" - ] + "comment": ["Node label"] }, "Select a sorting option for {0}/Specifier": { "message": "Select a sorting option for {0}", - "comment": [ - "Specifier" - ] + "comment": ["Specifier"] }, "$(check) Sorting updated for {0}/Node label": { "message": "$(check) Sorting updated for {0}", - "comment": [ - "Node label" - ] + "comment": ["Node label"] }, "Filter: {0}/Filter value": { "message": "Filter: {0}", - "comment": [ - "Filter value" - ] + "comment": ["Filter value"] }, "$(clear-all) Clear filter for PDS": "$(clear-all) Clear filter for PDS", "Set a filter for {0}/Specifier": { "message": "Set a filter for {0}", - "comment": [ - "Specifier" - ] + "comment": ["Specifier"] }, "$(check) Filter cleared for {0}/Node label": { "message": "$(check) Filter cleared for {0}", - "comment": [ - "Node label" - ] + "comment": ["Node label"] }, "Invalid date format specified": "Invalid date format specified", "Enter a value to filter by": "Enter a value to filter by", "Invalid filter specified": "Invalid filter specified", "$(check) Filter updated for {0}/Node label": { "message": "$(check) Filter updated for {0}", - "comment": [ - "Node label" - ] + "comment": ["Node label"] }, "$(plus) Create a new Unix command": "$(plus) Create a new Unix command", "Zowe Unix Command": "Zowe Unix Command", @@ -998,9 +758,7 @@ "Operation cancelled.": "Operation cancelled.", "Not implemented yet for profile of type: {0}/Profile type": { "message": "Not implemented yet for profile of type: {0}", - "comment": [ - "Profile type" - ] + "comment": ["Profile type"] }, "Select the ssh Profile.": "Select the ssh Profile.", "No SSH profile found. Please create an SSH profile before issuing Unix commands.": "No SSH profile found. Please create an SSH profile before issuing Unix commands.", @@ -1008,21 +766,15 @@ "(An option to edit will follow)": "(An option to edit will follow)", "Select a Unix command to run against {0}/Current work directory": { "message": "Select a Unix command to run against {0}", - "comment": [ - "Current work directory" - ] + "comment": ["Current work directory"] }, "Select a Unix command to run against {0} (An option to edit will follow)/Current work directory": { "message": "Select a Unix command to run against {0} (An option to edit will follow)", - "comment": [ - "Current work directory" - ] + "comment": ["Current work directory"] }, "Select a Unix command to run immediately against {0}/Current work directory": { "message": "Select a Unix command to run immediately against {0}", - "comment": [ - "Current work directory" - ] + "comment": ["Current work directory"] }, "Enter or update the Unix command": "Enter or update the Unix command", "No command entered.": "No command entered.", @@ -1032,22 +784,16 @@ "Select the Profile to use to submit the TSO command": "Select the Profile to use to submit the TSO command", "Select a TSO command to run against {0}/Host name": { "message": "Select a TSO command to run against {0}", - "comment": [ - "Host name" - ] + "comment": ["Host name"] }, "No selection made.": "No selection made.", "Select a TSO command to run against {0} (An option to edit will follow)/Host name": { "message": "Select a TSO command to run against {0} (An option to edit will follow)", - "comment": [ - "Host name" - ] + "comment": ["Host name"] }, "Select a TSO command to run immediately against {0}/Host name": { "message": "Select a TSO command to run immediately against {0}", - "comment": [ - "Host name" - ] + "comment": ["Host name"] }, "Enter or update the TSO command": "Enter or update the TSO command", "TSO command submitted.": "TSO command submitted.", @@ -1061,35 +807,24 @@ "Select the Profile to use to submit the command": "Select the Profile to use to submit the command", "Select an MVS command to run against {0}/Host name": { "message": "Select an MVS command to run against {0}", - "comment": [ - "Host name" - ] + "comment": ["Host name"] }, "Select an MVS command to run against {0} (An option to edit will follow)/Host name": { "message": "Select an MVS command to run against {0} (An option to edit will follow)", - "comment": [ - "Host name" - ] + "comment": ["Host name"] }, "Select an MVS command to run immediately against {0}/Host name": { "message": "Select an MVS command to run immediately against {0}", - "comment": [ - "Host name" - ] + "comment": ["Host name"] }, "Enter or update the MVS command": "Enter or update the MVS command", "MVS command submitted.": "MVS command submitted.", "Profile Name {0} is inactive. Please check if your Zowe server is active or if the URL and port in your profile is correct./Profile name": { "message": "Profile Name {0} is inactive. Please check if your Zowe server is active or if the URL and port in your profile is correct.", - "comment": [ - "Profile name" - ] + "comment": ["Profile name"] }, "Failed to upload changes for {0}: {1}/Build file hyperlinkError message": { "message": "Failed to upload changes for {0}: {1}", - "comment": [ - "Build file hyperlink", - "Error message" - ] + "comment": ["Build file hyperlink", "Error message"] } -} \ No newline at end of file +} diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index 3404ad8906..590059b081 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -2066,7 +2066,7 @@ "pretty": "prettier --write .", "createTestProfileData": "ts-node ./scripts/createTestProfileData.ts", "createDemoNodes": "ts-node ./scripts/createDemoNodes.ts", - "generateLocalization": "npx @vscode/l10n-dev export --o ./l10n ./src" + "generateLocalization": "pnpm dlx @vscode/l10n-dev export --o ./l10n ./src" }, "engines": { "vscode": "^1.79.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7141ac94c..79e4a4383f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ importers: specifier: ^0.0.18 version: 0.0.18 "@zowe/cli": - specifier: 8.0.0-next.202401262128 - version: 8.0.0-next.202401262128 + specifier: 8.0.0-next.202402132108 + version: 8.0.0-next.202402132108 devDependencies: "@types/jest": specifier: ^29.2.3 @@ -246,8 +246,8 @@ importers: specifier: ^1.53.2 version: 1.84.1 "@zowe/cli": - specifier: 8.0.0-next.202401262128 - version: 8.0.0-next.202401262128 + specifier: 8.0.0-next.202402132108 + version: 8.0.0-next.202402132108 "@zowe/secrets-for-zowe-sdk": specifier: 7.18.6 version: 7.18.6 @@ -2512,41 +2512,41 @@ packages: resolution: { integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== } dev: true - /@zowe/cli@8.0.0-next.202401262128: - resolution: { integrity: sha512-d97joeZ7OlO/BiXYZz4z+u86Yp7Qvg7QHeIps+1pNk/+fT87IWRy+CCyfe4U/1zIsX/7q1TztGVxgTARMmwtmw== } + /@zowe/cli@8.0.0-next.202402132108: + resolution: { integrity: sha512-FUQomzW7cAC/vH0Ub3vNfgL8ao0igpA2Funpjgq95OOJzH1673Wf2FSiDXbkluQI5m1Slwrg538VDbi2Qo92QQ== } engines: { node: ">=14.0.0" } hasBin: true requiresBuild: true dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 - "@zowe/provisioning-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zos-console-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zos-files-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zos-jobs-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zos-logs-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zos-tso-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zos-uss-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zos-workflows-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/zosmf-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 + "@zowe/provisioning-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zos-console-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zos-files-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zos-jobs-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zos-logs-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zos-tso-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zos-uss-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zos-workflows-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/zosmf-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) find-process: 1.4.7 get-stream: 6.0.1 lodash: 4.17.21 minimatch: 5.0.1 tar: 6.1.14 optionalDependencies: - "@zowe/secrets-for-zowe-sdk": 8.0.0-next.202401262128 + "@zowe/secrets-for-zowe-sdk": 8.0.0-next.202402132108 transitivePeerDependencies: - bluebird - supports-color dev: false - /@zowe/core-for-zowe-sdk@8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-f4cyIfqYXYu5Uz9uiQtmuzjDCzP1q+DhiGEoGOrWUHHLFOPw1syvJsv+rx5pCZhMtf2nQv3TDUrYutpseg6d/Q== } + /@zowe/core-for-zowe-sdk@8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-IHjnqUKEYP/bgrla/imXTyLUnPuDsSpIEYZNKSpxA3R3ayhgGViwz6GRthmpRmCjQNaZDVqZ3KckUm8uZBFIJQ== } peerDependencies: "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/imperative": 8.0.0-next.202401262128 + "@zowe/imperative": 8.0.0-next.202402132108 comment-json: 4.1.1 string-width: 4.2.3 dev: false @@ -2596,8 +2596,8 @@ packages: - supports-color dev: false - /@zowe/imperative@8.0.0-next.202401262128: - resolution: { integrity: sha512-jMxIcntCipt3kaMb7A8Du3+7UeLQR0t4xvjQ97z/kbUTpsndI1p0W7FHzcghvGbUsjLSgrZpkX8++jd2vwFFEA== } + /@zowe/imperative@8.0.0-next.202402132108: + resolution: { integrity: sha512-uFoLtOTJM/g6dNKS7v4NCQnI8pfSG605I2dAHs7JbCNEnHkjmT71nnYDDsucyMUzxGX7wKoDC8kYWKG0G4d4JQ== } engines: { node: ">=14.0.0" } dependencies: "@types/yargs": 13.0.12 @@ -2628,7 +2628,6 @@ packages: prettyjson: 1.2.2 progress: 2.0.3 read: 1.0.7 - readline-sync: 1.4.10 semver: 7.5.4 stack-trace: 0.0.10 strip-ansi: 6.0.1 @@ -2641,14 +2640,14 @@ packages: - supports-color dev: false - /@zowe/provisioning-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-SP14RPJXF16nRgzmYLlVecqbAmXZPI9vcPRyVDatr0rNYPuT4Ffo89YfClLN2mZ2AL46eEpIDMX0nMEv5NByRg== } + /@zowe/provisioning-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-rqGSNdqR71UNr+9TlLleQrLPR3jODI57C0IttRz9czH8KP4+pumo9HTGraIXktpAgVvXdJDkzx/hDrWFgcoXjw== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 js-yaml: 4.1.0 dev: false @@ -2658,31 +2657,31 @@ packages: requiresBuild: true dev: false - /@zowe/secrets-for-zowe-sdk@8.0.0-next.202401262128: - resolution: { integrity: sha512-uCQx1L6oJevLTMfIKH8s8w4OAUyERlJtB+vvnb4yiG9a149FTe/mILJpOLDfwd7JCYgu9mpCFKU+o3y+napRnQ== } + /@zowe/secrets-for-zowe-sdk@8.0.0-next.202402132108: + resolution: { integrity: sha512-7bZJv9TqvBt3Ef8KGHAK5jYcbyzJCBbOdPCE394rPRt7qXb66omEbXp92ximLeAK+lHRhdqv/FqxoHMNG/gNtw== } engines: { node: ">= 14" } requiresBuild: true dev: false optional: true - /@zowe/zos-console-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-CHz0mfUY8zvx1oosiD9BSR6yP492YbtBlJlVjBEHLWdrjgdd3pypy6NhhWAnxt8nJeZh2Z+ODJhMT6EpjG6npA== } + /@zowe/zos-console-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-XxH0+zWvrQjRnqPMw0XjfJ0RN0YnmHTrSJeiFKmUOGwMJVyAm0KaiCEhzx20EyC/vUWl1c8yNgEt3YP+fJYUvA== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 dev: false - /@zowe/zos-files-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-QE6X/HUtPuF/n0LaHABUAD8zZ9CzPI1F134LvfCCH0pY4N7jEOqF3fnbHWOZhWw/tzcH+ZwmvTWpVJtkOW7KAg== } + /@zowe/zos-files-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-j1HJLcCkRIzcynHBNQbf3mb7A8/an9yOgvhb2i+aqUcgsCOTIeMmhs8USMUCdPdp95vyqsBp/A7aXjFiAOy5Pw== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 get-stream: 6.0.1 minimatch: 5.1.6 dev: false @@ -2698,66 +2697,66 @@ packages: - supports-color dev: false - /@zowe/zos-jobs-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-8tq7QioVaHypeapnk5TN2rAqLHSbO5kCHR6IeGiz0OOHr4LW3lgd6xtjf0m8pSTJZ6lvbMkW8McupqsWk9BYIA== } + /@zowe/zos-jobs-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-s/eCFzSvzcJX8adCAw+Lg4beswTqdv8qboaC6EFURqp8Syv38vHFIUOmTkVXmzxWGH8mdtpRgLdrEG9sQwLukg== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 - "@zowe/zos-files-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 + "@zowe/zos-files-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) dev: false - /@zowe/zos-logs-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-5Cv+X3oPyZqEOQBI9i/+gNFEhHIunrUurBWCSCtPWDtCf0+uoFc1kJJi9MRcAb3A9CTnv8pO1IuXfSTWPMe9qw== } + /@zowe/zos-logs-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-oYegWcaz3hBublykVY6dc1k7IR3l3l2qGj0WUvDylhWzhpguX9FKX5NGwtjAY1u6nG8z6QFyWwphYT9zBs8MmQ== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 dev: false - /@zowe/zos-tso-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-NH6XGZx1+JdA2lcH/AFTaI/7ij4nm86xTIUZDr3Ttzs47BvDzAvmNq8oJM4Jyzumb9/Ubh5kBpHFzegpVwrfVA== } + /@zowe/zos-tso-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-aM1qELt1D/5ifv2kHukCcEHjb36N75OTThNWX4Tf2Nkjq6Ud+I/RsmjZIdaTu0MiZxrdWeuDWMYBenO63tkPXA== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 - "@zowe/zosmf-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 + "@zowe/zosmf-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) dev: false - /@zowe/zos-uss-for-zowe-sdk@8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-FZgsHvlr+jy/WdksMlLUtIK5znc+XI0DeeAm0wypbx5aFzI0XPajyBf7pQol7V+Etws8FpwaNqkbtdmblivsDg== } + /@zowe/zos-uss-for-zowe-sdk@8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-eTx6ZpqS2WvWN158Fr+pPS39H4USGlghPVZa84AP5CGejcbJsmw7vGg2GWTDv6L305cftVtj2iE4GsIp00zJvQ== } peerDependencies: "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/imperative": 8.0.0-next.202401262128 + "@zowe/imperative": 8.0.0-next.202402132108 ssh2: 1.15.0 dev: false - /@zowe/zos-workflows-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-gdc30B8UueyzKjk7PdZLLPy8fpPinsD+UFJjQtiLCKntMoPov+vtbssRXLAaKTsGlOcimIX8rBSDriPY9VlOqw== } + /@zowe/zos-workflows-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-KsHMmV7Casz85YblOfEqHduh4QVJvd6hZVa040sJG5EWnVmZqGEqJdW1vzWpD0TDhYm3LAq+IGxVdT/6HLnsUA== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 - "@zowe/zos-files-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128) + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 + "@zowe/zos-files-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108) dev: false - /@zowe/zosmf-for-zowe-sdk@8.0.0-next.202401262128(@zowe/core-for-zowe-sdk@8.0.0-next.202401262128)(@zowe/imperative@8.0.0-next.202401262128): - resolution: { integrity: sha512-TlgWuBoyCCQnnRUsbQ3boMXK0HIseAAAFgQmJPOeQIFu1ZUAje4EBOWSsn4suhWvTp2OisPyDvH/PAYH6ZR2Yw== } + /@zowe/zosmf-for-zowe-sdk@8.0.0-next.202402132108(@zowe/core-for-zowe-sdk@8.0.0-next.202402132108)(@zowe/imperative@8.0.0-next.202402132108): + resolution: { integrity: sha512-2QllM70aoaqmxgkUCv/DsNDUQoiSusQYgRWpDBJk6nGHBXFuNadK3b+gaK7ExXjBJ8olnWs+j7/BRbk8bter6A== } peerDependencies: "@zowe/core-for-zowe-sdk": ^8.0.0-next "@zowe/imperative": ^8.0.0-next dependencies: - "@zowe/core-for-zowe-sdk": 8.0.0-next.202401262128(@zowe/imperative@8.0.0-next.202401262128) - "@zowe/imperative": 8.0.0-next.202401262128 + "@zowe/core-for-zowe-sdk": 8.0.0-next.202402132108(@zowe/imperative@8.0.0-next.202402132108) + "@zowe/imperative": 8.0.0-next.202402132108 dev: false /abab@2.0.6: @@ -5365,7 +5364,7 @@ packages: foreground-child: 3.1.1 jackspeak: 2.3.6 minimatch: 9.0.3 - minipass: 5.0.0 + minipass: 7.0.4 path-scurry: 1.10.1 /glob@7.2.0: @@ -5829,8 +5828,12 @@ packages: engines: { node: ">=10.13.0" } dev: true - /ip@2.0.0: - resolution: { integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== } + /ip-address@9.0.5: + resolution: { integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== } + engines: { node: ">= 12" } + dependencies: + jsbn: 1.1.0 + sprintf-js: 1.1.3 dev: false /is-accessor-descriptor@1.0.1: @@ -6698,6 +6701,10 @@ packages: dependencies: argparse: 2.0.1 + /jsbn@1.1.0: + resolution: { integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== } + dev: false + /jsdom@16.7.0: resolution: { integrity: sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== } engines: { node: ">=10" } @@ -7411,11 +7418,11 @@ packages: /minipass@5.0.0: resolution: { integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== } engines: { node: ">=8" } + dev: false /minipass@7.0.4: resolution: { integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== } engines: { node: ">=16 || 14 >=14.17" } - dev: false /minizlib@2.1.2: resolution: { integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== } @@ -8231,7 +8238,7 @@ packages: engines: { node: ">=16 || 14 >=14.17" } dependencies: lru-cache: 10.1.0 - minipass: 5.0.0 + minipass: 7.0.4 /path-to-regexp@1.8.0: resolution: { integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== } @@ -9220,7 +9227,7 @@ packages: dependencies: agent-base: 6.0.2 debug: 4.3.4(supports-color@8.1.1) - socks: 2.7.1 + socks: 2.7.3 transitivePeerDependencies: - supports-color dev: false @@ -9231,16 +9238,16 @@ packages: dependencies: agent-base: 7.1.0 debug: 4.3.4(supports-color@8.1.1) - socks: 2.7.1 + socks: 2.7.3 transitivePeerDependencies: - supports-color dev: false - /socks@2.7.1: - resolution: { integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== } - engines: { node: ">= 10.13.0", npm: ">= 3.0.0" } + /socks@2.7.3: + resolution: { integrity: sha512-vfuYK48HXCTFD03G/1/zkIls3Ebr2YNa4qU9gHDZdblHLiqhJrJGkY3+0Nx0JpN9qBhJbVObc1CNciT1bIZJxw== } + engines: { node: ">= 10.0.0", npm: ">= 3.0.0" } dependencies: - ip: 2.0.0 + ip-address: 9.0.5 smart-buffer: 4.2.0 dev: false @@ -9326,6 +9333,10 @@ packages: /sprintf-js@1.0.3: resolution: { integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== } + /sprintf-js@1.1.3: + resolution: { integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== } + dev: false + /ssh2@1.15.0: resolution: { integrity: sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw== } engines: { node: ">=10.16.0" } diff --git a/samples/uss-profile-sample/package.json b/samples/uss-profile-sample/package.json index 79878935df..5fe985ef9c 100644 --- a/samples/uss-profile-sample/package.json +++ b/samples/uss-profile-sample/package.json @@ -33,7 +33,7 @@ "watch": "tsc -watch -p ./" }, "dependencies": { - "@zowe/cli": "8.0.0-next.202401262128", + "@zowe/cli": "8.0.0-next.202402132108", "@zowe/zowe-explorer-api": "file:../../packages/zowe-explorer-api", "ssh2-sftp-client": "^9.1.0" }, From e527c1e3c2a6ff255d1ae34c67ca81cae60e0ce0 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:49:10 +0000 Subject: [PATCH 7/9] update changelogs Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- packages/eslint-plugin-zowe-explorer/CHANGELOG.md | 4 +++- packages/zowe-explorer-api/CHANGELOG.md | 3 +-- packages/zowe-explorer-ftp-extension/CHANGELOG.md | 1 + packages/zowe-explorer/CHANGELOG.md | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md index 82cd0b6b79..80fd8ab12d 100644 --- a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md +++ b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md @@ -1,11 +1,13 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documented in this file. -## `3.0.0-next.202401241448` +## TBD Release ### New features and enhancements ### Bug fixes +## `3.0.0-next.202401241448` + ## `3.0.0-next.202401121747` ## `3.0.0-next.202311171754` diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index ed0b6f40e1..ad3cb7ef7f 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -16,9 +16,8 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t ### Bug fixes -### Bug fixes - - Fix login and logout operations when APIML dynamic tokens are enabled. [#2692](https://github.com/zowe/vscode-extension-for-zowe/pull/2692) +- Updated dependencies for technical currency purposes. ## `3.0.0-next.202402071248` diff --git a/packages/zowe-explorer-ftp-extension/CHANGELOG.md b/packages/zowe-explorer-ftp-extension/CHANGELOG.md index a206a893f6..781c76c22b 100644 --- a/packages/zowe-explorer-ftp-extension/CHANGELOG.md +++ b/packages/zowe-explorer-ftp-extension/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum ## Bug fixes - Fix Windows-specific hangs when saving members that contain JCL via the FTP extension. Thanks @tiantn & @std4lqi. [#2533](https://github.com/zowe/vscode-extension-for-zowe/issues/2533) +- Updated dependencies for technical currency purposes. ## `3.0.0-next.202402071248` diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 8562ceb54b..ddbfcc6ca8 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -11,6 +11,8 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen ### Bug fixes +- Updated dependencies for technical currency purposes. + ## `3.0.0-next.202402071248` ### New features and enhancements From 2d8fdf5e93cb415fbaa69032290f36fc80f0e532 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:53:28 +0000 Subject: [PATCH 8/9] update FTP extension and tests Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- .../__unit__/logger/IZoweLogger.unit.test.ts | 6 +- .../ZoweExplorerZosmfApi.unit.test.ts | 2 +- .../__unit__/security/KeytarApi.unit.test.ts | 16 +- .../ZoweExplorerAbstractFtpApi.unit.test.ts | 15 +- .../Jes/ZoweExplorerFtpJesApi.unit.test.ts | 36 +-- .../Mvs/ZoweExplorerFtpMvsApi.unit.test.ts | 40 +-- .../Uss/ZoweExplorerFtpUssApi.unit.test.ts | 42 +-- .../__tests__/__unit__/extension.unit.test.ts | 8 +- .../__unit__/ftpSession.unit.test.ts | 6 +- .../src/ZoweExplorerFtpJesApi.ts | 6 +- .../__unit__/PersistentFilters.unit.test.ts | 2 +- .../__unit__/Profiles.extended.unit.test.ts | 78 +++--- .../ZoweExplorerExtender.unit.test.ts | 2 +- .../abstract/ZoweCommandProvider.unit.test.ts | 2 +- .../abstract/ZoweTreeProvider.unit.test.ts | 34 +-- .../api/ZoweExplorerZosmfApi.unit.test.ts | 2 +- .../__unit__/dataset/DatasetTree.unit.test.ts | 32 +-- .../dataset/ZoweDatasetNode.unit.test.ts | 32 +-- .../__unit__/dataset/actions.unit.test.ts | 249 +++++++++--------- .../__tests__/__unit__/globals.unit.test.ts | 4 +- .../__unit__/job/ZosJobsProvider.unit.test.ts | 8 +- .../__unit__/job/ZoweJobNode.unit.test.ts | 2 +- .../__unit__/job/actions.unit.test.ts | 126 ++++----- .../__unit__/mvs/mvsNodeActions.unit.test.ts | 24 +- .../__unit__/shared/HistoryView.unit.test.ts | 20 +- .../__unit__/shared/actions.unit.test.ts | 18 +- .../__unit__/shared/utils.unit.test.ts | 10 +- .../__unit__/uss/USSTree.unit.test.ts | 18 +- .../__unit__/uss/ZoweUSSNode.unit.test.ts | 18 +- .../__unit__/uss/actions.unit.test.ts | 46 ++-- .../utils/LocalFileManagement.unit.test.ts | 24 +- .../__unit__/utils/LoggerUtils.unit.test.ts | 8 +- .../utils/ProfileManagement.unit.test.ts | 78 +++--- .../__unit__/utils/ProfilesUtils.unit.test.ts | 92 +++---- .../__unit__/utils/SessionUtils.unit.test.ts | 4 +- .../utils/SettingsConfig.unit.test.ts | 6 +- .../__unit__/utils/TempFolder.unit.test.ts | 12 +- 37 files changed, 575 insertions(+), 553 deletions(-) diff --git a/packages/zowe-explorer-api/__tests__/__unit__/logger/IZoweLogger.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/logger/IZoweLogger.unit.test.ts index 8c3dbddfcd..dba907962c 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/logger/IZoweLogger.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/logger/IZoweLogger.unit.test.ts @@ -23,14 +23,14 @@ describe("IZoweLogger", () => { const loggerSpy = jest.spyOn(logger.getImperativeLogger() as any, methodName); const logMessage = methodName.split("").reverse().join(""); logger.logImperativeMessage(logMessage, severity); - expect(loggerSpy).toBeCalledWith(`[${extensionName}] ${logMessage}`); + expect(loggerSpy).toHaveBeenCalledWith(`[${extensionName}] ${logMessage}`); }; it("should use extension name and logging path", () => { const initLoggerSpy = jest.spyOn(imperative.Logger, "initLogger"); const testLogger = new IZoweLogger(extensionName, loggingPath); expect(testLogger.getExtensionName()).toBe(extensionName); - expect(initLoggerSpy).toBeCalledWith(loggerConfig); + expect(initLoggerSpy).toHaveBeenCalledWith(loggerConfig); expect(Object.values(loggerConfig.log4jsConfig.appenders).every((appender) => appender.filename.startsWith(loggingPath))).toBe(true); }); @@ -69,7 +69,7 @@ describe("IZoweLogger", () => { const loggerSpy = jest.spyOn(testLogger.getImperativeLogger(), "debug"); const logMessage = "i haz error"; testLogger.logImperativeMessage(logMessage); - expect(loggerSpy).toBeCalledWith(`[${extensionName}] ${logMessage}`); + expect(loggerSpy).toHaveBeenCalledWith(`[${extensionName}] ${logMessage}`); }); it("should fail to log Imperative message with invalid severity", () => { diff --git a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts index 131493c939..4c4f31d55c 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/profiles/ZoweExplorerZosmfApi.unit.test.ts @@ -307,7 +307,7 @@ describe("ZosmfUssApi", () => { configurable: true, }); await expect(zosmfApi.updateAttributes("/test/path", { tag: "utf-8" })).resolves.not.toThrow(); - expect(changeTagSpy).toBeCalledTimes(1); + expect(changeTagSpy).toHaveBeenCalledTimes(1); }); const ussApis: ITestApi[] = [ diff --git a/packages/zowe-explorer-api/__tests__/__unit__/security/KeytarApi.unit.test.ts b/packages/zowe-explorer-api/__tests__/__unit__/security/KeytarApi.unit.test.ts index 85be699cc1..1dcd5600e7 100644 --- a/packages/zowe-explorer-api/__tests__/__unit__/security/KeytarApi.unit.test.ts +++ b/packages/zowe-explorer-api/__tests__/__unit__/security/KeytarApi.unit.test.ts @@ -25,29 +25,29 @@ describe("KeytarApi", () => { isCredsSecuredSpy.mockReturnValueOnce(true); credMgrInitializeSpy.mockResolvedValueOnce(); await new KeytarApi(undefined as unknown as imperative.Logger).activateKeytar(false, false); - expect(isCredsSecuredSpy).toBeCalledTimes(1); - expect(credMgrInitializeSpy).toBeCalledTimes(1); + expect(isCredsSecuredSpy).toHaveBeenCalledTimes(1); + expect(credMgrInitializeSpy).toHaveBeenCalledTimes(1); }); it("should do nothing if secure credential plugin is not active", async () => { isCredsSecuredSpy.mockReturnValueOnce(false); await new KeytarApi(undefined as unknown as imperative.Logger).activateKeytar(false, false); - expect(isCredsSecuredSpy).toBeCalledTimes(1); - expect(credMgrInitializeSpy).not.toBeCalled(); + expect(isCredsSecuredSpy).toHaveBeenCalledTimes(1); + expect(credMgrInitializeSpy).not.toHaveBeenCalled(); }); it("should do nothing if API has already been initialized", async () => { isCredsSecuredSpy.mockReturnValueOnce(true); await new KeytarApi(undefined as unknown as imperative.Logger).activateKeytar(true, false); - expect(isCredsSecuredSpy).toBeCalledTimes(1); - expect(credMgrInitializeSpy).not.toBeCalled(); + expect(isCredsSecuredSpy).toHaveBeenCalledTimes(1); + expect(credMgrInitializeSpy).not.toHaveBeenCalled(); }); it("should do nothing if Keytar module is missing", async () => { jest.mock("@zowe/secrets-for-zowe-sdk", () => {}); isCredsSecuredSpy.mockReturnValueOnce(true); await new KeytarApi(undefined as unknown as imperative.Logger).activateKeytar(false, false); - expect(isCredsSecuredSpy).toBeCalledTimes(1); - expect(credMgrInitializeSpy).not.toBeCalled(); + expect(isCredsSecuredSpy).toHaveBeenCalledTimes(1); + expect(credMgrInitializeSpy).not.toHaveBeenCalled(); }); }); diff --git a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/FtpApi/ZoweExplorerAbstractFtpApi.unit.test.ts b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/FtpApi/ZoweExplorerAbstractFtpApi.unit.test.ts index 71563c4044..357445fab7 100644 --- a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/FtpApi/ZoweExplorerAbstractFtpApi.unit.test.ts +++ b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/FtpApi/ZoweExplorerAbstractFtpApi.unit.test.ts @@ -47,7 +47,7 @@ describe("AbstractFtpApi", () => { await instance.logout(session); - expect(session.releaseConnections).toBeCalledTimes(1); + expect(session.releaseConnections).toHaveBeenCalledTimes(1); expect(globals.SESSION_MAP.size).toBe(0); }); @@ -125,10 +125,13 @@ describe("AbstractFtpApi", () => { failNotFound: true, }; try { - expect(Gui.showMessage).toBeCalledWith("Internal error: ZoweVscFtpRestApi instance was not initialized with a valid Zowe profile.", { - severity: MessageSeverity.FATAL, - logger: globals.LOGGER, - }); + expect(Gui.showMessage).toHaveBeenCalledWith( + "Internal error: ZoweVscFtpRestApi instance was not initialized with a valid Zowe profile.", + { + severity: MessageSeverity.FATAL, + logger: globals.LOGGER, + } + ); instance.checkedProfile(); } catch (err) { expect(err).not.toBeUndefined(); @@ -186,7 +189,7 @@ describe("AbstractFtpApi", () => { instance.releaseConnection({ close: connectionMock, }); - expect(connectionMock).toBeCalledTimes(1); + expect(connectionMock).toHaveBeenCalledTimes(1); }); it("should return the profile type of 'zftp'", () => { diff --git a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Jes/ZoweExplorerFtpJesApi.unit.test.ts b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Jes/ZoweExplorerFtpJesApi.unit.test.ts index 8690ec29c2..abb052bcdc 100644 --- a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Jes/ZoweExplorerFtpJesApi.unit.test.ts +++ b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Jes/ZoweExplorerFtpJesApi.unit.test.ts @@ -48,7 +48,7 @@ describe("FtpJesApi", () => { const result = await JesApi.getJobsByParameters(mockParams); expect(result[0].jobname).toContain("JOB1"); - expect(JobUtils.listJobs).toBeCalledTimes(1); + expect(JobUtils.listJobs).toHaveBeenCalledTimes(1); expect(JesApi.releaseConnection).toHaveBeenCalledTimes(0); }); @@ -61,8 +61,8 @@ describe("FtpJesApi", () => { const result = await JesApi.getJob(mockParams.jobid); expect(result.jobname).toContain("JOB1"); - expect(JobUtils.findJobByID).toBeCalledTimes(1); - expect(JesApi.releaseConnection).toBeCalled(); + expect(JobUtils.findJobByID).toHaveBeenCalledTimes(1); + expect(JesApi.releaseConnection).toHaveBeenCalled(); }); it("should get spoolfiles.", async () => { @@ -75,26 +75,26 @@ describe("FtpJesApi", () => { const result = await JesApi.getSpoolFiles(mockParams.jobname, mockParams.jobid); expect(result[0].id).toContain("1"); - expect(JobUtils.findJobByID).toBeCalledTimes(1); - expect(JesApi.releaseConnection).toBeCalled(); + expect(JobUtils.findJobByID).toHaveBeenCalledTimes(1); + expect(JesApi.releaseConnection).toHaveBeenCalled(); }); it("should download spool content.", async () => { const jobDetails = { jobid: "123", jobname: "JOB1", spoolFiles: [{ id: "1" }, { id: "2" }] }; JobUtils.findJobByID = jest.fn().mockReturnValue(jobDetails); JobUtils.getSpoolFiles = jest.fn().mockReturnValue(jobDetails.spoolFiles); - DownloadJobs.getSpoolDownloadFile = jest.fn().mockReturnValue("/tmp/file1"); + DownloadJobs.getSpoolDownloadFilePath = jest.fn().mockReturnValue("/tmp/file1"); imperative.IO.writeFile = jest.fn(); const mockParams = { parms: { jobname: "JOB1", jobid: "123", outDir: "/a/b/c" }, }; await JesApi.downloadSpoolContent(mockParams.parms); - expect(JobUtils.findJobByID).toBeCalledTimes(1); - expect(JobUtils.getSpoolFiles).toBeCalledTimes(1); - expect(DownloadJobs.getSpoolDownloadFile).toBeCalledTimes(2); - expect(imperative.IO.writeFile).toBeCalledTimes(2); - expect(JesApi.releaseConnection).toBeCalled(); + expect(JobUtils.findJobByID).toHaveBeenCalledTimes(1); + expect(JobUtils.getSpoolFiles).toHaveBeenCalledTimes(1); + expect(DownloadJobs.getSpoolDownloadFilePath).toHaveBeenCalledTimes(2); + expect(imperative.IO.writeFile).toHaveBeenCalledTimes(2); + expect(JesApi.releaseConnection).toHaveBeenCalled(); }); it("should throw an error when downloading spool content if no spool files are available.", async () => { @@ -115,8 +115,8 @@ describe("FtpJesApi", () => { await JesApi.getSpoolContentById(mockParams.jobname, mockParams.jobid, mockParams.spoolID); expect((response._readableState.buffer.head?.data ?? response._readableState.buffer).toString()).toContain("Hello world"); - expect(JobUtils.getSpoolFileContent).toBeCalledTimes(1); - expect(JesApi.releaseConnection).toBeCalled(); + expect(JobUtils.getSpoolFileContent).toHaveBeenCalledTimes(1); + expect(JesApi.releaseConnection).toHaveBeenCalled(); }); it("should submit job.", async () => { @@ -129,9 +129,9 @@ describe("FtpJesApi", () => { }; const result = await JesApi.submitJob(mockParams.jobDataSet); expect(result.jobid).toContain("123"); - expect(JobUtils.submitJob).toBeCalledTimes(1); - expect(DataSetUtils.downloadDataSet).toBeCalledTimes(1); - expect(JesApi.releaseConnection).toBeCalled(); + expect(JobUtils.submitJob).toHaveBeenCalledTimes(1); + expect(DataSetUtils.downloadDataSet).toHaveBeenCalledTimes(1); + expect(JesApi.releaseConnection).toHaveBeenCalled(); }); it("should delete job.", async () => { @@ -141,8 +141,8 @@ describe("FtpJesApi", () => { jobid: "123", }; await JesApi.deleteJob(mockParams.jobname, mockParams.jobid); - expect(JobUtils.deleteJob).toBeCalledTimes(1); - expect(JesApi.releaseConnection).toBeCalled(); + expect(JobUtils.deleteJob).toHaveBeenCalledTimes(1); + expect(JesApi.releaseConnection).toHaveBeenCalled(); }); it("should throw error when list jobs by owner and prefix failed.", async () => { diff --git a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Mvs/ZoweExplorerFtpMvsApi.unit.test.ts b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Mvs/ZoweExplorerFtpMvsApi.unit.test.ts index bda316bb7d..00e1990f51 100644 --- a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Mvs/ZoweExplorerFtpMvsApi.unit.test.ts +++ b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Mvs/ZoweExplorerFtpMvsApi.unit.test.ts @@ -60,7 +60,7 @@ describe("FtpMvsApi", () => { const result = await MvsApi.dataSet(mockParams.filter); expect(result.apiResponse.items[0].dsname).toContain("IBMUSER.DS1"); - expect(DataSetUtils.listDataSets).toBeCalledTimes(1); + expect(DataSetUtils.listDataSets).toHaveBeenCalledTimes(1); expect(MvsApi.releaseConnection).toHaveBeenCalledTimes(0); }); @@ -73,8 +73,8 @@ describe("FtpMvsApi", () => { const result = await MvsApi.allMembers(mockParams.dataSetName); expect(result.apiResponse.items[0].member).toContain("M1"); - expect(DataSetUtils.listMembers).toBeCalledTimes(1); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.listMembers).toHaveBeenCalledTimes(1); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should view dataset content.", async () => { @@ -92,8 +92,8 @@ describe("FtpMvsApi", () => { const result = await MvsApi.getContents(mockParams.dataSetName, mockParams.options); expect(result.apiResponse.etag).toHaveLength(40); - expect(DataSetUtils.downloadDataSet).toBeCalledTimes(1); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.downloadDataSet).toHaveBeenCalledTimes(1); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); expect((response._readableState.buffer.head?.data ?? response._readableState.buffer).toString()).toContain("Hello world"); }); @@ -120,9 +120,9 @@ describe("FtpMvsApi", () => { jest.spyOn(Gui, "warningMessage").mockImplementation(); const result = await MvsApi.putContents(mockParams.inputFilePath, mockParams.dataSetName, mockParams.options); expect(result.commandResponse).toContain("Data set uploaded successfully."); - expect(DataSetUtils.listDataSets).toBeCalledTimes(1); - expect(DataSetUtils.uploadDataSet).toBeCalledTimes(1); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.listDataSets).toHaveBeenCalledTimes(1); + expect(DataSetUtils.uploadDataSet).toHaveBeenCalledTimes(1); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); // check that correct function is called from node-tmp expect(tmpNameSyncSpy).toHaveBeenCalled(); expect(rmSyncSpy).toHaveBeenCalled(); @@ -162,7 +162,7 @@ describe("FtpMvsApi", () => { }); // ensure options object at runtime does not have localFile expect(Object.keys(uploadDataSetMock.mock.calls[0][2]).find((k) => k === "localFile")).toBe(undefined); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should upload single space to dataset when secureFtp is true and contents are empty", async () => { @@ -199,7 +199,7 @@ describe("FtpMvsApi", () => { }); // ensure options object at runtime does not have localFile expect(Object.keys(uploadDataSetMock.mock.calls[0][2]).find((k) => k === "localFile")).toBe(undefined); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should create dataset.", async () => { @@ -220,8 +220,8 @@ describe("FtpMvsApi", () => { secondary: 2, }); expect(result.commandResponse).toContain("Data set created successfully."); - expect(DataSetUtils.allocateDataSet).toBeCalledTimes(1); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.allocateDataSet).toHaveBeenCalledTimes(1); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should create dataset if no options are passed in", async () => { @@ -233,8 +233,8 @@ describe("FtpMvsApi", () => { }; const result = await MvsApi.createDataSet(mockParams.dataSetType, mockParams.dataSetName); expect(result.commandResponse).toContain("Data set created successfully."); - expect(DataSetUtils.allocateDataSet).toBeCalledTimes(1); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.allocateDataSet).toHaveBeenCalledTimes(1); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should create dataset member.", async () => { @@ -246,8 +246,8 @@ describe("FtpMvsApi", () => { }; const result = await MvsApi.createDataSetMember(mockParams.dataSetName, mockParams.options); expect(result.commandResponse).toContain("Member created successfully."); - expect(DataSetUtils.uploadDataSet).toBeCalledTimes(1); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.uploadDataSet).toHaveBeenCalledTimes(1); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should fail to call getContents if an exception occurs in FtpClient.", async () => { @@ -275,8 +275,8 @@ describe("FtpMvsApi", () => { const result = await MvsApi.renameDataSet(mockParams.currentDataSetName, mockParams.newDataSetName); await MvsApi.renameDataSetMember(mockParams.dataSetName, mockParams.currentMemberName, mockParams.newMemberName); expect(result.commandResponse).toContain("Rename completed successfully."); - expect(DataSetUtils.renameDataSet).toBeCalledTimes(2); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.renameDataSet).toHaveBeenCalledTimes(2); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should delete dataset.", async () => { @@ -286,8 +286,8 @@ describe("FtpMvsApi", () => { }; const result = await MvsApi.deleteDataSet(mockParams.dataSetName); expect(result.commandResponse).toContain("Delete completed successfully."); - expect(DataSetUtils.deleteDataSet).toBeCalledTimes(1); - expect(MvsApi.releaseConnection).toBeCalled(); + expect(DataSetUtils.deleteDataSet).toHaveBeenCalledTimes(1); + expect(MvsApi.releaseConnection).toHaveBeenCalled(); }); it("should throw an error when copyDataSet is called", async () => { diff --git a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Uss/ZoweExplorerFtpUssApi.unit.test.ts b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Uss/ZoweExplorerFtpUssApi.unit.test.ts index fdf5385d71..249e445292 100644 --- a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Uss/ZoweExplorerFtpUssApi.unit.test.ts +++ b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/Uss/ZoweExplorerFtpUssApi.unit.test.ts @@ -58,7 +58,7 @@ describe("FtpUssApi", () => { const result = await UssApi.fileList(mockParams.ussFilePath); expect(result.apiResponse.items[0].name).toContain("file1"); - expect(UssUtils.listFiles).toBeCalledTimes(1); + expect(UssUtils.listFiles).toHaveBeenCalledTimes(1); expect(UssApi.releaseConnection).toHaveBeenCalledTimes(0); }); @@ -76,8 +76,8 @@ describe("FtpUssApi", () => { const result = await UssApi.getContents(mockParams.ussFilePath, mockParams.options); expect(result.apiResponse.etag).toHaveLength(40); - expect(UssUtils.downloadFile).toBeCalledTimes(1); - expect(UssApi.releaseConnection).toBeCalled(); + expect(UssUtils.downloadFile).toHaveBeenCalledTimes(1); + expect(UssApi.releaseConnection).toHaveBeenCalled(); expect((response._readableState.buffer.head?.data ?? response._readableState.buffer).toString()).toContain("Hello world"); }); @@ -114,9 +114,9 @@ describe("FtpUssApi", () => { }); jest.spyOn(UssApi as any, "getContentsTag").mockReturnValue("test"); expect(result.commandResponse).toContain("File uploaded successfully."); - expect(UssUtils.downloadFile).toBeCalledTimes(1); - expect(UssUtils.uploadFile).toBeCalledTimes(1); - expect(UssApi.releaseConnection).toBeCalled(); + expect(UssUtils.downloadFile).toHaveBeenCalledTimes(1); + expect(UssUtils.uploadFile).toHaveBeenCalledTimes(1); + expect(UssApi.releaseConnection).toHaveBeenCalled(); // check that correct function is called from node-tmp expect(tmpNameSyncSpy).toHaveBeenCalled(); expect(rmSyncSpy).toHaveBeenCalled(); @@ -134,7 +134,7 @@ describe("FtpUssApi", () => { const response = {}; jest.spyOn(UssApi, "putContent").mockResolvedValue(response as any); await UssApi.uploadDirectory(mockParams.inputDirectoryPath, mockParams.ussDirectoryPath, mockParams.options); - expect(UssApi.putContent).toBeCalledTimes(3); + expect(UssApi.putContent).toHaveBeenCalledTimes(3); }); it("should create uss directory.", async () => { @@ -146,9 +146,9 @@ describe("FtpUssApi", () => { }; const result = await UssApi.create(mockParams.ussPath, mockParams.type); expect(result.commandResponse).toContain("Directory or file created."); - expect(UssUtils.makeDirectory).toBeCalledTimes(1); - expect(UssUtils.uploadFile).not.toBeCalled(); - expect(UssApi.releaseConnection).toBeCalled(); + expect(UssUtils.makeDirectory).toHaveBeenCalledTimes(1); + expect(UssUtils.uploadFile).not.toHaveBeenCalled(); + expect(UssApi.releaseConnection).toHaveBeenCalled(); }); it("should create uss file.", async () => { @@ -160,9 +160,9 @@ describe("FtpUssApi", () => { }; const result = await UssApi.create(mockParams.ussPath, mockParams.type); expect(result.commandResponse).toContain("Directory or file created."); - expect(UssUtils.uploadFile).toBeCalledTimes(1); - expect(UssUtils.makeDirectory).not.toBeCalled(); - expect(UssApi.releaseConnection).toBeCalled(); + expect(UssUtils.uploadFile).toHaveBeenCalledTimes(1); + expect(UssUtils.makeDirectory).not.toHaveBeenCalled(); + expect(UssApi.releaseConnection).toHaveBeenCalled(); }); it("should delete uss directory with recursive.", async () => { @@ -174,9 +174,9 @@ describe("FtpUssApi", () => { }; const result = await UssApi.delete(mockParams.ussPath, mockParams.recursive); expect(result.commandResponse).toContain("Delete completed."); - expect(UssUtils.deleteDirectory).toBeCalledTimes(1); - expect(UssUtils.deleteFile).not.toBeCalled(); - expect(UssApi.releaseConnection).toBeCalled(); + expect(UssUtils.deleteDirectory).toHaveBeenCalledTimes(1); + expect(UssUtils.deleteFile).not.toHaveBeenCalled(); + expect(UssApi.releaseConnection).toHaveBeenCalled(); }); it("should delete uss file.", async () => { @@ -188,9 +188,9 @@ describe("FtpUssApi", () => { }; const result = await UssApi.delete(mockParams.ussPath, mockParams.recursive); expect(result.commandResponse).toContain("Delete completed."); - expect(UssUtils.deleteFile).toBeCalledTimes(1); - expect(UssUtils.deleteDirectory).not.toBeCalled(); - expect(UssApi.releaseConnection).toBeCalled(); + expect(UssUtils.deleteFile).toHaveBeenCalledTimes(1); + expect(UssUtils.deleteDirectory).not.toHaveBeenCalled(); + expect(UssApi.releaseConnection).toHaveBeenCalled(); }); it("should rename uss file or directory.", async () => { @@ -201,8 +201,8 @@ describe("FtpUssApi", () => { }; const result = await UssApi.rename(mockParams.currentUssPath, mockParams.newUssPath); expect(result.commandResponse).toContain("Rename completed."); - expect(UssUtils.renameFile).toBeCalledTimes(1); - expect(UssApi.releaseConnection).toBeCalled(); + expect(UssUtils.renameFile).toHaveBeenCalledTimes(1); + expect(UssApi.releaseConnection).toHaveBeenCalled(); }); it("should receive false from isFileTagBinOrAscii as it is not implemented in the FTP extension.", async () => { diff --git a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/extension.unit.test.ts b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/extension.unit.test.ts index 9507bc22cc..f4627dcb9e 100644 --- a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/extension.unit.test.ts +++ b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/extension.unit.test.ts @@ -41,9 +41,9 @@ describe("Extension Unit Tests - function registerFtpApis", () => { extensionPath: "./test", } as unknown as vscode.ExtensionContext) ).toEqual(undefined); - expect(registerUssApiMock).toBeCalledTimes(1); - expect(registerMvsApiMock).toBeCalledTimes(1); - expect(registerJesApiMock).toBeCalledTimes(1); + expect(registerUssApiMock).toHaveBeenCalledTimes(1); + expect(registerMvsApiMock).toHaveBeenCalledTimes(1); + expect(registerJesApiMock).toHaveBeenCalledTimes(1); }); it("should display error if zoweExplorerApi was not found", async () => { @@ -55,6 +55,6 @@ describe("Extension Unit Tests - function registerFtpApis", () => { extensionPath: "./test", } as unknown as vscode.ExtensionContext) ).toEqual(undefined); - expect(showMessageSpy).toBeCalledTimes(1); + expect(showMessageSpy).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/ftpSession.unit.test.ts b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/ftpSession.unit.test.ts index cf5977cf3e..ecdb05df3c 100644 --- a/packages/zowe-explorer-ftp-extension/__tests__/__unit__/ftpSession.unit.test.ts +++ b/packages/zowe-explorer-ftp-extension/__tests__/__unit__/ftpSession.unit.test.ts @@ -42,8 +42,8 @@ describe("FtpSession Unit Tests - function releaseConnections", () => { writable: true, }); expect(testFtpSession.releaseConnections()).toEqual(undefined); - expect(ussListConnectionMock).toBeCalledTimes(1); - expect(mvsListConnectionMock).toBeCalledTimes(1); - expect(jesListConnectionMock).toBeCalledTimes(1); + expect(ussListConnectionMock).toHaveBeenCalledTimes(1); + expect(mvsListConnectionMock).toHaveBeenCalledTimes(1); + expect(jesListConnectionMock).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpJesApi.ts b/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpJesApi.ts index e6bf99f19d..27d962528b 100644 --- a/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpJesApi.ts +++ b/packages/zowe-explorer-ftp-extension/src/ZoweExplorerFtpJesApi.ts @@ -161,7 +161,11 @@ export class FtpJesApi extends AbstractFtpApi implements MainframeInteraction.IJ spoolFileToDownload.procstep === "N/A" || spoolFileToDownload.procstep == null ? undefined : spoolFileToDownload.procstep ), }; - const destinationFile = DownloadJobs.getSpoolDownloadFile(mockJobFile, parms.omitJobidDirectory, parms.outDir); + const destinationFile = DownloadJobs.getSpoolDownloadFilePath({ + jobFile: mockJobFile, + omitJobidDirectory: parms.omitJobidDirectory, + outDir: parms.outDir, + }); zowe.imperative.IO.createDirsSyncFromFilePath(destinationFile); zowe.imperative.IO.writeFile(destinationFile, spoolFileToDownload.contents); } diff --git a/packages/zowe-explorer/__tests__/__unit__/PersistentFilters.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/PersistentFilters.unit.test.ts index e0b11a8d15..d48e0f20f0 100644 --- a/packages/zowe-explorer/__tests__/__unit__/PersistentFilters.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/PersistentFilters.unit.test.ts @@ -92,7 +92,7 @@ describe("PersistentFilters Unit Test", () => { configurable: true, }); pf.addDsTemplateHistory(mockCriteria as any); - expect(updateDsTemplateHistorySpy).toBeCalledTimes(1); + expect(updateDsTemplateHistorySpy).toHaveBeenCalledTimes(1); }); }); describe("getDsTemplates()", () => { diff --git a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts index 4c33640730..f56ff8835a 100644 --- a/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/Profiles.extended.unit.test.ts @@ -277,9 +277,9 @@ describe("Profiles Unit Tests - Function createZoweSession", () => { const spy = jest.spyOn(Gui, "createQuickPick"); jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(undefined); await Profiles.getInstance().createZoweSession(blockMocks.testDatasetTree); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Profile selection has been cancelled."); - expect(ZoweLogger.debug).toBeCalledWith("Profile selection has been cancelled."); + expect(ZoweLogger.debug).toHaveBeenCalledWith("Profile selection has been cancelled."); spy.mockClear(); }); @@ -296,7 +296,7 @@ describe("Profiles Unit Tests - Function createZoweSession", () => { jest.spyOn(Gui, "showInputBox").mockResolvedValue("test"); await expect(Profiles.getInstance().createZoweSession(globalMocks.testUSSTree)).resolves.not.toThrow(); - expect(spyConfig).toBeCalled(); + expect(spyConfig).toHaveBeenCalled(); spyConfig.mockClear(); }); @@ -310,8 +310,8 @@ describe("Profiles Unit Tests - Function createZoweSession", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(new utils.FilterDescriptor("Test")); jest.spyOn(Profiles.getInstance(), "getProfileInfo").mockRejectedValueOnce(new Error("test error")); await expect(Profiles.getInstance().createZoweSession(globalMocks.testUSSTree)).resolves.not.toThrow(); - expect(ZoweLogger.warn).toBeCalledTimes(1); - expect(ZoweLogger.warn).toBeCalledWith(Error("test error")); + expect(ZoweLogger.warn).toHaveBeenCalledTimes(1); + expect(ZoweLogger.warn).toHaveBeenCalledWith(Error("test error")); }); }); @@ -322,7 +322,7 @@ describe("Profiles Unit Tests - Function editZoweConfigFile", () => { const spy = jest.spyOn(Gui, "showQuickPick"); spy.mockResolvedValueOnce(undefined); await Profiles.getInstance().editZoweConfigFile(); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); spy.mockClear(); }); @@ -333,8 +333,8 @@ describe("Profiles Unit Tests - Function editZoweConfigFile", () => { spyQuickPick.mockResolvedValueOnce("Global: in the Zowe home directory" as any); const spyOpenFile = jest.spyOn(globalMocks.mockProfileInstance, "openConfigFile"); await Profiles.getInstance().editZoweConfigFile(); - expect(spyQuickPick).toBeCalled(); - expect(spyOpenFile).toBeCalledWith("file://globalPath/.zowe/zowe.config.json"); + expect(spyQuickPick).toHaveBeenCalled(); + expect(spyOpenFile).toHaveBeenCalledWith("file://globalPath/.zowe/zowe.config.json"); spyQuickPick.mockClear(); spyOpenFile.mockClear(); }); @@ -353,7 +353,7 @@ describe("Profiles Unit Tests - Function editZoweConfigFile", () => { } as any); const spyOpenFile = jest.spyOn(globalMocks.mockProfileInstance, "openConfigFile"); await Profiles.getInstance().editZoweConfigFile(); - expect(spyOpenFile).toBeCalledWith("globalPath"); + expect(spyOpenFile).toHaveBeenCalledWith("globalPath"); spyOpenFile.mockClear(); }); it("Tests that editZoweConfigFile opens correct file when Project is selected", async () => { @@ -363,8 +363,8 @@ describe("Profiles Unit Tests - Function editZoweConfigFile", () => { spyQuickPick.mockResolvedValueOnce("Project: in the current working directory" as any); const spyOpenFile = jest.spyOn(globalMocks.mockProfileInstance, "openConfigFile"); await Profiles.getInstance().editZoweConfigFile(); - expect(spyQuickPick).toBeCalled(); - expect(spyOpenFile).toBeCalledWith("file://projectPath/zowe.user.config.json"); + expect(spyQuickPick).toHaveBeenCalled(); + expect(spyOpenFile).toHaveBeenCalledWith("file://projectPath/zowe.user.config.json"); spyQuickPick.mockClear(); spyOpenFile.mockClear(); }); @@ -383,7 +383,7 @@ describe("Profiles Unit Tests - Function editZoweConfigFile", () => { } as any); const spyOpenFile = jest.spyOn(globalMocks.mockProfileInstance, "openConfigFile"); await Profiles.getInstance().editZoweConfigFile(); - expect(spyOpenFile).toBeCalledWith("projectPath"); + expect(spyOpenFile).toHaveBeenCalledWith("projectPath"); spyOpenFile.mockClear(); }); }); @@ -419,7 +419,7 @@ describe("Profiles Unit Tests - Function createZoweSchema", () => { const spy = jest.spyOn(Gui, "showQuickPick"); spy.mockResolvedValueOnce(undefined); await Profiles.getInstance().createZoweSchema(blockMocks.testDatasetTree); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); expect(globalMocks.mockShowInformationMessage.mock.calls[0][0]).toBe("Operation Cancelled"); spy.mockClear(); }); @@ -436,9 +436,9 @@ describe("Profiles Unit Tests - Function createZoweSchema", () => { const spyOpenFile = jest.spyOn(globalMocks.mockProfileInstance, "openConfigFile"); await Profiles.getInstance().createZoweSchema(blockMocks.testDatasetTree); - expect(spyQuickPick).toBeCalled(); - expect(spyInfoMessage).toBeCalled(); - expect(spyOpenFile).toBeCalled(); + expect(spyQuickPick).toHaveBeenCalled(); + expect(spyInfoMessage).toHaveBeenCalled(); + expect(spyOpenFile).toHaveBeenCalled(); spyQuickPick.mockClear(); spyLayers.mockClear(); @@ -456,8 +456,8 @@ describe("Profiles Unit Tests - Function createZoweSchema", () => { jest.spyOn(Gui, "errorMessage").mockResolvedValueOnce("Show config"); await Profiles.getInstance().createZoweSchema(blockMocks.testDatasetTree); - expect(spyQuickPick).toBeCalled(); - expect(spyZoweConfigError).toBeCalled(); + expect(spyQuickPick).toHaveBeenCalled(); + expect(spyZoweConfigError).toHaveBeenCalled(); spyQuickPick.mockClear(); spyLayers.mockClear(); @@ -509,8 +509,8 @@ describe("Profiles Unit Tests - Function createZoweSchema", () => { await Profiles.getInstance().createZoweSchema(blockMocks.testDatasetTree); - expect(spyQuickPick).not.toBeCalled(); - expect(spyConfig).toBeCalled(); + expect(spyQuickPick).not.toHaveBeenCalled(); + expect(spyConfig).toHaveBeenCalled(); spyQuickPick.mockClear(); spyLayers.mockClear(); @@ -640,7 +640,7 @@ describe("Profiles Unit Tests - function getDeleteProfile", () => { }); const showMessageSpy = jest.spyOn(Gui, "showMessage"); await expect(privateProfile.getDeleteProfile()).resolves.toEqual(undefined); - expect(showMessageSpy).toBeCalledWith("No profiles available"); + expect(showMessageSpy).toHaveBeenCalledWith("No profiles available"); }); it("should show a message saying 'Operation Cancelled'", async () => { const privateProfile = Profiles.getInstance() as any; @@ -668,7 +668,7 @@ describe("Profiles Unit Tests - function getDeleteProfile", () => { const showMessageSpy = jest.spyOn(Gui, "showMessage"); jest.spyOn(Gui, "showQuickPick").mockResolvedValue(undefined); await expect(privateProfile.getDeleteProfile()).resolves.toEqual(undefined); - expect(showMessageSpy).toBeCalledWith("Operation Cancelled"); + expect(showMessageSpy).toHaveBeenCalledWith("Operation Cancelled"); }); }); @@ -763,7 +763,7 @@ describe("Profiles Unit Tests - function validateProfile", () => { type: "", failNotFound: false, }); - expect(errorHandlingSpy).toBeCalledWith(testError, "test1"); + expect(errorHandlingSpy).toHaveBeenCalledWith(testError, "test1"); }); it("should return an object with profile validation status of 'unverified' from session status if validated profiles doesn't exist", async () => { Object.defineProperty(Profiles.getInstance(), "profilesForValidation", { @@ -1060,7 +1060,7 @@ describe("Profiles Unit Tests - function ssoLogin", () => { login: () => "ajshdlfkjshdalfjhas", } as never); await expect(Profiles.getInstance().ssoLogin(testNode, "fake")).resolves.not.toThrow(); - expect(ZoweLogger.warn).toBeCalledWith(Error("test error.")); + expect(ZoweLogger.warn).toHaveBeenCalledWith(Error("test error.")); }); it("should catch error during login and log error", async () => { jest.spyOn(ZoweExplorerApiRegister.getInstance(), "getCommonApi").mockReturnValueOnce({ @@ -1071,7 +1071,7 @@ describe("Profiles Unit Tests - function ssoLogin", () => { } as never); jest.spyOn(Profiles.getInstance() as any, "loginCredentialPrompt").mockReturnValue(["fake", "12345"]); await expect(Profiles.getInstance().ssoLogin(testNode, "fake")).resolves.not.toThrow(); - expect(ZoweLogger.error).toBeCalled(); + expect(ZoweLogger.error).toHaveBeenCalled(); }); }); @@ -1118,9 +1118,9 @@ describe("Profiles Unit Tests - function ssoLogout", () => { })); const updateBaseProfileFileLogoutSpy = jest.spyOn(Profiles.getInstance() as any, "updateBaseProfileFileLogout").mockImplementation(); await expect(Profiles.getInstance().ssoLogout(testNode)).resolves.not.toThrow(); - expect(getTokenTypeNameMock).toBeCalledTimes(1); - expect(logoutMock).toBeCalledTimes(1); - expect(updateBaseProfileFileLogoutSpy).toBeCalledTimes(1); + expect(getTokenTypeNameMock).toHaveBeenCalledTimes(1); + expect(logoutMock).toHaveBeenCalledTimes(1); + expect(updateBaseProfileFileLogoutSpy).toHaveBeenCalledTimes(1); }); }); @@ -1134,7 +1134,7 @@ describe("Profiles Unit Tests - function updateBaseProfileFileLogin", () => { updateProperty: updatePropertyMock, }); await expect(privateProfile.updateBaseProfileFileLogin(globalMocks.testProfile, globalMocks.testProfile.profile)).resolves.not.toThrow(); - expect(updatePropertyMock).toBeCalledTimes(2); + expect(updatePropertyMock).toHaveBeenCalledTimes(2); }); }); @@ -1154,7 +1154,7 @@ describe("Profiles Unit Tests - function updateBaseProfileFileLogout", () => { updateKnownProperty: updateKnownPropertyMock, }); await expect(privateProfile.updateBaseProfileFileLogout(globalMocks.testProfile, globalMocks.testProfile.profile)).resolves.not.toThrow(); - expect(updateKnownPropertyMock).toBeCalledTimes(2); + expect(updateKnownPropertyMock).toHaveBeenCalledTimes(2); }); }); @@ -1207,7 +1207,7 @@ describe("Profiles Unit Tests - function loginCredentialPrompt", () => { }); const showMessageSpy = jest.spyOn(Gui, "showMessage").mockImplementation(); await expect(privateProfile.loginCredentialPrompt()).resolves.toEqual(undefined); - expect(showMessageSpy).toBeCalledTimes(1); + expect(showMessageSpy).toHaveBeenCalledTimes(1); }); it("should show a gui message if there is not a newUser", async () => { @@ -1220,7 +1220,7 @@ describe("Profiles Unit Tests - function loginCredentialPrompt", () => { }); const showMessageSpy = jest.spyOn(Gui, "showMessage").mockImplementation(); await expect(privateProfile.loginCredentialPrompt()).resolves.toEqual(undefined); - expect(showMessageSpy).toBeCalledTimes(1); + expect(showMessageSpy).toHaveBeenCalledTimes(1); }); }); @@ -1277,8 +1277,8 @@ describe("Profiles Unit Tests - function clearFilterFromAllTrees", () => { jest.spyOn(TreeProviders, "job", "get").mockReturnValue(mockTreeProvider); expect(Profiles.getInstance().clearFilterFromAllTrees(testNode)); - expect(flipStateSpy).toBeCalledTimes(0); - expect(refreshElementSpy).toBeCalledTimes(0); + expect(flipStateSpy).toHaveBeenCalledTimes(0); + expect(refreshElementSpy).toHaveBeenCalledTimes(0); }); it("should fail to clear filters if the session node is not listed in the tree", async () => { @@ -1305,9 +1305,9 @@ describe("Profiles Unit Tests - function clearFilterFromAllTrees", () => { jest.spyOn(TreeProviders, "job", "get").mockReturnValue(mockTreeProvider); expect(Profiles.getInstance().clearFilterFromAllTrees(testNode)); - expect(flipStateSpy).toBeCalledTimes(0); - expect(refreshElementSpy).toBeCalledTimes(0); - expect(getProfileSpy).toBeCalledTimes(3); + expect(flipStateSpy).toHaveBeenCalledTimes(0); + expect(refreshElementSpy).toHaveBeenCalledTimes(0); + expect(getProfileSpy).toHaveBeenCalledTimes(3); }); }); @@ -1332,7 +1332,7 @@ describe("Profiles Unit Tests - function disableValidation", () => { const disableValidationContextSpy = jest.spyOn(Profiles.getInstance(), "disableValidationContext"); expect(globalMocks.testNode.contextValue).toEqual(globals.DS_SESSION_CONTEXT); expect(Profiles.getInstance().disableValidation(globalMocks.testNode)).toEqual(globalMocks.testNode); - expect(disableValidationContextSpy).toBeCalledTimes(1); + expect(disableValidationContextSpy).toHaveBeenCalledTimes(1); expect(globalMocks.testNode.contextValue).toEqual(globals.DS_SESSION_CONTEXT + globals.VALIDATE_SUFFIX); }); }); @@ -1361,7 +1361,7 @@ describe("Profiles Unit Tests - function enableValidation", () => { jest.spyOn(TreeProviders, "getSessionForAllTrees").mockReturnValue([globalMocks.testNode]); expect(globalMocks.testNode.contextValue).toEqual(globals.DS_SESSION_CONTEXT); expect(Profiles.getInstance().enableValidation(globalMocks.testNode)).toEqual(globalMocks.testNode); - expect(enableValidationContextSpy).toBeCalledTimes(1); + expect(enableValidationContextSpy).toHaveBeenCalledTimes(1); expect(globalMocks.testNode.contextValue).toEqual(globals.DS_SESSION_CONTEXT + globals.VALIDATE_SUFFIX); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts index f16c0e86b4..d413c20b99 100644 --- a/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/ZoweExplorerExtender.unit.test.ts @@ -226,7 +226,7 @@ describe("ZoweExplorerExtender unit tests", () => { readProfilesFromDisk: readProfilesFromDiskSpy, } as any); await expect(blockMocks.instTest.initForZowe("USS", ["" as any])).resolves.not.toThrow(); - expect(readProfilesFromDiskSpy).toBeCalledTimes(1); + expect(readProfilesFromDiskSpy).toHaveBeenCalledTimes(1); expect(refreshProfilesQueueAddSpy).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweCommandProvider.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweCommandProvider.unit.test.ts index 64f88f9536..6c9f5c37c3 100644 --- a/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweCommandProvider.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweCommandProvider.unit.test.ts @@ -86,7 +86,7 @@ describe("ZoweCommandProvide Unit Tests - function checkCurrentProfile", () => { }); const errorHandlingSpy = jest.spyOn(utils, "errorHandling").mockImplementation(); await expect(ZoweCommandProvider.prototype.checkCurrentProfile(testNode)).resolves.toEqual(undefined); - expect(errorHandlingSpy).toBeCalledWith( + expect(errorHandlingSpy).toHaveBeenCalledWith( "Profile Name " + globalMocks.testProfile.name + " is inactive. Please check if your Zowe server is active or if the URL and port in your profile is correct." diff --git a/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweTreeProvider.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweTreeProvider.unit.test.ts index 6d12a6bd8b..6f01515986 100644 --- a/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweTreeProvider.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/abstract/ZoweTreeProvider.unit.test.ts @@ -195,7 +195,7 @@ describe("ZoweJobNode unit tests - Function editSession", () => { const spy = jest.spyOn(ZoweLogger, "trace"); await blockMocks.testJobsProvider.editSession(blockMocks.jobNode, globalMocks.testUSSTree); expect(globalMocks.mockEditSession).toHaveBeenCalled(); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); it("Tests that the session is edited and added to only the specific tree modified", async () => { @@ -213,7 +213,7 @@ describe("ZoweJobNode unit tests - Function editSession", () => { blockMocks.jobNode.contextValue = globals.JOBS_SESSION_CONTEXT; await blockMocks.testJobsProvider.editSession(blockMocks.jobNode, globalMocks.testUSSTree); expect(globalMocks.mockEditSession).toHaveBeenCalled(); - expect(deleteSessionForProviderSpy).toBeCalledWith(blockMocks.jobNode, mockJobProvider); + expect(deleteSessionForProviderSpy).toHaveBeenCalledWith(blockMocks.jobNode, mockJobProvider); }); }); @@ -223,7 +223,7 @@ describe("Tree Provider unit tests, function getTreeItem", () => { const spy = jest.spyOn(ZoweLogger, "trace"); const sampleElement = new ZoweUSSNode({ label: "/u/myUser", collapsibleState: vscode.TreeItemCollapsibleState.None }); expect(globalMocks.testUSSTree.getTreeItem(sampleElement)).toBeInstanceOf(vscode.TreeItem); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -237,7 +237,7 @@ describe("Tree Provider unit tests, function getParent", () => { const parent = globalMocks.testUSSTree.getParent(rootChildren[1]); expect(parent).toBeUndefined(); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); @@ -294,7 +294,7 @@ describe("Tree Provider unit tests, function getTreeItem", () => { // Testing flipState to closed await globalMocks.testUSSTree.flipState(folder, false); expect(JSON.stringify(folder.iconPath)).toContain("folder-closed.svg"); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -372,7 +372,7 @@ describe("Tree Provider Unit Tests - refreshHomeProfileContext", () => { const spy = jest.spyOn(ZoweLogger, "trace"); await expect(globalMocks.testUSSTree.refreshHomeProfileContext(globalMocks.testUSSNode)).resolves.not.toThrow(); expect(globalMocks.testUSSNode.contextValue).toEqual("directory_home"); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -382,7 +382,7 @@ describe("Tree Provider Unit Tests - function getTreeType", () => { const globalMocks = await createGlobalMocks(); const spy = jest.spyOn(ZoweLogger, "trace"); expect(globalMocks.testUSSTree.getTreeType()).toEqual(globalMocks.testUSSTree.persistenceSchema); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -392,7 +392,7 @@ describe("Tree Provider Unit Tests - function findNonFavoritedNode", () => { const globalMocks = await createGlobalMocks(); const spy = jest.spyOn(ZoweLogger, "trace"); expect(globalMocks.testTreeProvider.findNonFavoritedNode(globalMocks.testUSSNode)).toEqual(undefined); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -402,7 +402,7 @@ describe("Tree Provider Unit Tests - function findFavoritedNode", () => { const globalMocks = await createGlobalMocks(); const spy = jest.spyOn(ZoweLogger, "trace"); expect(globalMocks.testTreeProvider.findFavoritedNode(globalMocks.testUSSNode)).toEqual(undefined); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -412,7 +412,7 @@ describe("Tree Provider Unit Tests - function renameFavorite", () => { const globalMocks = await createGlobalMocks(); const spy = jest.spyOn(ZoweLogger, "trace"); expect(globalMocks.testTreeProvider.renameFavorite(globalMocks.testUSSNode, "test")).toEqual(undefined); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -422,7 +422,7 @@ describe("Tree Provider Unit Tests - function renameNode", () => { const globalMocks = await createGlobalMocks(); const spy = jest.spyOn(ZoweLogger, "trace"); expect(globalMocks.testTreeProvider.renameNode("test", "test1", "test2")).toEqual(undefined); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); spy.mockClear(); }); }); @@ -544,9 +544,9 @@ describe("Tree Provider Unit Tests - function loadProfileByPersistedProfile", () const zoweLoggerWarnSpy = jest.spyOn(ZoweLogger, "warn"); await expect(ZoweTreeProvider.prototype["loadProfileByPersistedProfile"](globalMocks.testDSTree, "zosmf", true)).resolves.not.toThrow(); - expect(globalMocks.testDSTree.addSingleSession).toBeCalledTimes(1); - expect(resetValidationSettingsSpy).toBeCalledTimes(2); - expect(zoweLoggerWarnSpy).toBeCalledTimes(0); + expect(globalMocks.testDSTree.addSingleSession).toHaveBeenCalledTimes(1); + expect(resetValidationSettingsSpy).toHaveBeenCalledTimes(2); + expect(zoweLoggerWarnSpy).toHaveBeenCalledTimes(0); resetValidationSettingsSpy.mockClear(); zoweLoggerWarnSpy.mockClear(); }); @@ -567,9 +567,9 @@ describe("Tree Provider Unit Tests - function loadProfileByPersistedProfile", () const zoweLoggerWarnSpy = jest.spyOn(ZoweLogger, "warn"); await expect(ZoweTreeProvider.prototype["loadProfileByPersistedProfile"](globalMocks.testDSTree, "zosmf", true)).resolves.not.toThrow(); - expect(globalMocks.testDSTree.addSingleSession).toBeCalledTimes(2); - expect(resetValidationSettingsSpy).toBeCalled(); - expect(zoweLoggerWarnSpy).toBeCalledTimes(1); + expect(globalMocks.testDSTree.addSingleSession).toHaveBeenCalledTimes(2); + expect(resetValidationSettingsSpy).toHaveBeenCalled(); + expect(zoweLoggerWarnSpy).toHaveBeenCalledTimes(1); resetValidationSettingsSpy.mockClear(); zoweLoggerWarnSpy.mockClear(); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts index e8a9b57864..8336e24864 100644 --- a/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/api/ZoweExplorerZosmfApi.unit.test.ts @@ -111,7 +111,7 @@ describe("Zosmf API tests", () => { configurable: true, }); await expect(api.updateAttributes("/test/path", { tag: "utf-8" })).resolves.not.toThrow(); - expect(changeTagSpy).toBeCalledTimes(1); + expect(changeTagSpy).toHaveBeenCalledTimes(1); }); it("should get the tag of a file successfully", async () => { diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts index 38b9b4b70a..bb9b5dd49a 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/DatasetTree.unit.test.ts @@ -301,7 +301,7 @@ describe("Dataset Tree Unit tests - Function initializeFavChildNodeForProfile", const showErrorMessageSpy = jest.spyOn(Gui, "errorMessage"); await testTree.initializeFavChildNodeForProfile("BRTVS99.BAD", "badContextValue", favProfileNode); - expect(showErrorMessageSpy).toBeCalledTimes(1); + expect(showErrorMessageSpy).toHaveBeenCalledTimes(1); showErrorMessageSpy.mockClear(); }); }); @@ -688,7 +688,7 @@ describe("Dataset Tree Unit Tests - Function loadProfilesForFavorites", () => { }); mocked(Gui.errorMessage).mockResolvedValueOnce("Remove"); await testTree.loadProfilesForFavorites(blockMocks.log, favProfileNode); - expect(showErrorMessageSpy).toBeCalledTimes(1); + expect(showErrorMessageSpy).toHaveBeenCalledTimes(1); showErrorMessageSpy.mockClear(); }); it("Checking that favorite nodes with pre-existing profile/session values continue using those values", async () => { @@ -1075,7 +1075,7 @@ describe("USSTree Unit Tests - Function addSingleSession", () => { }); const zoweLoggerErrorSpy = jest.spyOn(ZoweLogger, "error"); expect(blockMocks.testTree.addSingleSession({ name: "test1234" })); - expect(zoweLoggerErrorSpy).toBeCalledTimes(1); + expect(zoweLoggerErrorSpy).toHaveBeenCalledTimes(1); }); it("should call 'errorHandling()' if the error does not include the hostname", () => { @@ -1086,7 +1086,7 @@ describe("USSTree Unit Tests - Function addSingleSession", () => { }); const errorHandlingSpy = jest.spyOn(utils, "errorHandling"); expect(blockMocks.testTree.addSingleSession({ name: "test1234" })); - expect(errorHandlingSpy).toBeCalledTimes(1); + expect(errorHandlingSpy).toHaveBeenCalledTimes(1); }); }); @@ -1224,7 +1224,7 @@ describe("Dataset Tree Unit Tests - Function addFavorite", () => { await testTree.addFavorite(child); - expect(mocked(Gui.showMessage)).toBeCalledWith("PDS already in favorites"); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("PDS already in favorites"); }); }); describe("Dataset Tree Unit Tests - Function removeFavorite", () => { @@ -1270,7 +1270,7 @@ describe("Dataset Tree Unit Tests - Function removeFavorite", () => { // Actual test await testTree.removeFavorite(profileNodeInFavs.children[0]); - expect(removeFavProfileSpy).not.toBeCalled(); + expect(removeFavProfileSpy).not.toHaveBeenCalled(); expect(profileNodeInFavs.children.length).toBe(1); expect(profileNodeInFavs.children[0].label).toBe(`${node2.label}`); }); @@ -1357,7 +1357,7 @@ describe("Dataset Tree Unit Tests - Function removeFavProfile", () => { // Check that favorite is removed from UI expect(blockMocks.testTree.mFavorites.length).toEqual(0); // Check that favorite is removed from settings file - expect(updateFavoritesSpy).toBeCalledTimes(1); + expect(updateFavoritesSpy).toHaveBeenCalledTimes(1); }); it("Tests that removeFavProfile leaves profile node in Favorites when user cancels", async () => { const globalMocks = createGlobalMocks(); @@ -1578,7 +1578,7 @@ describe("Dataset Tree Unit Tests - Function datasetFilterPrompt", () => { await testTree.datasetFilterPrompt(testTree.mSessionNodes[1]); - expect(mocked(Gui.showMessage)).toBeCalledWith("You must enter a pattern."); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("You must enter a pattern."); }); it("Checking usage of existing filter - Theia", async () => { const globalMocks = createGlobalMocks(); @@ -1609,7 +1609,7 @@ describe("Dataset Tree Unit Tests - Function datasetFilterPrompt", () => { await testTree.datasetFilterPrompt(testTree.mSessionNodes[1]); - expect(mocked(Gui.showMessage)).toBeCalledWith("No selection made. Operation cancelled."); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("No selection made. Operation cancelled."); }); it("Checking function on favorites", async () => { const globalMocks = createGlobalMocks(); @@ -1745,7 +1745,7 @@ describe("Dataset Tree Unit Tests - Function datasetFilterPrompt", () => { await testTree.datasetFilterPrompt(testTree.mSessionNodes[1]); - expect(mocked(Gui.showMessage)).toBeCalledWith("You must enter a pattern."); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("You must enter a pattern."); }); it("Checking usage of existing filter", async () => { const globalMocks = createGlobalMocks(); @@ -1784,7 +1784,7 @@ describe("Dataset Tree Unit Tests - Function datasetFilterPrompt", () => { await testTree.datasetFilterPrompt(testTree.mSessionNodes[1]); - expect(mocked(Gui.showMessage)).toBeCalledWith("No selection made. Operation cancelled."); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("No selection made. Operation cancelled."); }); it("Checking adding of new filter error is caught on getChildren", async () => { const globalMocks = createGlobalMocks(); @@ -1805,7 +1805,7 @@ describe("Dataset Tree Unit Tests - Function datasetFilterPrompt", () => { await testTree.datasetFilterPrompt(testTree.mSessionNodes[1]); - expect(errorSpy).toBeCalled(); + expect(errorSpy).toHaveBeenCalled(); errorSpy.mockClear(); }); it("Checking function for return if getChildren is undefined", async () => { @@ -1827,7 +1827,7 @@ describe("Dataset Tree Unit Tests - Function datasetFilterPrompt", () => { expect(await testTree.datasetFilterPrompt(testTree.mSessionNodes[1])).not.toBeDefined(); - expect(errorSpy).not.toBeCalled(); + expect(errorSpy).not.toHaveBeenCalled(); errorSpy.mockClear(); }); it("Checking function for return if element.getChildren calls error handling for success: false", async () => { @@ -1854,8 +1854,8 @@ describe("Dataset Tree Unit Tests - Function datasetFilterPrompt", () => { }); expect(await testTree.datasetFilterPrompt(testTree.mSessionNodes[1])).not.toBeDefined(); - expect(debugSpy).toBeCalled(); - expect(errorSpy).toBeCalled(); + expect(debugSpy).toHaveBeenCalled(); + expect(errorSpy).toHaveBeenCalled(); debugSpy.mockClear(); errorSpy.mockClear(); }); @@ -2043,7 +2043,7 @@ describe("Dataset Tree Unit Tests - Function onDidConfiguration", () => { await testTree.onDidChangeConfiguration(event); - expect(mocked(vscode.workspace.getConfiguration)).toBeCalledTimes(2); + expect(mocked(vscode.workspace.getConfiguration)).toHaveBeenCalledTimes(2); }); }); describe("Dataset Tree Unit Tests - Function renameNode", () => { diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/ZoweDatasetNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/ZoweDatasetNode.unit.test.ts index 8ccca7ea67..bae6bb4c74 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/ZoweDatasetNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/ZoweDatasetNode.unit.test.ts @@ -110,8 +110,8 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { await node.openDs(false, true, blockMocks.testDatasetTree); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalledWith(sharedUtils.getDocumentFilePath(node.label.toString(), node)); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalledWith(sharedUtils.getDocumentFilePath(node.label.toString(), node)); }); it("Checking of opening for common dataset with unverified profile", async () => { @@ -142,8 +142,8 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { await node.openDs(false, true, blockMocks.testDatasetTree); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalledWith(sharedUtils.getDocumentFilePath(node.label.toString(), node)); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalledWith(sharedUtils.getDocumentFilePath(node.label.toString(), node)); }); it("Checking of opening for common dataset without supporting ongoing actions", async () => { @@ -168,8 +168,8 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { await node.openDs(false, true, blockMocks.testDatasetTree); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalledWith(sharedUtils.getDocumentFilePath(node.label.toString(), node)); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalledWith(sharedUtils.getDocumentFilePath(node.label.toString(), node)); }); it("Checking of failed attempt to open dataset", async () => { @@ -190,7 +190,7 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { // do nothing } - expect(mocked(Gui.errorMessage)).toBeCalledWith("Error: testError"); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Error: testError"); }); it("Check for invalid/null response when contents are already fetched", async () => { @@ -238,10 +238,10 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { await child.openDs(false, true, blockMocks.testDatasetTree); - expect(mocked(fs.existsSync)).toBeCalledWith( + expect(mocked(fs.existsSync)).toHaveBeenCalledWith( path.join(globals.DS_DIR, child.getSessionNode().label.toString(), `${parent.label.toString()}(${child.label.toString()})`) ); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalledWith( + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalledWith( sharedUtils.getDocumentFilePath(`${parent.label.toString()}(${child.label.toString()})`, child) ); }); @@ -269,10 +269,10 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { await child.openDs(false, true, blockMocks.testDatasetTree); - expect(mocked(fs.existsSync)).toBeCalledWith( + expect(mocked(fs.existsSync)).toHaveBeenCalledWith( path.join(globals.DS_DIR, child.getSessionNode().label.toString(), `${parent.label.toString()}(${child.label.toString()})`) ); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalledWith( + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalledWith( sharedUtils.getDocumentFilePath(`${parent.label.toString()}(${child.label.toString()})`, child) ); }); @@ -300,8 +300,8 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { await child.openDs(false, true, blockMocks.testDatasetTree); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, blockMocks.imperativeProfile.name, child.label.toString())); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalledWith(sharedUtils.getDocumentFilePath(child.label.toString(), child)); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, blockMocks.imperativeProfile.name, child.label.toString())); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalledWith(sharedUtils.getDocumentFilePath(child.label.toString(), child)); }); it("Checks that openDs fails if called from an invalid node", async () => { globals.defineGlobals(""); @@ -323,7 +323,7 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { // Prevent exception from failing test } - expect(mocked(Gui.errorMessage)).toBeCalledWith("Invalid data set or member."); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Invalid data set or member."); }); it("Checking that error is displayed and logged for opening of node with invalid context value", async () => { createGlobalMocks(); @@ -353,8 +353,8 @@ describe("ZoweDatasetNode Unit Tests - Function node.openDs()", () => { // Do nothing } - expect(showErrorMessageSpy).toBeCalledWith("Invalid data set or member."); - expect(logErrorSpy).toBeCalledTimes(1); + expect(showErrorMessageSpy).toHaveBeenCalledWith("Invalid data set or member."); + expect(logErrorSpy).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts index 43601d1319..1852234352 100644 --- a/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/dataset/actions.unit.test.ts @@ -181,11 +181,11 @@ describe("Dataset Actions Unit Tests - Function createMember", () => { await dsActions.createMember(parent, blockMocks.testDatasetTree); - expect(mySpy).toBeCalledWith({ + expect(mySpy).toHaveBeenCalledWith({ placeHolder: "Name of Member", validateInput: expect.any(Function), }); - expect(mocked(zowe.Upload.bufferToDataSet)).toBeCalledWith(blockMocks.zosmfSession, Buffer.from(""), parent.label + "(testMember)", { + expect(mocked(zowe.Upload.bufferToDataSet)).toHaveBeenCalledWith(blockMocks.zosmfSession, Buffer.from(""), parent.label + "(testMember)", { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout, }); }); @@ -208,7 +208,7 @@ describe("Dataset Actions Unit Tests - Function createMember", () => { // Prevent exception from failing test } - expect(mocked(Gui.errorMessage)).toBeCalledWith("Unable to create member. Error: test"); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Unable to create member. Error: test"); mocked(zowe.Upload.bufferToDataSet).mockReset(); }); it("Checking of attempt to create member without name", async () => { @@ -223,7 +223,7 @@ describe("Dataset Actions Unit Tests - Function createMember", () => { mocked(vscode.window.showInputBox).mockResolvedValue(""); await dsActions.createMember(parent, blockMocks.testDatasetTree); - expect(mocked(zowe.Upload.bufferToDataSet)).not.toBeCalled(); + expect(mocked(zowe.Upload.bufferToDataSet)).not.toHaveBeenCalled(); }); it("Checking of member creation for favorite dataset", async () => { const blockMocks = createBlockMocksShared(); @@ -251,10 +251,15 @@ describe("Dataset Actions Unit Tests - Function createMember", () => { await dsActions.createMember(parent, blockMocks.testDatasetTree); - expect(mySpy).toBeCalledWith({ placeHolder: "Name of Member", validateInput: expect.any(Function) }); - expect(mocked(zowe.Upload.bufferToDataSet)).toBeCalledWith(blockMocks.zosmfSession, Buffer.from(""), nonFavoriteLabel + "(testMember)", { - responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout, - }); + expect(mySpy).toHaveBeenCalledWith({ placeHolder: "Name of Member", validateInput: expect.any(Function) }); + expect(mocked(zowe.Upload.bufferToDataSet)).toHaveBeenCalledWith( + blockMocks.zosmfSession, + Buffer.from(""), + nonFavoriteLabel + "(testMember)", + { + responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout, + } + ); }); }); @@ -282,7 +287,7 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { await dsActions.refreshPS(node); - expect(mocked(zowe.Download.dataSet)).toBeCalledWith( + expect(mocked(zowe.Download.dataSet)).toHaveBeenCalledWith( blockMocks.zosmfSession, node.label, expect.objectContaining({ @@ -290,11 +295,11 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { returnEtag: true, }) ); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalledWith( + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalledWith( path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString()) ); - expect(mocked(vscode.window.showTextDocument)).toBeCalledTimes(2); - expect(mocked(vscode.commands.executeCommand)).toBeCalledWith("workbench.action.closeActiveEditor"); + expect(mocked(vscode.window.showTextDocument)).toHaveBeenCalledTimes(2); + expect(mocked(vscode.commands.executeCommand)).toHaveBeenCalledWith("workbench.action.closeActiveEditor"); }); it("Checking duplicate PS dataset refresh attempt", async () => { globals.defineGlobals(""); @@ -317,7 +322,7 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { await dsActions.refreshPS(node); - expect(mocked(vscode.commands.executeCommand)).not.toBeCalled(); + expect(mocked(vscode.commands.executeCommand)).not.toHaveBeenCalled(); }); it("Checking failed attempt to refresh PS dataset (not found exception)", async () => { globals.defineGlobals(""); @@ -336,8 +341,8 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { await dsActions.refreshPS(node); - expect(mocked(Gui.showMessage)).toBeCalledWith("Unable to find file " + node.label); - expect(mocked(vscode.commands.executeCommand)).not.toBeCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("Unable to find file " + node.label); + expect(mocked(vscode.commands.executeCommand)).not.toHaveBeenCalled(); }); it("Checking failed attempt to refresh PDS Member", async () => { globals.defineGlobals(""); @@ -355,7 +360,7 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { await dsActions.refreshPS(child); - expect(mocked(zowe.Download.dataSet)).toBeCalledWith( + expect(mocked(zowe.Download.dataSet)).toHaveBeenCalledWith( blockMocks.zosmfSession, child.getParent().getLabel() + "(" + child.label + ")", expect.objectContaining({ @@ -363,7 +368,7 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { returnEtag: true, }) ); - expect(mocked(Gui.errorMessage)).toBeCalledWith("Error"); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Error"); }); it("Checking favorite empty PDS refresh", async () => { globals.defineGlobals(""); @@ -386,9 +391,9 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { }); await dsActions.refreshPS(node); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalled(); - expect(mocked(vscode.window.showTextDocument)).toBeCalledTimes(2); - expect(mocked(vscode.commands.executeCommand)).toBeCalledWith("workbench.action.closeActiveEditor"); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalled(); + expect(mocked(vscode.window.showTextDocument)).toHaveBeenCalledTimes(2); + expect(mocked(vscode.commands.executeCommand)).toHaveBeenCalledWith("workbench.action.closeActiveEditor"); }); it("Checking favorite PDS Member refresh", async () => { globals.defineGlobals(""); @@ -412,9 +417,9 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { }); await dsActions.refreshPS(child); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalled(); - expect(mocked(vscode.window.showTextDocument)).toBeCalledTimes(2); - expect(mocked(vscode.commands.executeCommand)).toBeCalledWith("workbench.action.closeActiveEditor"); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalled(); + expect(mocked(vscode.window.showTextDocument)).toHaveBeenCalledTimes(2); + expect(mocked(vscode.commands.executeCommand)).toHaveBeenCalledWith("workbench.action.closeActiveEditor"); }); it("Checking favorite PS refresh", async () => { globals.defineGlobals(""); @@ -438,9 +443,9 @@ describe("Dataset Actions Unit Tests - Function refreshPS", () => { }); await dsActions.refreshPS(child); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalled(); - expect(mocked(vscode.window.showTextDocument)).toBeCalledTimes(2); - expect(mocked(vscode.commands.executeCommand)).toBeCalledWith("workbench.action.closeActiveEditor"); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalled(); + expect(mocked(vscode.window.showTextDocument)).toHaveBeenCalledTimes(2); + expect(mocked(vscode.commands.executeCommand)).toHaveBeenCalledWith("workbench.action.closeActiveEditor"); }); }); @@ -540,7 +545,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testDatasetNode.getLabel()}`); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testDatasetNode.getLabel()}`); }); it("Should delete one member", async () => { @@ -554,7 +559,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith( + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith( `The following 1 item(s) were deleted: ${blockMocks.testMemberNode.getParent().getLabel()}(${blockMocks.testMemberNode.getLabel()})` ); }); @@ -570,7 +575,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testVsamNode.getLabel()}`); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testVsamNode.getLabel()}`); }); it("Should delete one migrated dataset", async () => { @@ -584,7 +589,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testMigrNode.getLabel()}`); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testMigrNode.getLabel()}`); }); it("Should delete two datasets", async () => { @@ -614,7 +619,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testDatasetNode.getLabel()}`); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith(`The following 1 item(s) were deleted: ${blockMocks.testDatasetNode.getLabel()}`); }); it("Should delete a favorited data set", async () => { @@ -628,7 +633,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.warningMessage)).toBeCalledWith( + expect(mocked(Gui.warningMessage)).toHaveBeenCalledWith( `Are you sure you want to delete the following 1 item(s)?\nThis will permanently remove these data sets and/or members from your ` + `system.\n\n ${blockMocks.testFavoritedNode.getLabel()}`, { items: ["Delete"], vsCodeOpts: { modal: true } } @@ -646,7 +651,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.warningMessage)).toBeCalledWith( + expect(mocked(Gui.warningMessage)).toHaveBeenCalledWith( `Are you sure you want to delete the following 1 item(s)?\nThis will permanently remove these data sets and/or members from your ` + `system.\n\n ${blockMocks.testFavoritedNode.getLabel()}(${blockMocks.testFavMemberNode.getLabel()})`, { items: ["Delete"], vsCodeOpts: { modal: true } } @@ -664,7 +669,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith("No data sets selected for deletion, cancelling..."); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("No data sets selected for deletion, cancelling..."); }); it("Should account for favorited data sets during deletion", async () => { @@ -678,7 +683,7 @@ describe("Dataset Actions Unit Tests - Function deleteDatasetPrompt", () => { await dsActions.deleteDatasetPrompt(blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith( + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith( `The following 2 item(s) were deleted: ${blockMocks.testDatasetNode.getLabel()}, ${blockMocks.testFavoritedNode.getLabel()}` ); }); @@ -741,9 +746,9 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { await dsActions.deleteDataset(node, blockMocks.testDatasetTree); - expect(deleteSpy).toBeCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); - expect(mocked(fs.unlinkSync)).toBeCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); + expect(deleteSpy).toHaveBeenCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); + expect(mocked(fs.unlinkSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); }); it("Checking common PS dataset deletion with Unverified profile", async () => { globals.defineGlobals(""); @@ -774,9 +779,9 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { await dsActions.deleteDataset(node, blockMocks.testDatasetTree); - expect(deleteSpy).toBeCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); - expect(mocked(fs.unlinkSync)).toBeCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); + expect(deleteSpy).toHaveBeenCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); + expect(mocked(fs.unlinkSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, node.getSessionNode().label.toString(), node.label.toString())); }); it("Checking common PS dataset deletion with not existing local file", async () => { globals.defineGlobals(""); @@ -796,8 +801,8 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { await dsActions.deleteDataset(node, blockMocks.testDatasetTree); - expect(mocked(fs.unlinkSync)).not.toBeCalled(); - expect(deleteSpy).toBeCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); + expect(mocked(fs.unlinkSync)).not.toHaveBeenCalled(); + expect(deleteSpy).toHaveBeenCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); }); it("Checking common PS dataset failed deletion attempt due to absence on remote", async () => { globals.defineGlobals(""); @@ -818,7 +823,7 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { await expect(dsActions.deleteDataset(node, blockMocks.testDatasetTree)).rejects.toEqual(Error("not found")); - expect(mocked(Gui.showMessage)).toBeCalledWith("Unable to find file " + node.label); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("Unable to find file " + node.label); }); it("Checking common PS dataset failed deletion attempt", async () => { globals.defineGlobals(""); @@ -838,7 +843,7 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { deleteSpy.mockRejectedValueOnce(Error("")); await expect(dsActions.deleteDataset(node, blockMocks.testDatasetTree)).rejects.toEqual(Error("")); - expect(mocked(Gui.errorMessage)).toBeCalledWith("Error"); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Error"); }); it("Checking Favorite PDS dataset deletion", async () => { globals.defineGlobals(""); @@ -865,10 +870,10 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { await dsActions.deleteDataset(node, blockMocks.testDatasetTree); - expect(deleteSpy).toBeCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); - expect(blockMocks.testDatasetTree.removeFavorite).toBeCalledWith(node); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.NODE")); - expect(mocked(fs.unlinkSync)).toBeCalledWith(path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.NODE")); + expect(deleteSpy).toHaveBeenCalledWith(node.label, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); + expect(blockMocks.testDatasetTree.removeFavorite).toHaveBeenCalledWith(node); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.NODE")); + expect(mocked(fs.unlinkSync)).toHaveBeenCalledWith(path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.NODE")); }); it("Checking Favorite PDS Member deletion", async () => { globals.defineGlobals(""); @@ -889,14 +894,14 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { await dsActions.deleteDataset(child, blockMocks.testDatasetTree); - expect(deleteSpy).toBeCalledWith(`${child.getParent().label.toString()}(${child.label.toString()})`, { + expect(deleteSpy).toHaveBeenCalledWith(`${child.getParent().label.toString()}(${child.label.toString()})`, { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout, }); - expect(blockMocks.testDatasetTree.removeFavorite).toBeCalledWith(child); - expect(mocked(fs.existsSync)).toBeCalledWith( + expect(blockMocks.testDatasetTree.removeFavorite).toHaveBeenCalledWith(child); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith( path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), `${child.getParent().label.toString()}(${child.label.toString()})`) ); - expect(mocked(fs.unlinkSync)).toBeCalledWith( + expect(mocked(fs.unlinkSync)).toHaveBeenCalledWith( path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), `${child.getParent().label.toString()}(${child.label.toString()})`) ); }); @@ -929,10 +934,14 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { await dsActions.deleteDataset(child, blockMocks.testDatasetTree); - expect(deleteSpy).toBeCalledWith("HLQ.TEST.DELETE.NODE", { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); - expect(blockMocks.testDatasetTree.removeFavorite).toBeCalledWith(child); - expect(mocked(fs.existsSync)).toBeCalledWith(path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.DELETE.NODE")); - expect(mocked(fs.unlinkSync)).toBeCalledWith(path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.DELETE.NODE")); + expect(deleteSpy).toHaveBeenCalledWith("HLQ.TEST.DELETE.NODE", { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); + expect(blockMocks.testDatasetTree.removeFavorite).toHaveBeenCalledWith(child); + expect(mocked(fs.existsSync)).toHaveBeenCalledWith( + path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.DELETE.NODE") + ); + expect(mocked(fs.unlinkSync)).toHaveBeenCalledWith( + path.join(globals.DS_DIR, parent.getSessionNode().label.toString(), "HLQ.TEST.DELETE.NODE") + ); }); it("Checking incorrect dataset failed deletion attempt", async () => { globals.defineGlobals(""); @@ -958,7 +967,7 @@ describe("Dataset Actions Unit Tests - Function deleteDataset", () => { deleteSpy.mockClear(); await expect(dsActions.deleteDataset(child, blockMocks.testDatasetTree)).rejects.toEqual(Error("Cannot delete, item invalid.")); - expect(deleteSpy).not.toBeCalled(); + expect(deleteSpy).not.toHaveBeenCalled(); }); }); @@ -979,13 +988,13 @@ describe("Dataset Actions Unit Tests - Function enterPattern", () => { const mySpy = mocked(vscode.window.showInputBox).mockResolvedValue("test"); await dsActions.enterPattern(node, blockMocks.testDatasetTree); - expect(mySpy).toBeCalledWith( + expect(mySpy).toHaveBeenCalledWith( expect.objectContaining({ prompt: "Search Data Sets: use a comma to separate multiple patterns", value: node.pattern, }) ); - expect(mocked(Gui.showMessage)).not.toBeCalled(); + expect(mocked(Gui.showMessage)).not.toHaveBeenCalled(); }); it("Checking common dataset filter failed attempt", async () => { createGlobalMocks(); @@ -1001,7 +1010,7 @@ describe("Dataset Actions Unit Tests - Function enterPattern", () => { mocked(vscode.window.showInputBox).mockResolvedValueOnce(""); await dsActions.enterPattern(node, blockMocks.testDatasetTree); - expect(mocked(Gui.showMessage)).toBeCalledWith("You must enter a pattern."); + expect(mocked(Gui.showMessage)).toHaveBeenCalledWith("You must enter a pattern."); }); it("Checking favorite dataset filter action", async () => { createGlobalMocks(); @@ -1009,7 +1018,7 @@ describe("Dataset Actions Unit Tests - Function enterPattern", () => { const favoriteSample = new ZoweDatasetNode({ label: "[sestest]: HLQ.TEST", collapsibleState: vscode.TreeItemCollapsibleState.None }); await dsActions.enterPattern(favoriteSample, blockMocks.testDatasetTree); - expect(blockMocks.testDatasetTree.addSession).toBeCalledWith("sestest"); + expect(blockMocks.testDatasetTree.addSession).toHaveBeenCalledWith("sestest"); }); }); @@ -1119,9 +1128,9 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { (testDocument as any).fileName = path.join(globals.DS_DIR, blockMocks.imperativeProfile.name, testDocument.fileName); await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); - expect(mocked(globalMocks.statusBarMsgSpy)).toBeCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); - expect(blockMocks.profileInstance.loadNamedProfile).toBeCalledWith(blockMocks.imperativeProfile.name); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); + expect(mocked(globalMocks.statusBarMsgSpy)).toHaveBeenCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); + expect(blockMocks.profileInstance.loadNamedProfile).toHaveBeenCalledWith(blockMocks.imperativeProfile.name); }); it("Checking common dataset saving action when no session is defined", async () => { @@ -1165,7 +1174,7 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(Gui.errorMessage)).toBeCalledWith("Could not locate session when saving data set."); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Could not locate session when saving data set."); }); it("Checking common dataset saving failed attempt due to its absence on the side of the server", async () => { globals.defineGlobals(""); @@ -1193,8 +1202,8 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(dataSetSpy).toBeCalledWith("HLQ.TEST.AFILE", { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); - expect(mocked(Gui.errorMessage)).toBeCalledWith("Data set failed to save. Data set may have been deleted or renamed on mainframe."); + expect(dataSetSpy).toHaveBeenCalledWith("HLQ.TEST.AFILE", { responseTimeout: blockMocks.imperativeProfile.profile?.responseTimeout }); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Data set failed to save. Data set may have been deleted or renamed on mainframe."); }); it("Checking common dataset saving", async () => { globals.defineGlobals(""); @@ -1237,9 +1246,9 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); expect(mockSetEtag).toHaveBeenCalledWith("123"); - expect(mocked(globalMocks.statusBarMsgSpy)).toBeCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); + expect(mocked(globalMocks.statusBarMsgSpy)).toHaveBeenCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); }); it("Checking common dataset failed saving attempt", async () => { globals.defineGlobals(""); @@ -1281,8 +1290,8 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); - expect(mocked(Gui.errorMessage)).toBeCalledWith("failed"); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("failed"); expect(mocked(vscode.workspace.applyEdit)).toHaveBeenCalledTimes(2); }); it("Checking favorite dataset saving", async () => { @@ -1335,8 +1344,8 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); - expect(mocked(globalMocks.statusBarMsgSpy)).toBeCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); + expect(mocked(globalMocks.statusBarMsgSpy)).toHaveBeenCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); }); it("Checking favorite PDS Member saving", async () => { globals.defineGlobals(""); @@ -1411,10 +1420,10 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); expect(mockSetEtag).toHaveBeenCalledWith("123"); - expect(mocked(globalMocks.statusBarMsgSpy)).toBeCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); - expect(blockMocks.profileInstance.loadNamedProfile).toBeCalledWith(blockMocks.imperativeProfile.name); + expect(mocked(globalMocks.statusBarMsgSpy)).toHaveBeenCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); + expect(blockMocks.profileInstance.loadNamedProfile).toHaveBeenCalledWith(blockMocks.imperativeProfile.name); }); it("Checking common dataset failed saving attempt due to incorrect document path", async () => { globals.defineGlobals(""); @@ -1436,8 +1445,8 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(zowe.List.dataSet)).not.toBeCalled(); - expect(mocked(zowe.Upload.pathToDataSet)).not.toBeCalled(); + expect(mocked(zowe.List.dataSet)).not.toHaveBeenCalled(); + expect(mocked(zowe.Upload.pathToDataSet)).not.toHaveBeenCalled(); }); it("Checking PDS member saving attempt", async () => { globals.defineGlobals(""); @@ -1479,8 +1488,8 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); - expect(mocked(Gui.setStatusBarMessage)).toBeCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); + expect(mocked(Gui.setStatusBarMessage)).toHaveBeenCalledWith("success", globals.STATUS_BAR_TIMEOUT_MS); }); it("Checking common dataset saving failed due to conflict with server version", async () => { globals.defineGlobals(""); @@ -1536,9 +1545,9 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(logSpy).toBeCalledWith("Remote file has changed. Presenting with way to resolve file."); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); - expect(commandSpy).toBeCalledWith("workbench.files.action.compareWithSaved"); + expect(logSpy).toHaveBeenCalledWith("Remote file has changed. Presenting with way to resolve file."); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); + expect(commandSpy).toHaveBeenCalledWith("workbench.files.action.compareWithSaved"); logSpy.mockClear(); commandSpy.mockClear(); }); @@ -1598,9 +1607,9 @@ describe("Dataset Actions Unit Tests - Function saveFile", () => { await dsActions.saveFile(testDocument, blockMocks.testDatasetTree); - expect(logSpy).toBeCalledWith("Remote file has changed. Presenting with way to resolve file."); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); - expect(commandSpy).toBeCalledWith("workbench.files.action.compareWithSaved"); + expect(logSpy).toHaveBeenCalledWith("Remote file has changed. Presenting with way to resolve file."); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); + expect(commandSpy).toHaveBeenCalledWith("workbench.files.action.compareWithSaved"); logSpy.mockClear(); commandSpy.mockClear(); }); @@ -1662,8 +1671,8 @@ describe("Dataset Actions Unit Tests - Function showAttributes", () => { await dsActions.showAttributes(node, blockMocks.testDatasetTree); - expect(datasetListSpy).toBeCalledWith(node.label.toString(), { attributes: true }); - expect(mocked(vscode.window.createWebviewPanel)).toBeCalled(); + expect(datasetListSpy).toHaveBeenCalledWith(node.label.toString(), { attributes: true }); + expect(mocked(vscode.window.createWebviewPanel)).toHaveBeenCalled(); }); it("Checking PS dataset member attributes showing", async () => { @@ -1696,11 +1705,11 @@ describe("Dataset Actions Unit Tests - Function showAttributes", () => { await dsActions.showAttributes(nodeMember, blockMocks.testDatasetTree); - expect(allMembersSpy).toBeCalledWith(node.label.toString().toUpperCase(), { + expect(allMembersSpy).toHaveBeenCalledWith(node.label.toString().toUpperCase(), { attributes: true, pattern: nodeMember.label.toString().toUpperCase(), }); - expect(mocked(vscode.window.createWebviewPanel)).toBeCalled(); + expect(mocked(vscode.window.createWebviewPanel)).toHaveBeenCalled(); }); it("Checking PS dataset attributes showing with Unverified Profile", async () => { @@ -1738,8 +1747,8 @@ describe("Dataset Actions Unit Tests - Function showAttributes", () => { await dsActions.showAttributes(node, blockMocks.testDatasetTree); - expect(datasetListSpy).toBeCalledWith(node.label.toString(), { attributes: true }); - expect(mocked(vscode.window.createWebviewPanel)).toBeCalled(); + expect(datasetListSpy).toHaveBeenCalledWith(node.label.toString(), { attributes: true }); + expect(mocked(vscode.window.createWebviewPanel)).toHaveBeenCalled(); }); it("Checking PDS dataset attributes showing", async () => { globals.defineGlobals(""); @@ -1769,8 +1778,8 @@ describe("Dataset Actions Unit Tests - Function showAttributes", () => { await dsActions.showAttributes(node, blockMocks.testDatasetTree); - expect(datasetListSpy).toBeCalledWith(node.label.toString(), { attributes: true }); - expect(mocked(vscode.window.createWebviewPanel)).toBeCalled(); + expect(datasetListSpy).toHaveBeenCalledWith(node.label.toString(), { attributes: true }); + expect(mocked(vscode.window.createWebviewPanel)).toHaveBeenCalled(); }); it("Checking Favorite PS dataset attributes showing", async () => { globals.defineGlobals(""); @@ -1801,8 +1810,8 @@ describe("Dataset Actions Unit Tests - Function showAttributes", () => { await dsActions.showAttributes(node, blockMocks.testDatasetTree); - expect(datasetListSpy).toBeCalledWith(normalisedLabel, { attributes: true }); - expect(mocked(vscode.window.createWebviewPanel)).toBeCalled(); + expect(datasetListSpy).toHaveBeenCalledWith(normalisedLabel, { attributes: true }); + expect(mocked(vscode.window.createWebviewPanel)).toHaveBeenCalled(); }); it("Checking Favorite PDS dataset attributes showing", async () => { globals.defineGlobals(""); @@ -1833,8 +1842,8 @@ describe("Dataset Actions Unit Tests - Function showAttributes", () => { await dsActions.showAttributes(node, blockMocks.testDatasetTree); - expect(datasetListSpy).toBeCalledWith(normalisedLabel, { attributes: true }); - expect(mocked(vscode.window.createWebviewPanel)).toBeCalled(); + expect(datasetListSpy).toHaveBeenCalledWith(normalisedLabel, { attributes: true }); + expect(mocked(vscode.window.createWebviewPanel)).toHaveBeenCalled(); }); it("Checking failed attempt of dataset attributes showing (empty response)", async () => { globals.defineGlobals(""); @@ -1865,10 +1874,10 @@ describe("Dataset Actions Unit Tests - Function showAttributes", () => { await expect(dsActions.showAttributes(node, blockMocks.testDatasetTree)).rejects.toEqual( Error("No matching names found for query: AUSER.A1557332.A996850.TEST1") ); - expect(mocked(Gui.errorMessage)).toBeCalledWith( + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith( "Unable to list attributes. Error: No matching names found for query: AUSER.A1557332.A996850.TEST1" ); - expect(mocked(vscode.window.createWebviewPanel)).not.toBeCalled(); + expect(mocked(vscode.window.createWebviewPanel)).not.toHaveBeenCalled(); }); }); @@ -1969,7 +1978,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { const copySpy = jest.spyOn(dsActions, "copyPartitionedDatasets"); copySpy.mockResolvedValue(undefined); await dsActions.copyDataSets(blockMocks.pdsSessionNode, null, blockMocks.testDatasetTree); - expect(selectedNodeSpy).toBeCalledWith(blockMocks.pdsSessionNode, null); + expect(selectedNodeSpy).toHaveBeenCalledWith(blockMocks.pdsSessionNode, null); }); it("Checking copy the label of a favorite dataset member to the clipboard", async () => { globals.defineGlobals(""); @@ -2209,7 +2218,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { vscode.env.clipboard.writeText(""); const errSpy = jest.spyOn(Gui, "errorMessage"); await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, blockMocks.datasetSessionNode)).toEqual(Promise.resolve()); - expect(errSpy).toBeCalled(); + expect(errSpy).toHaveBeenCalled(); }); it("Testing pasteDataSetMembers() fails and gives error message with empty clipboard", async () => { globals.defineGlobals(""); @@ -2224,7 +2233,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { }); const errSpy = jest.spyOn(Gui, "errorMessage"); await expect(dsActions.pasteDataSetMembers(blockMocks.testDatasetTree, node)).toEqual(Promise.resolve()); - expect(errSpy).toBeCalled(); + expect(errSpy).toHaveBeenCalled(); }); it("Testing pasteDataSetMembers() succesfully runs pasteMember()", async () => { globals.defineGlobals(""); @@ -2307,7 +2316,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { /* Do nothing */ } - expect(mocked(Gui.errorMessage)).toBeCalledWith("Invalid data set or member."); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Invalid data set or member."); }); it("Testing downloadDs() called with a member", async () => { @@ -2331,7 +2340,7 @@ describe("Dataset Actions Unit Tests - Function copyDataSets", () => { const label = node.getParent().getLabel().toString() + "(" + node.getLabel().toString() + ")"; const filePathSpy = jest.spyOn(sharedUtils, "getDocumentFilePath"); await dsActions.downloadDs(node, true); - expect(filePathSpy).toBeCalledWith(label, node); + expect(filePathSpy).toHaveBeenCalledWith(label, node); }); it("Testing refreshDataset() error handling", async () => { @@ -2519,7 +2528,7 @@ describe("Dataset Actions Unit Tests - Function pasteMember", () => { clipboard.writeText("INVALID"); await expect(dsActions.pasteMember(node, blockMocks.testDatasetTree)).rejects.toEqual(Error("Invalid paste. Copy data set(s) first.")); - expect(copySpy).not.toBeCalled(); + expect(copySpy).not.toHaveBeenCalled(); }); it("Should not call zowe.Copy.dataSet when pasting to partitioned data set with no member name", async () => { globals.defineGlobals(""); @@ -2545,7 +2554,7 @@ describe("Dataset Actions Unit Tests - Function pasteMember", () => { clipboard.writeText(JSON.stringify({ dataSetName: "HLQ.TEST.BEFORE.NODE", profileName: "sestest" })); await dsActions.pasteMember(node, blockMocks.testDatasetTree); - expect(copySpy).not.toBeCalled(); + expect(copySpy).not.toHaveBeenCalled(); }); it("Should call zowe.Copy.dataSet when pasting to partitioned data set", async () => { globals.defineGlobals(""); @@ -2617,7 +2626,7 @@ describe("Dataset Actions Unit Tests - Function pasteMember", () => { await dsActions.pasteMember(node, blockMocks.testDatasetTree); expect(mocked(Gui.showMessage)).toHaveBeenCalled(); - expect(copySpy).not.toBeCalled(); + expect(copySpy).not.toHaveBeenCalled(); }); it("Should call zowe.Copy.dataSet when pasting to a favorited partitioned data set", async () => { globals.defineGlobals(""); @@ -3347,8 +3356,8 @@ describe("Dataset Actions Unit Tests - Function createFile", () => { primary: 1, recfm: "FB", }); - expect(templateSpy).toBeCalled(); - expect(addTempSpy).toBeCalled(); + expect(templateSpy).toHaveBeenCalled(); + expect(addTempSpy).toHaveBeenCalled(); templateSpy.mockClear(); addTempSpy.mockClear(); }); @@ -3401,8 +3410,8 @@ describe("Dataset Actions Unit Tests - Function createFile", () => { primary: 1, recfm: "FB", }); - expect(templateSpy).toBeCalled(); - expect(addTempSpy).toBeCalledTimes(0); + expect(templateSpy).toHaveBeenCalled(); + expect(addTempSpy).toHaveBeenCalledTimes(0); templateSpy.mockClear(); addTempSpy.mockClear(); }); @@ -3469,7 +3478,7 @@ describe("Dataset Actions Unit Tests - Function createFile", () => { node.contextValue = globals.DS_DS_CONTEXT; await dsActions.createFile(node, blockMocks.testDatasetTree); - expect(createDataSetSpy).toBeCalledWith("Operation Cancelled"); + expect(createDataSetSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("Checking opCancelled message shown when no ds type chosen", async () => { createGlobalMocks(); @@ -3493,7 +3502,7 @@ describe("Dataset Actions Unit Tests - Function createFile", () => { const createDataSetSpy = jest.spyOn(Gui, "showMessage"); await dsActions.createFile(node, blockMocks.testDatasetTree); - expect(createDataSetSpy).toBeCalledWith("Operation Cancelled"); + expect(createDataSetSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("Checking opCancelled message shown when user escapes allocate or edit attributes options", async () => { createGlobalMocks(); @@ -3518,7 +3527,7 @@ describe("Dataset Actions Unit Tests - Function createFile", () => { const createDataSetSpy = jest.spyOn(Gui, "showMessage"); await dsActions.createFile(node, blockMocks.testDatasetTree); - expect(createDataSetSpy).toBeCalledWith("Operation Cancelled"); + expect(createDataSetSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("Checking opCancelled message shown when user escapes during edit attributes", async () => { createGlobalMocks(); @@ -3547,7 +3556,7 @@ describe("Dataset Actions Unit Tests - Function createFile", () => { const createDataSetSpy = jest.spyOn(Gui, "showMessage"); await dsActions.createFile(node, blockMocks.testDatasetTree); - expect(createDataSetSpy).toBeCalledWith("Operation Cancelled"); + expect(createDataSetSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("Checking opCancelled message shown when no template name supplied", async () => { createGlobalMocks(); @@ -3592,9 +3601,9 @@ describe("Dataset Actions Unit Tests - Function createFile", () => { const addTempSpy = jest.spyOn(blockMocks.testDatasetTree, "addDsTemplate"); await dsActions.createFile(node, blockMocks.testDatasetTree); - expect(templateSpy).toBeCalled(); - expect(addTempSpy).toBeCalledTimes(0); - expect(opCancelledSpy).toBeCalledWith("Operation Cancelled"); + expect(templateSpy).toHaveBeenCalled(); + expect(addTempSpy).toHaveBeenCalledTimes(0); + expect(opCancelledSpy).toHaveBeenCalledWith("Operation Cancelled"); templateSpy.mockClear(); addTempSpy.mockClear(); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/globals.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/globals.unit.test.ts index fe2e6372d4..b6340e1c56 100644 --- a/packages/zowe-explorer/__tests__/__unit__/globals.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/globals.unit.test.ts @@ -27,7 +27,7 @@ describe("Globals Unit Tests", () => { jest.spyOn(SettingsConfig.SettingsConfig, "getDirectValue").mockReturnValue(false); const setDirectValueSpy = jest.spyOn(SettingsConfig.SettingsConfig, "setDirectValue").mockImplementation(); await expect(globals.setGlobalSecurityValue()).resolves.not.toThrow(); - expect(setDirectValueSpy).toBeCalledTimes(1); + expect(setDirectValueSpy).toHaveBeenCalledTimes(1); expect(globals.PROFILE_SECURITY).toBe(false); }); @@ -41,6 +41,6 @@ describe("Globals Unit Tests", () => { const loggerInfoSpy = jest.spyOn(ZoweLogger, "info"); await expect(globals.setGlobalSecurityValue()).resolves.not.toThrow(); expect(globals.PROFILE_SECURITY).toBe(globals.ZOWE_CLI_SCM); - expect(loggerInfoSpy).toBeCalledTimes(1); + expect(loggerInfoSpy).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts index ae7a145c70..db61a78672 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts @@ -522,7 +522,7 @@ describe("ZosJobsProvider unit tests - Function loadProfilesForFavorites", () => }); mocked(Gui.errorMessage).mockResolvedValueOnce({ title: "Remove" }); await testTree.loadProfilesForFavorites(blockMocks.log, favProfileNode); - expect(showErrorMessageSpy).toBeCalledTimes(1); + expect(showErrorMessageSpy).toHaveBeenCalledTimes(1); showErrorMessageSpy.mockClear(); }); it("Checks that favorite nodes with pre-existing profile/session values continue using those values", async () => { @@ -626,7 +626,7 @@ describe("ZosJobsProvider unit tests - Function removeFavProfile", () => { // Check that favorite is removed from UI expect(globalMocks.testJobsProvider.mFavorites.length).toEqual(0); // Check that favorite is removed from settings file - expect(updateFavoritesSpy).toBeCalledTimes(1); + expect(updateFavoritesSpy).toHaveBeenCalledTimes(1); }); it("Tests that removeFavProfile leaves profile node in Favorites when user cancels", async () => { const globalMocks = await createGlobalMocks(); @@ -1095,7 +1095,7 @@ describe("ZosJobsProvider Unit Test - Filter Jobs", () => { const filterJobsSpy = jest.spyOn(testTree, "filterJobsDialog"); await testTree.filterJobsDialog(node1); expect(filterJobsSpy).toHaveBeenCalled(); - expect(filterJobsSpy).toBeCalledWith(node1); + expect(filterJobsSpy).toHaveBeenCalledWith(node1); expect(filterJobsSpy.mock.calls[0][0].children[0].job.jobname).toBe("ZOWEUSR2"); }); @@ -1110,7 +1110,7 @@ describe("ZosJobsProvider Unit Test - Filter Jobs", () => { const filterJobsSpy = jest.spyOn(testTree, "filterJobsDialog"); await testTree.filterJobsDialog(node1); expect(filterJobsSpy).toHaveBeenCalled(); - expect(filterJobsSpy).toBeCalledWith(node1); + expect(filterJobsSpy).toHaveBeenCalledWith(node1); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts index 0eda4533f1..08d11ad6b1 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts @@ -595,7 +595,7 @@ describe("ZoweJobNode unit tests - Function removeFavorite", () => { // Actual test await globalMocks.testJobsProvider.removeFavorite(profileNodeInFavs.children[0]); - expect(removeFavProfileSpy).not.toBeCalled(); + expect(removeFavProfileSpy).not.toHaveBeenCalled(); expect(profileNodeInFavs.children.length).toEqual(1); expect(profileNodeInFavs.children[0].label).toBe("MYHLQ(JOB1284)"); }); 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 a6c278e72c..5e2d1347ab 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/actions.unit.test.ts @@ -306,8 +306,8 @@ describe("Jobs Actions Unit Tests - Function downloadSpool", () => { const downloadFileSpy = jest.spyOn(blockMocks.jesApi, "downloadSpoolContent"); await jobActions.downloadSpool(jobs); - expect(mocked(Gui.showOpenDialog)).toBeCalled(); - expect(downloadFileSpy).toBeCalled(); + expect(mocked(Gui.showOpenDialog)).toHaveBeenCalled(); + expect(downloadFileSpy).toHaveBeenCalled(); expect(downloadFileSpy.mock.calls[0][0]).toEqual({ jobid: node.job.jobid, jobname: node.job.jobname, @@ -357,9 +357,9 @@ describe("Jobs Actions Unit Tests - Function downloadSingleSpool", () => { const getSpoolFilesSpy = jest.spyOn(SpoolProvider, "getSpoolFiles").mockResolvedValue([spool]); await jobActions.downloadSingleSpool(jobs, true); - expect(mocked(Gui.showOpenDialog)).toBeCalled(); + expect(mocked(Gui.showOpenDialog)).toHaveBeenCalled(); expect(getSpoolFilesSpy).toHaveBeenCalledWith(node); - expect(downloadFileSpy).toBeCalled(); + expect(downloadFileSpy).toHaveBeenCalled(); expect(downloadFileSpy.mock.calls[0][0]).toEqual({ jobFile: spool, binary: true, @@ -411,14 +411,14 @@ describe("Jobs Actions Unit Tests - Function downloadJcl", () => { job: blockMocks.iJob, }); await jobActions.downloadJcl(node); - expect(mocked(zowe.GetJobs.getJclForJob)).toBeCalled(); - expect(mocked(vscode.workspace.openTextDocument)).toBeCalled(); - expect(mocked(Gui.showTextDocument)).toBeCalled(); + expect(mocked(zowe.GetJobs.getJclForJob)).toHaveBeenCalled(); + expect(mocked(vscode.workspace.openTextDocument)).toHaveBeenCalled(); + expect(mocked(Gui.showTextDocument)).toHaveBeenCalled(); }); it("Checking failed attempt to download Job JCL", async () => { createGlobalMocks(); await jobActions.downloadJcl(undefined as any); - expect(mocked(Gui.errorMessage)).toBeCalled(); + expect(mocked(Gui.errorMessage)).toHaveBeenCalled(); }); }); @@ -493,9 +493,9 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { submitJclSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitJcl(blockMocks.testDatasetTree, mockFile); - expect(showTextDocumentSpy).toBeCalled(); - expect(submitJclSpy).toBeCalled(); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(showTextDocumentSpy).toHaveBeenCalled(); + expect(submitJclSpy).toHaveBeenCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); 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)" @@ -518,8 +518,8 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { submitJclSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitJcl(blockMocks.testDatasetTree, undefined); - expect(submitJclSpy).toBeCalled(); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(submitJclSpy).toHaveBeenCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); 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)" @@ -546,8 +546,8 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { submitJclSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitJcl(blockMocks.testDatasetTree, undefined); - expect(submitJclSpy).toBeCalled(); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(submitJclSpy).toHaveBeenCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); 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)" @@ -564,8 +564,8 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { await dsActions.submitJcl(blockMocks.testDatasetTree, undefined); const errorMsg = "No editor with a document that could be submitted as JCL is currently open."; - expect(blockMocks.errorLogSpy).toBeCalledWith(errorMsg); - expect(blockMocks.errorGuiMsgSpy).toBeCalledWith(errorMsg); + expect(blockMocks.errorLogSpy).toHaveBeenCalledWith(errorMsg); + expect(blockMocks.errorGuiMsgSpy).toHaveBeenCalledWith(errorMsg); }); it("Checking cancel option scenario of local JCL submission confirmation dialog", async () => { @@ -608,8 +608,8 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { await dsActions.submitJcl(blockMocks.testDatasetTree, undefined); - expect(submitJclSpy).not.toBeCalled(); - expect(messageSpy).toBeCalledWith("Operation Cancelled"); + expect(submitJclSpy).not.toHaveBeenCalled(); + expect(messageSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("Checking API error on submit of active text editor content as JCL", async () => { @@ -633,8 +633,8 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { submitJclSpy.mockRejectedValueOnce(testError); await dsActions.submitJcl(blockMocks.testDatasetTree, undefined); - expect(submitJclSpy).toBeCalled(); - expect(mocked(Gui.errorMessage)).toBeCalled(); + expect(submitJclSpy).toHaveBeenCalled(); + expect(mocked(Gui.errorMessage)).toHaveBeenCalled(); expect(mocked(Gui.errorMessage).mock.calls[0][0]).toContain(testError.message); }); it("If there are no registered profiles", async () => { @@ -655,7 +655,7 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { await dsActions.submitJcl(blockMocks.testDatasetTree, undefined); - expect(showMessagespy).toBeCalledWith("No profiles available"); + expect(showMessagespy).toHaveBeenCalledWith("No profiles available"); }); it("Getting session name from the path itself", async () => { globals.defineGlobals("/user/"); @@ -674,8 +674,8 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => { submitJclSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitJcl(blockMocks.testDatasetTree, undefined); - expect(submitJclSpy).toBeCalled(); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(submitJclSpy).toHaveBeenCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); expect(mocked(Gui.showMessage).mock.calls.length).toBe(1); }); }); @@ -718,9 +718,9 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { submitJobSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitMember(member); - expect(submitJobSpy).toBeCalled(); + expect(submitJobSpy).toHaveBeenCalled(); expect(submitJobSpy.mock.calls[0][0]).toEqual("dataset(member)"); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); expect(mocked(Gui.showMessage).mock.calls[0][0]).toEqual( "Job submitted [JOB1234](command:zowe.jobs.setJobSpool?%5B%22sestest%22%2C%22JOB1234%22%5D)" ); @@ -752,9 +752,9 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { submitJobSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitMember(member); - expect(submitJobSpy).toBeCalled(); + expect(submitJobSpy).toHaveBeenCalled(); expect(submitJobSpy.mock.calls[0][0]).toEqual("dataset(member)"); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); expect(mocked(Gui.showMessage).mock.calls[0][0]).toEqual( "Job submitted [JOB1234](command:zowe.jobs.setJobSpool?%5B%22sestest%22%2C%22JOB1234%22%5D)" ); @@ -774,9 +774,9 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { submitJobSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitMember(dataset); - expect(submitJobSpy).toBeCalled(); + expect(submitJobSpy).toHaveBeenCalled(); expect(submitJobSpy.mock.calls[0][0]).toEqual("dataset"); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); expect(mocked(Gui.showMessage).mock.calls[0][0]).toEqual( "Job submitted [JOB1234](command:zowe.jobs.setJobSpool?%5B%22sestest%22%2C%22JOB1234%22%5D)" ); @@ -808,9 +808,9 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { submitJobSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitMember(favoriteMember); - expect(submitJobSpy).toBeCalled(); + expect(submitJobSpy).toHaveBeenCalled(); expect(submitJobSpy.mock.calls[0][0]).toEqual("TEST.JCL(pds)"); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); expect(mocked(Gui.showMessage).mock.calls[0][0]).toEqual( "Job submitted [JOB1234](command:zowe.jobs.setJobSpool?%5B%22test%22%2C%22JOB1234%22%5D)" ); @@ -836,9 +836,9 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { submitJobSpy.mockResolvedValueOnce(blockMocks.iJob); await dsActions.submitMember(favoriteDataset); - expect(submitJobSpy).toBeCalled(); + expect(submitJobSpy).toHaveBeenCalled(); expect(submitJobSpy.mock.calls[0][0]).toEqual("TEST.JCL"); - expect(mocked(Gui.showMessage)).toBeCalled(); + expect(mocked(Gui.showMessage)).toHaveBeenCalled(); expect(mocked(Gui.showMessage).mock.calls[0][0]).toEqual( "Job submitted [JOB1234](command:zowe.jobs.setJobSpool?%5B%22test%22%2C%22JOB1234%22%5D)" ); @@ -867,9 +867,9 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { } catch (e) { expect(e.message).toEqual("Cannot submit, item invalid."); } - expect(submitJobSpy).not.toBeCalled(); - expect(mocked(Gui.showMessage)).not.toBeCalled(); - expect(mocked(Gui.errorMessage)).toBeCalled(); + expect(submitJobSpy).not.toHaveBeenCalled(); + expect(mocked(Gui.showMessage)).not.toHaveBeenCalled(); + expect(mocked(Gui.errorMessage)).toHaveBeenCalled(); expect(mocked(Gui.errorMessage).mock.calls[0][0]).toEqual("Cannot submit, item invalid."); }); @@ -899,10 +899,13 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { dataset.label = "OTHERUSER.DATASET"; mocked(Gui.warningMessage).mockResolvedValueOnce({ title: "Submit" }); await dsActions.submitMember(dataset); - expect(mocked(Gui.warningMessage)).toBeCalledWith("Are you sure you want to submit the following job?\n\n" + dataset.getLabel(), { - items: [{ title: "Submit" }], - vsCodeOpts: { modal: true }, - }); + expect(mocked(Gui.warningMessage)).toHaveBeenCalledWith( + "Are you sure you want to submit the following job?\n\n" + dataset.getLabel(), + { + items: [{ title: "Submit" }], + vsCodeOpts: { modal: true }, + } + ); } else if ( option === sharedUtils.JOB_SUBMIT_DIALOG_OPTS[sharedUtils.JobSubmitDialogOpts.AllJobs] || option === sharedUtils.JOB_SUBMIT_DIALOG_OPTS[sharedUtils.JobSubmitDialogOpts.YourJobs] @@ -910,10 +913,13 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { dataset.label = "TESTUSER.DATASET"; mocked(Gui.warningMessage).mockResolvedValueOnce({ title: "Submit" }); await dsActions.submitMember(dataset); - expect(mocked(Gui.warningMessage)).toBeCalledWith("Are you sure you want to submit the following job?\n\n" + dataset.getLabel(), { - items: [{ title: "Submit" }], - vsCodeOpts: { modal: true }, - }); + expect(mocked(Gui.warningMessage)).toHaveBeenCalledWith( + "Are you sure you want to submit the following job?\n\n" + dataset.getLabel(), + { + items: [{ title: "Submit" }], + vsCodeOpts: { modal: true }, + } + ); } expect(mocked(Profiles.getInstance)).toHaveBeenCalledTimes(2 * (o + 1)); } @@ -921,7 +927,7 @@ describe("Jobs Actions Unit Tests - Function submitMember", () => { // Test for "Cancel" or closing the dialog mocked(Gui.warningMessage).mockReturnValueOnce(undefined as any); await dsActions.submitMember(dataset); - expect(mocked(Gui.warningMessage)).toBeCalledWith("Are you sure you want to submit the following job?\n\n" + dataset.getLabel(), { + expect(mocked(Gui.warningMessage)).toHaveBeenCalledWith("Are you sure you want to submit the following job?\n\n" + dataset.getLabel(), { items: [{ title: "Submit" }], vsCodeOpts: { modal: true }, }); @@ -989,7 +995,7 @@ describe("Jobs Actions Unit Tests - Function getSpoolContent", () => { await jobActions.getSpoolContent(session, { spool: spoolFile } as any); - expect(mocked(Gui.showTextDocument)).toBeCalledWith(blockMocks.mockUri, { preview: false }); + expect(mocked(Gui.showTextDocument)).toHaveBeenCalledWith(blockMocks.mockUri, { preview: false }); }); it("should call showTextDocument with encoded uri with unverified profile", async () => { createGlobalMocks(); @@ -1012,7 +1018,7 @@ describe("Jobs Actions Unit Tests - Function getSpoolContent", () => { await jobActions.getSpoolContent(session, { spool: spoolFile } as any); - expect(mocked(Gui.showTextDocument)).toBeCalledWith(blockMocks.mockUri, { preview: false }); + expect(mocked(Gui.showTextDocument)).toHaveBeenCalledWith(blockMocks.mockUri, { preview: false }); }); it("should show error message for non existing profile", async () => { createGlobalMocks(); @@ -1027,8 +1033,8 @@ describe("Jobs Actions Unit Tests - Function getSpoolContent", () => { await jobActions.getSpoolContent(session, { spool: spoolFile } as any); - expect(mocked(vscode.window.showTextDocument)).not.toBeCalled(); - expect(mocked(Gui.errorMessage)).toBeCalledWith("Error: Test"); + expect(mocked(vscode.window.showTextDocument)).not.toHaveBeenCalled(); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Error: Test"); }); it("should show an error message in case document cannot be shown for some reason", async () => { createGlobalMocks(); @@ -1044,7 +1050,7 @@ describe("Jobs Actions Unit Tests - Function getSpoolContent", () => { await jobActions.getSpoolContent(session, { spool: spoolFile } as any); - expect(mocked(Gui.errorMessage)).toBeCalledWith("Error: Test"); + expect(mocked(Gui.errorMessage)).toHaveBeenCalledWith("Error: Test"); }); it("should fetch the spool content successfully", async () => { createGlobalMocks(); @@ -1361,7 +1367,7 @@ describe("job deletion command", () => { await jobActions.deleteCommand(jobsProvider, jobNode); - expect(mocked(jobsProvider.delete)).toBeCalledWith(jobNode); + expect(mocked(jobsProvider.delete)).toHaveBeenCalledWith(jobNode); }); it("should delete multiple jobs from the jobs provider", async () => { @@ -1383,8 +1389,8 @@ describe("job deletion command", () => { // act await jobActions.deleteCommand(jobsProvider, undefined, jobs); // assert - expect(mocked(jobsProvider.delete)).toBeCalledWith(jobNode1); - expect(mocked(jobsProvider.delete)).toBeCalledWith(jobNode2); + expect(mocked(jobsProvider.delete)).toHaveBeenCalledWith(jobNode1); + expect(mocked(jobsProvider.delete)).toHaveBeenCalledWith(jobNode2); }); it("should not delete a job in case user cancelled deletion", async () => { @@ -1395,7 +1401,7 @@ describe("job deletion command", () => { const jobNode = new ZoweJobNode({ label: "jobtest", collapsibleState: vscode.TreeItemCollapsibleState.Expanded, session, profile, job }); await jobActions.deleteCommand(jobsProvider, jobNode); - expect(mocked(jobsProvider.delete)).not.toBeCalled(); + expect(mocked(jobsProvider.delete)).not.toHaveBeenCalled(); }); it("should not refresh the current job session after an error during job deletion", async () => { @@ -1407,7 +1413,7 @@ describe("job deletion command", () => { // act await jobActions.deleteCommand(jobsProvider, jobNode); // assert - expect(mocked(jobsProvider.delete)).toBeCalledWith(jobNode); + expect(mocked(jobsProvider.delete)).toHaveBeenCalledWith(jobNode); }); it("should delete a job via quick key from the jobs provider", async () => { @@ -1422,7 +1428,7 @@ describe("job deletion command", () => { await jobActions.deleteCommand(jobsProvider, undefined); // assert - expect(mocked(jobsProvider.delete)).toBeCalledWith(jobNode); + expect(mocked(jobsProvider.delete)).toHaveBeenCalledWith(jobNode); }); }); @@ -1488,7 +1494,7 @@ describe("sortJobs function", () => { //act await jobActions.sortJobs(testtree.mSessionNodes[0], testtree); //asert - expect(sortbynamespy).toBeCalledWith(testtree.mSessionNodes[0]); + expect(sortbynamespy).toHaveBeenCalledWith(testtree.mSessionNodes[0]); expect(sortbynamespy).toHaveBeenCalled(); expect(sortbynamespy.mock.calls[0][0].children).toStrictEqual(expected.mSessionNodes[0].children); }); @@ -1507,7 +1513,7 @@ describe("sortJobs function", () => { //act await jobActions.sortJobs(testtree.mSessionNodes[0], testtree); //asert - expect(sortbyidspy).toBeCalledWith(testtree.mSessionNodes[0]); + expect(sortbyidspy).toHaveBeenCalledWith(testtree.mSessionNodes[0]); expect(sortbyidspy).toHaveBeenCalled(); expect(sortbyidspy.mock.calls[0][0].children).toStrictEqual(expected.mSessionNodes[0].children); }); @@ -1527,7 +1533,7 @@ describe("sortJobs function", () => { //act await jobActions.sortJobs(testtree.mSessionNodes[0], testtree); //asert - expect(sortbyretcodespy).toBeCalledWith(testtree.mSessionNodes[0]); + expect(sortbyretcodespy).toHaveBeenCalledWith(testtree.mSessionNodes[0]); expect(sortbyretcodespy).toHaveBeenCalled(); expect(sortbyretcodespy.mock.calls[0][0].children).toStrictEqual(expected.mSessionNodes[0].children); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/mvs/mvsNodeActions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/mvs/mvsNodeActions.unit.test.ts index e9d1f8616b..626795e746 100644 --- a/packages/zowe-explorer/__tests__/__unit__/mvs/mvsNodeActions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/mvs/mvsNodeActions.unit.test.ts @@ -94,8 +94,8 @@ describe("mvsNodeActions", () => { await dsActions.uploadDialog(node, testTree); - expect(globalMocks.showOpenDialog).toBeCalled(); - expect(testTree.refreshElement).toBeCalledWith(node); + expect(globalMocks.showOpenDialog).toHaveBeenCalled(); + expect(testTree.refreshElement).toHaveBeenCalledWith(node); }); it("should call upload dialog and upload file from favorites node", async () => { const globalMocks = await createGlobalMocks(); @@ -121,8 +121,8 @@ describe("mvsNodeActions", () => { await dsActions.uploadDialog(nodeAsFavorite, testTree); - expect(globalMocks.showOpenDialog).toBeCalled(); - expect(testTree.refreshElement).toBeCalledWith(nodeAsFavorite); + expect(globalMocks.showOpenDialog).toHaveBeenCalled(); + expect(testTree.refreshElement).toHaveBeenCalledWith(nodeAsFavorite); }); it("shouldn't call upload dialog and not upload file if selection is empty", async () => { const globalMocks = await createGlobalMocks(); @@ -145,10 +145,10 @@ describe("mvsNodeActions", () => { globalMocks.showOpenDialog.mockReturnValueOnce(undefined); await dsActions.uploadDialog(node, testTree); - expect(globalMocks.showOpenDialog).toBeCalled(); + expect(globalMocks.showOpenDialog).toHaveBeenCalled(); expect(globalMocks.showInformationMessage.mock.calls.map((call) => call[0])).toEqual(["Operation Cancelled"]); - expect(globalMocks.openTextDocument).not.toBeCalled(); - expect(testTree.refreshElement).not.toBeCalled(); + expect(globalMocks.openTextDocument).not.toHaveBeenCalled(); + expect(testTree.refreshElement).not.toHaveBeenCalled(); }); it("should cancel upload when info message cancel clicked", async () => { const globalMocks = await createGlobalMocks(); @@ -181,9 +181,9 @@ describe("mvsNodeActions", () => { await dsActions.uploadDialog(node, testTree); - expect(globalMocks.showOpenDialog).toBeCalled(); - expect(globalMocks.openTextDocument).not.toBeCalled(); - expect(testTree.refreshElement).toBeCalledWith(node); + expect(globalMocks.showOpenDialog).toHaveBeenCalled(); + expect(globalMocks.openTextDocument).not.toHaveBeenCalled(); + expect(testTree.refreshElement).toHaveBeenCalledWith(node); }); it("should return error from host", async () => { const globalMocks = await createGlobalMocks(); @@ -210,7 +210,7 @@ describe("mvsNodeActions", () => { const errHandlerSpy = jest.spyOn(profUtils, "errorHandling").mockImplementation(); await dsActions.uploadDialog(node, testTree); - expect(errHandlerSpy).toBeCalled(); + expect(errHandlerSpy).toHaveBeenCalled(); }); it("should return error from rejected promise", async () => { const globalMocks = await createGlobalMocks(); @@ -234,6 +234,6 @@ describe("mvsNodeActions", () => { const errHandlerSpy = jest.spyOn(profUtils, "errorHandling").mockImplementation(); await dsActions.uploadDialog(node, testTree); - expect(errHandlerSpy).toBeCalledWith(testError, "sestest"); + expect(errHandlerSpy).toHaveBeenCalledWith(testError, "sestest"); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/shared/HistoryView.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/shared/HistoryView.unit.test.ts index 6c9e3f2ef1..06c4509a84 100644 --- a/packages/zowe-explorer/__tests__/__unit__/shared/HistoryView.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/shared/HistoryView.unit.test.ts @@ -94,7 +94,7 @@ describe("HistoryView Unit Tests", () => { const postMessageSpy = jest.spyOn(historyView.panel.webview, "postMessage"); jest.spyOn(historyView as any, "getHistoryData").mockReturnValue([]); await historyView["onDidReceiveMessage"]({ command: "refresh", attrs: { type: "uss" } }); - expect(postMessageSpy).toBeCalledTimes(1); + expect(postMessageSpy).toHaveBeenCalledTimes(1); expect(historyView["currentTab"]).toEqual("uss-panel-tab"); }); @@ -105,7 +105,7 @@ describe("HistoryView Unit Tests", () => { const postMessageSpy = jest.spyOn(historyView.panel.webview, "postMessage"); jest.spyOn(historyView as any, "getHistoryData").mockReturnValue([]); await historyView["onDidReceiveMessage"]({ command: "ready" }); - expect(postMessageSpy).toBeCalledWith({ + expect(postMessageSpy).toHaveBeenCalledWith({ ds: [], uss: [], jobs: [], @@ -124,7 +124,7 @@ describe("HistoryView Unit Tests", () => { const historyView = await initializeHistoryViewMock(blockMocks, globalMocks); const errorMessageSpy = jest.spyOn(Gui, "errorMessage"); await historyView["onDidReceiveMessage"]({ command: "show-error", attrs: { errorMsg: "test error" } }); - expect(errorMessageSpy).toBeCalledWith("test error"); + expect(errorMessageSpy).toHaveBeenCalledWith("test error"); }); it("should handle the case where 'update-selection' is the command sent", async () => { @@ -144,7 +144,7 @@ describe("HistoryView Unit Tests", () => { jest.spyOn(historyView as any, "refreshView").mockImplementation(); await historyView["onDidReceiveMessage"]({ command: "add-item", attrs: { type: "uss" } }); expect(historyView["currentSelection"]).toEqual({ ds: "search", jobs: "search", uss: "search" }); - expect(addSearchHistorySpy).toBeCalledWith("test"); + expect(addSearchHistorySpy).toHaveBeenCalledWith("test"); }); it("should handle the case where 'remove-item' is the command sent and the selection is 'search'", async () => { @@ -158,7 +158,7 @@ describe("HistoryView Unit Tests", () => { attrs: { type: "ds", selection: "search", selectedItems: { test: "test1" } }, }); expect(historyView["currentSelection"]).toEqual({ ds: "search", jobs: "search", uss: "search" }); - expect(removeSearchHistorySpy).toBeCalledWith("test"); + expect(removeSearchHistorySpy).toHaveBeenCalledWith("test"); }); it("should handle the case where 'remove-item' is the command sent and the selection is 'fileHistory'", async () => { @@ -172,7 +172,7 @@ describe("HistoryView Unit Tests", () => { attrs: { type: "ds", selection: "fileHistory", selectedItems: { test: "test1" } }, }); expect(historyView["currentSelection"]).toEqual({ ds: "search", jobs: "search", uss: "search" }); - expect(removeFileHistorySpy).toBeCalledWith("test"); + expect(removeFileHistorySpy).toHaveBeenCalledWith("test"); }); it("should handle the case where 'remove-item' is the command sent and the selection is not supported", async () => { @@ -186,7 +186,7 @@ describe("HistoryView Unit Tests", () => { attrs: { type: "ds", selection: "favorites", selectedItems: { test: "test1" } }, }); expect(historyView["currentSelection"]).toEqual({ ds: "search", jobs: "search", uss: "search" }); - expect(showMessageSpy).toBeCalledTimes(1); + expect(showMessageSpy).toHaveBeenCalledTimes(1); }); it("should handle the case where 'clear-all' is the command sent and the selection is 'search'", async () => { @@ -202,7 +202,7 @@ describe("HistoryView Unit Tests", () => { attrs: { type: "ds", selection: "search" }, }); expect(historyView["currentSelection"]).toEqual({ ds: "search", jobs: "search", uss: "search" }); - expect(resetSearchHistorySpy).toBeCalledTimes(1); + expect(resetSearchHistorySpy).toHaveBeenCalledTimes(1); }); it("should handle the case where 'clear-all' is the command sent and the selection is 'fileHistory'", async () => { @@ -218,7 +218,7 @@ describe("HistoryView Unit Tests", () => { attrs: { type: "ds", selection: "fileHistory" }, }); expect(historyView["currentSelection"]).toEqual({ ds: "search", jobs: "search", uss: "search" }); - expect(resetFileHistorySpy).toBeCalledTimes(1); + expect(resetFileHistorySpy).toHaveBeenCalledTimes(1); }); it("should handle the case where 'clear-all' is the command sent and the selection is 'fileHistory'", async () => { @@ -233,7 +233,7 @@ describe("HistoryView Unit Tests", () => { attrs: { type: "ds", selection: "favorites" }, }); expect(historyView["currentSelection"]).toEqual({ ds: "search", jobs: "search", uss: "search" }); - expect(showMessageSpy).toBeCalledTimes(2); + expect(showMessageSpy).toHaveBeenCalledTimes(2); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts index d349deeaa1..eeb02ac35f 100644 --- a/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/shared/actions.unit.test.ts @@ -167,7 +167,7 @@ describe("Shared Actions Unit Tests - Function searchInAllLoadedItems", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(qpItem); await sharedActions.searchInAllLoadedItems(testDatasetTree, testUssTree); - expect(testDatasetTree.addSearchHistory).toBeCalledWith("HLQ.PROD2.STUFF"); + expect(testDatasetTree.addSearchHistory).toHaveBeenCalledWith("HLQ.PROD2.STUFF"); }); it("Checking that searchInAllLoadedItems works for a PDS", async () => { const globalMocks = await createGlobalMocks(); @@ -201,7 +201,7 @@ describe("Shared Actions Unit Tests - Function searchInAllLoadedItems", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(qpItem); await sharedActions.searchInAllLoadedItems(testDatasetTree, testUssTree); - expect(testDatasetTree.addSearchHistory).not.toBeCalled(); + expect(testDatasetTree.addSearchHistory).not.toHaveBeenCalled(); }); it("Checking that searchInAllLoadedItems works for a member", async () => { const globalMocks = await createGlobalMocks(); @@ -246,7 +246,7 @@ describe("Shared Actions Unit Tests - Function searchInAllLoadedItems", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(qpItem); await sharedActions.searchInAllLoadedItems(testDatasetTree, testUssTree); - expect(testDatasetTree.addSearchHistory).toBeCalledWith("HLQ.PROD2.STUFF(TESTMEMB)"); + expect(testDatasetTree.addSearchHistory).toHaveBeenCalledWith("HLQ.PROD2.STUFF(TESTMEMB)"); }); it("Checking that searchInAllLoadedItems works for a USS folder", async () => { const globalMocks = await createGlobalMocks(); @@ -279,7 +279,7 @@ describe("Shared Actions Unit Tests - Function searchInAllLoadedItems", () => { const openNode = jest.spyOn(folder, "openUSS").mockImplementation(); await sharedActions.searchInAllLoadedItems(undefined, testUssTree); - expect(openNode).not.toBeCalled(); + expect(openNode).not.toHaveBeenCalled(); }); it("Checking that searchInAllLoadedItems works for a USS file", async () => { const globalMocks = await createGlobalMocks(); @@ -320,7 +320,7 @@ describe("Shared Actions Unit Tests - Function searchInAllLoadedItems", () => { const openNode = jest.spyOn(file, "openUSS").mockImplementation(); await sharedActions.searchInAllLoadedItems(undefined, testUssTree); - expect(testUssTree.addSearchHistory).toBeCalledWith("/folder/file"); + expect(testUssTree.addSearchHistory).toHaveBeenCalledWith("/folder/file"); expect(openNode).toHaveBeenCalledWith(false, true, testUssTree); }); it("Checking that searchInAllLoadedItems fails when no pattern is entered", async () => { @@ -341,7 +341,7 @@ describe("Shared Actions Unit Tests - Function searchInAllLoadedItems", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(qpItem as any); await sharedActions.searchInAllLoadedItems(testDatasetTree, testUssTree); - expect(testUssTree.addSearchHistory).not.toBeCalled(); + expect(testUssTree.addSearchHistory).not.toHaveBeenCalled(); }); }); @@ -384,7 +384,7 @@ describe("Shared Actions Unit Tests - Function openRecentMemberPrompt", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(qpItem); await sharedActions.openRecentMemberPrompt(testDatasetTree, testUSSTree); - expect(testDatasetTree.openItemFromPath).toBeCalledWith(`[sestest]: node(child)`, blockMocks.datasetSessionNode); + expect(testDatasetTree.openItemFromPath).toHaveBeenCalledWith(`[sestest]: node(child)`, blockMocks.datasetSessionNode); }); it("Tests that openRecentMemberPrompt (opening a recent member) is executed successfully on a DS", async () => { @@ -409,7 +409,7 @@ describe("Shared Actions Unit Tests - Function openRecentMemberPrompt", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(qpItem); await sharedActions.openRecentMemberPrompt(testDatasetTree, testUSSTree); - expect(testDatasetTree.openItemFromPath).toBeCalledWith(`[sestest]: node`, blockMocks.datasetSessionNode); + expect(testDatasetTree.openItemFromPath).toHaveBeenCalledWith(`[sestest]: node`, blockMocks.datasetSessionNode); }); it("Tests that openRecentMemberPrompt (opening a recent member) is executed successfully on a USS file", async () => { @@ -435,7 +435,7 @@ describe("Shared Actions Unit Tests - Function openRecentMemberPrompt", () => { jest.spyOn(Gui, "resolveQuickPick").mockResolvedValueOnce(qpItem); await sharedActions.openRecentMemberPrompt(testDatasetTree, testUSSTree); - expect(testUSSTree.openItemFromPath).toBeCalledWith(`/node1/node2/node3.txt`, blockMocks.ussSessionNode); + expect(testUSSTree.openItemFromPath).toHaveBeenCalledWith(`/node1/node2/node3.txt`, blockMocks.ussSessionNode); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts index c49d8212bc..769d37e886 100644 --- a/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/shared/utils.unit.test.ts @@ -225,7 +225,7 @@ describe("Test uploadContents", () => { }, } as any ); - expect(ZoweExplorerApiRegister.getUssApi(null).putContent).toBeCalled(); + expect(ZoweExplorerApiRegister.getUssApi(null).putContent).toHaveBeenCalled(); }); }); @@ -293,7 +293,7 @@ describe("Test force upload", () => { blockMocks.showInformationMessage.mockResolvedValueOnce("Yes"); blockMocks.withProgress.mockResolvedValueOnce(blockMocks.fileResponse); await sharedUtils.willForceUpload(blockMocks.ussNode, blockMocks.mockDoc, null); - expect(blockMocks.withProgress).toBeCalledWith( + expect(blockMocks.withProgress).toHaveBeenCalledWith( { location: vscode.ProgressLocation.Notification, title: "Saving file...", @@ -308,7 +308,7 @@ describe("Test force upload", () => { blockMocks.showInformationMessage.mockResolvedValueOnce("Yes"); blockMocks.withProgress.mockResolvedValueOnce(blockMocks.fileResponse); await sharedUtils.willForceUpload(blockMocks.dsNode, blockMocks.mockDoc, null); - expect(blockMocks.withProgress).toBeCalledWith( + expect(blockMocks.withProgress).toHaveBeenCalledWith( { location: vscode.ProgressLocation.Notification, title: "Saving Data Set...", @@ -340,7 +340,7 @@ describe("Test force upload", () => { blockMocks.showInformationMessage.mockResolvedValueOnce("Yes"); blockMocks.withProgress.mockResolvedValueOnce({ ...blockMocks.fileResponse, success: false }); await sharedUtils.willForceUpload(blockMocks.ussNode, blockMocks.mockDoc, null); - expect(blockMocks.withProgress).toBeCalledWith( + expect(blockMocks.withProgress).toHaveBeenCalledWith( { location: vscode.ProgressLocation.Notification, title: "Saving file...", @@ -356,7 +356,7 @@ describe("Test force upload", () => { const testError = new Error("Task failed successfully"); blockMocks.withProgress.mockRejectedValueOnce(testError); await sharedUtils.willForceUpload(blockMocks.ussNode, blockMocks.mockDoc, null, { name: "fakeProfile" } as any); - expect(blockMocks.withProgress).toBeCalledWith( + expect(blockMocks.withProgress).toHaveBeenCalledWith( { location: vscode.ProgressLocation.Notification, title: "Saving file...", diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts index 0426eca7c0..294db57728 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts @@ -381,7 +381,7 @@ describe("USSTree Unit Tests - Function removeFavorite", () => { // Actual test await globalMocks.testTree.removeFavorite(blockMocks.testDir); - expect(removeFavProfileSpy).not.toBeCalled(); + expect(removeFavProfileSpy).not.toHaveBeenCalled(); expect(profileNodeInFavs.children[0].fullPath).toEqual(testDir2.fullPath); }); it("Tests that removeFavorite() works properly when starting with only one favorite for the profile", async () => { @@ -432,7 +432,7 @@ describe("USSTree Unit Tests - Function removeFavProfile", () => { // Check that favorite is removed from UI expect(globalMocks.testTree.mFavorites.length).toEqual(0); // Check that favorite is removed from settings file - expect(updateFavoritesSpy).toBeCalledTimes(1); + expect(updateFavoritesSpy).toHaveBeenCalledTimes(1); }); it("Tests that removeFavProfile leaves profile node in Favorites when user cancels", async () => { const globalMocks = await createGlobalMocks(); @@ -562,7 +562,7 @@ describe("USSTree Unit Tests - Function filterPrompt", () => { await globalMocks.testTree.filterPrompt(globalMocks.testTree.mSessionNodes[1]); - expect(syncSessionNodeSpy).toBeCalledTimes(1); + expect(syncSessionNodeSpy).toHaveBeenCalledTimes(1); }); it("Tests that filter() works properly when user enters path with Unverified profile", async () => { @@ -848,8 +848,8 @@ describe("USSTree Unit Tests - Function renameUSSNode", () => { await globalMocks.testTree.renameUSSNode(ussNode, "/u/myuser/renamed"); - expect(renameSpy).toBeCalledTimes(1); - expect(renameSpy).toBeCalledWith("/u/myuser/renamed"); + expect(renameSpy).toHaveBeenCalledTimes(1); + expect(renameSpy).toHaveBeenCalledWith("/u/myuser/renamed"); }); }); @@ -869,8 +869,8 @@ describe("USSTree Unit Tests - Function renameFavorite", () => { await globalMocks.testTree.renameFavorite(ussFavNode, "/u/myuser/renamed"); - expect(renameSpy).toBeCalledTimes(1); - expect(renameSpy).toBeCalledWith("/u/myuser/renamed"); + expect(renameSpy).toHaveBeenCalledTimes(1); + expect(renameSpy).toHaveBeenCalledWith("/u/myuser/renamed"); }); }); @@ -1198,7 +1198,7 @@ describe("USSTree Unit Tests - Function openItemFromPath", () => { const fileHistorySpy = jest.spyOn(globalMocks.testTree, "removeFileHistory"); await globalMocks.testTree.openItemFromPath("/d.txt", globalMocks.testTree.mSessionNodes[1]); - expect(fileHistorySpy).toBeCalledWith("[sestest]: /d.txt"); + expect(fileHistorySpy).toHaveBeenCalledWith("[sestest]: /d.txt"); }); }); @@ -1481,7 +1481,7 @@ describe("USSTree Unit Tests - Function loadProfilesForFavorites", () => { }); mocked(vscode.window.showErrorMessage).mockResolvedValueOnce({ title: "Remove" }); await globalMocks.testTree.loadProfilesForFavorites(blockMocks.log, favProfileNode); - expect(showErrorMessageSpy).toBeCalledTimes(1); + expect(showErrorMessageSpy).toHaveBeenCalledTimes(1); showErrorMessageSpy.mockClear(); }); it("Tests that favorite nodes with pre-existing profile/session values continue using those values", async () => { diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts index cc9f96aea9..4a39acd16b 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/ZoweUSSNode.unit.test.ts @@ -419,7 +419,7 @@ describe("ZoweUSSNode Unit Tests - Function node.refreshUSS()", () => { const showErrorMessageSpy = jest.spyOn(vscode.window, "showErrorMessage"); await expect(childNode.refreshUSS()).rejects.toThrow(); - expect(showErrorMessageSpy).toBeCalledTimes(1); + expect(showErrorMessageSpy).toHaveBeenCalledTimes(1); }); it("Tests that node.refreshUSS() works correctly for files under directories", async () => { const globalMocks = await createGlobalMocks(); @@ -516,7 +516,7 @@ describe("ZoweUSSNode Unit Tests - Function node.rename()", () => { expect(blockMocks.ussDir.tooltip).toEqual(newFullPath); // Expect node to be refreshed in UI after rename - expect(blockMocks.providerSpy).toBeCalled(); + expect(blockMocks.providerSpy).toHaveBeenCalled(); blockMocks.providerSpy.mockClear(); }); it("Tests that rename updates and refreshes the UI components of any loaded children for a node", async () => { @@ -1025,11 +1025,11 @@ describe("ZoweUSSNode Unit Tests - Function node.openUSS()", () => { await node.openUSS(false, true, blockMocks.testUSSTree); expect(globalMocks.existsSync.mock.calls.length).toBe(1); expect(globalMocks.existsSync.mock.calls[0][0]).toBe(path.join(globals.USS_DIR, node.getProfileName(), node.fullPath)); - expect(globalMocks.setStatusBarMessage).toBeCalledWith("$(sync~spin) Downloading USS file..."); + expect(globalMocks.setStatusBarMessage).toHaveBeenCalledWith("$(sync~spin) Downloading USS file..."); // Tests that correct file is opened in editor globalMocks.withProgress(globalMocks.downloadUSSFile); - expect(globalMocks.withProgress).toBeCalledWith(globalMocks.downloadUSSFile); + expect(globalMocks.withProgress).toHaveBeenCalledWith(globalMocks.downloadUSSFile); expect(globalMocks.openTextDocument.mock.calls.length).toBe(1); expect(globalMocks.openTextDocument.mock.calls[0][0]).toBe(node.getUSSDocumentFilePath()); expect(globalMocks.mockShowTextDocument.mock.calls.length).toBe(1); @@ -1067,10 +1067,10 @@ describe("ZoweUSSNode Unit Tests - Function node.openUSS()", () => { await node.openUSS(false, true, blockMocks.testUSSTree); expect(globalMocks.existsSync.mock.calls.length).toBe(1); expect(globalMocks.existsSync.mock.calls[0][0]).toBe(path.join(globals.USS_DIR, node.getProfileName(), node.fullPath)); - expect(globalMocks.setStatusBarMessage).toBeCalledWith("$(sync~spin) Downloading USS file..."); + expect(globalMocks.setStatusBarMessage).toHaveBeenCalledWith("$(sync~spin) Downloading USS file..."); // Tests that correct file is opened in editor globalMocks.withProgress(globalMocks.downloadUSSFile); - expect(globalMocks.withProgress).toBeCalledWith(globalMocks.downloadUSSFile); + expect(globalMocks.withProgress).toHaveBeenCalledWith(globalMocks.downloadUSSFile); expect(globalMocks.openTextDocument.mock.calls.length).toBe(1); expect(globalMocks.openTextDocument.mock.calls[0][0]).toBe(node.getUSSDocumentFilePath()); expect(globalMocks.mockShowTextDocument.mock.calls.length).toBe(1); @@ -1210,7 +1210,7 @@ describe("ZoweUSSNode Unit Tests - Function node.openUSS()", () => { await node.openUSS(false, true, blockMocks.testUSSTree); expect(globalMocks.existsSync.mock.calls.length).toBe(1); expect(globalMocks.existsSync.mock.calls[0][0]).toBe(path.join(globals.USS_DIR, node.getProfileName() || "", node.fullPath)); - expect(globalMocks.setStatusBarMessage).toBeCalledWith("$(sync~spin) Downloading USS file..."); + expect(globalMocks.setStatusBarMessage).toHaveBeenCalledWith("$(sync~spin) Downloading USS file..."); // Make sure correct file is displayed in the editor globalMocks.withProgress(globalMocks.downloadUSSFile); expect(globalMocks.openTextDocument.mock.calls.length).toBe(1); @@ -1393,7 +1393,7 @@ describe("ZoweUSSNode Unit Tests - Function node.initializeFileOpening()", () => testNode.fullPath = "test/node"; await testNode.initializeFileOpening(testNode.fullPath, true); - expect(globalMocks.mockShowTextDocument).toBeCalledWith(globalMocks.mockTextDocument); + expect(globalMocks.mockShowTextDocument).toHaveBeenCalledWith(globalMocks.mockTextDocument); }); it("Tests that node.initializeFileOpening() successfully handles text files that shouldn't be previewed", async () => { @@ -1418,7 +1418,7 @@ describe("ZoweUSSNode Unit Tests - Function node.initializeFileOpening()", () => testNode.fullPath = "test/node"; await testNode.initializeFileOpening(testNode.fullPath, false); - expect(globalMocks.mockShowTextDocument).toBeCalledWith(globalMocks.mockTextDocument, { preview: false }); + expect(globalMocks.mockShowTextDocument).toHaveBeenCalledWith(globalMocks.mockTextDocument, { preview: false }); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts index 7291f489bb..0a06907a67 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/actions.unit.test.ts @@ -256,7 +256,7 @@ describe("USS Action Unit Tests - Function createUSSNodeDialog", () => { jest.spyOn(blockMocks.ussNode, "getChildren").mockResolvedValueOnce([]); await ussNodeActions.createUSSNode(blockMocks.ussNode, blockMocks.testUSSTree, "file"); - expect(createSpy).toBeCalledWith("/test/path/testFile", "file"); + expect(createSpy).toHaveBeenCalledWith("/test/path/testFile", "file"); }); it("Tests that createUSSNode fails if an error is thrown", async () => { @@ -360,8 +360,8 @@ describe("USS Action Unit Tests - Function deleteFromDisk", () => { ussNodeActions.deleteFromDisk(null, "some/where/that/exists"); - expect(fs.existsSync).toBeCalledTimes(1); - expect(fs.unlinkSync).toBeCalledTimes(1); + expect(fs.existsSync).toHaveBeenCalledTimes(1); + expect(fs.unlinkSync).toHaveBeenCalledTimes(1); }); it("should call not unlink if file doesn't exist", () => { @@ -374,8 +374,8 @@ describe("USS Action Unit Tests - Function deleteFromDisk", () => { ussNodeActions.deleteFromDisk(null, "some/where/that/does/not/exist"); - expect(fs.existsSync).toBeCalledTimes(1); - expect(fs.unlinkSync).toBeCalledTimes(0); + expect(fs.existsSync).toHaveBeenCalledTimes(1); + expect(fs.unlinkSync).toHaveBeenCalledTimes(0); }); it("should catch the error when thrown", () => { @@ -384,7 +384,7 @@ describe("USS Action Unit Tests - Function deleteFromDisk", () => { throw new Error(); }); ussNodeActions.deleteFromDisk(null, "some/where/that/does/not/exist"); - expect(ZoweLogger.warn).toBeCalledTimes(1); + expect(ZoweLogger.warn).toHaveBeenCalledTimes(1); }); }); @@ -403,7 +403,7 @@ describe("USS Action Unit Tests - Function copyPath", () => { globalMocks.theia = false; await ussNodeActions.copyPath(blockMocks.ussNode); - expect(globalMocks.writeText).toBeCalledWith(blockMocks.ussNode.fullPath); + expect(globalMocks.writeText).toHaveBeenCalledWith(blockMocks.ussNode.fullPath); }); it("should not copy the node's full path to the system clipboard if theia", async () => { @@ -414,7 +414,7 @@ describe("USS Action Unit Tests - Function copyPath", () => { globalMocks.theia = true; await ussNodeActions.copyPath(blockMocks.ussNode); - expect(globalMocks.writeText).not.toBeCalled(); + expect(globalMocks.writeText).not.toHaveBeenCalled(); }); }); @@ -503,7 +503,7 @@ describe("USS Action Unit Tests - Function saveUSSFile", () => { await ussNodeActions.saveUSSFile(testDocument, blockMocks.testUSSTree); - expect(mocked(sharedUtils.concatChildNodes)).toBeCalled(); + expect(mocked(sharedUtils.concatChildNodes)).toHaveBeenCalled(); }); it("Testing that saveUSSFile is executed successfully", async () => { @@ -530,7 +530,7 @@ describe("USS Action Unit Tests - Function saveUSSFile", () => { await ussNodeActions.saveUSSFile(blockMocks.testDoc, blockMocks.testUSSTree); expect(globalMocks.concatChildNodes.mock.calls.length).toBe(1); - expect(blockMocks.mockGetEtag).toBeCalledTimes(1); + expect(blockMocks.mockGetEtag).toHaveBeenCalledTimes(1); expect(blockMocks.mockGetEtag).toReturnWith("123"); }); @@ -620,9 +620,9 @@ describe("USS Action Unit Tests - Functions uploadDialog & uploadFile", () => { globalMocks.isBinaryFileSync.mockReturnValueOnce(false); await ussNodeActions.uploadDialog(blockMocks.ussNode, blockMocks.testUSSTree); - expect(globalMocks.showOpenDialog).toBeCalled(); - expect(globalMocks.openTextDocument).toBeCalled(); - expect(blockMocks.testUSSTree.refresh).toBeCalled(); + expect(globalMocks.showOpenDialog).toHaveBeenCalled(); + expect(globalMocks.openTextDocument).toHaveBeenCalled(); + expect(blockMocks.testUSSTree.refresh).toHaveBeenCalled(); }); it("Tests that uploadDialog() works for binary file", async () => { @@ -635,8 +635,8 @@ describe("USS Action Unit Tests - Functions uploadDialog & uploadFile", () => { globalMocks.isBinaryFileSync.mockReturnValueOnce(true); await ussNodeActions.uploadDialog(blockMocks.ussNode, blockMocks.testUSSTree); - expect(globalMocks.showOpenDialog).toBeCalled(); - expect(blockMocks.testUSSTree.refresh).toBeCalled(); + expect(globalMocks.showOpenDialog).toHaveBeenCalled(); + expect(blockMocks.testUSSTree.refresh).toHaveBeenCalled(); }); it("Tests that uploadDialog() throws an error successfully", async () => { @@ -706,7 +706,7 @@ describe("USS Action Unit Tests - function uploadFile", () => { ); await ussNodeActions.uploadFile(blockMocks.ussNode, { fileName: "madeup" } as any); - expect(ZoweExplorerApiRegister.getUssApi(null).putContent).toBeCalled(); + expect(ZoweExplorerApiRegister.getUssApi(null).putContent).toHaveBeenCalled(); }); }); @@ -767,7 +767,7 @@ describe("USS Action Unit Tests - copy file / directory", () => { const fileStructure = JSON.stringify(await ussNodeActions.ussFileStructure(blockMocks.nodes)); await ussNodeActions.copyUssFilesToClipboard(blockMocks.nodes); - expect(globalMocks.writeText).toBeCalledWith(fileStructure); + expect(globalMocks.writeText).toHaveBeenCalledWith(fileStructure); }); it("Has the proper responses for toSameSession in UssFileUtils", async () => { @@ -861,7 +861,7 @@ describe("USS Action Unit Tests - copy file / directory", () => { const blockMocks = await createBlockMocks(globalMocks); await ussNodeActions.refreshChildNodesDirectory(blockMocks.nodes[0]); blockMocks.nodes[0].refreshUSS = jest.fn().mockResolvedValueOnce(blockMocks.nodes[0]); - expect(blockMocks.nodes[0].refreshUSS).toBeCalledTimes(0); + expect(blockMocks.nodes[0].refreshUSS).toHaveBeenCalledTimes(0); }); it("tests refreshChildNodesDirectory executed successfully with file", async () => { @@ -870,7 +870,7 @@ describe("USS Action Unit Tests - copy file / directory", () => { const blockMocks = await createBlockMocks(globalMocks); await ussNodeActions.refreshChildNodesDirectory(blockMocks.nodes[0]); blockMocks.nodes[1].refreshUSS = jest.fn().mockResolvedValueOnce(blockMocks.nodes[1]); - expect(blockMocks.nodes[1].refreshUSS).toBeCalledTimes(0); + expect(blockMocks.nodes[1].refreshUSS).toHaveBeenCalledTimes(0); }); it("tests refreshChildNodesDirectory executed successfully on a node with a child", async () => { const globalMocks = createGlobalMocks(); @@ -879,7 +879,7 @@ describe("USS Action Unit Tests - copy file / directory", () => { node.getChildren = jest.fn().mockResolvedValueOnce([blockMocks.nodes[0]]); await ussNodeActions.refreshChildNodesDirectory(node); - expect(blockMocks.nodes[0].refreshUSS).toBeCalledTimes(1); + expect(blockMocks.nodes[0].refreshUSS).toHaveBeenCalledTimes(1); }); it("tests copyUssFiles executed successfully via context menu with selected nodes", async () => { @@ -943,8 +943,8 @@ describe("USS Action Unit Tests - function refreshDirectory", () => { jest.spyOn(testNode, "getChildren").mockImplementation(); const refreshElementSpy = jest.spyOn(testUSSTree, "refreshElement"); await expect(ussNodeActions.refreshDirectory(testNode, testUSSTree)).resolves.not.toThrow(); - expect(refreshElementSpy).toBeCalledTimes(1); - expect(refreshElementSpy).toBeCalledWith(testNode); + expect(refreshElementSpy).toHaveBeenCalledTimes(1); + expect(refreshElementSpy).toHaveBeenCalledWith(testNode); }); it("should call errorHandling when error is thrown", async () => { @@ -953,7 +953,7 @@ describe("USS Action Unit Tests - function refreshDirectory", () => { }); const errorHandlingSpy = jest.spyOn(utils, "errorHandling").mockImplementation(); await expect(ussNodeActions.refreshDirectory(testNode, testUSSTree)).resolves.not.toThrow(); - expect(errorHandlingSpy).toBeCalledTimes(1); + expect(errorHandlingSpy).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/LocalFileManagement.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/LocalFileManagement.unit.test.ts index aa65d54f7b..d2a77aa74d 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/LocalFileManagement.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/LocalFileManagement.unit.test.ts @@ -66,18 +66,18 @@ describe("LocalFileManagement unit tests", () => { mocks.mockIsDsNode.mockReturnValue(true); mocks.mockIsUnixNode.mockReturnValue(false); await LocalFileManagement.compareChosenFileContent(mocks.mockDsFileNode as any); - expect(mocks.mockDlDsSpy).toBeCalledTimes(2); - expect(mocks.mockDlUnixSpy).not.toBeCalled(); - expect(mocks.warnLogSpy).not.toBeCalled(); + expect(mocks.mockDlDsSpy).toHaveBeenCalledTimes(2); + expect(mocks.mockDlUnixSpy).not.toHaveBeenCalled(); + expect(mocks.warnLogSpy).not.toHaveBeenCalled(); }); it("should pass with 2 UNIX files chosen", async () => { const mocks = createGlobalMocks(); mocks.mockIsDsNode.mockReturnValue(false); mocks.mockIsUnixNode.mockReturnValue(true); await LocalFileManagement.compareChosenFileContent(mocks.mockDsFileNode as any); - expect(mocks.mockDlUnixSpy).toBeCalledTimes(2); - expect(mocks.mockDlDsSpy).not.toBeCalled(); - expect(mocks.warnLogSpy).not.toBeCalled(); + expect(mocks.mockDlUnixSpy).toHaveBeenCalledTimes(2); + expect(mocks.mockDlDsSpy).not.toHaveBeenCalled(); + expect(mocks.warnLogSpy).not.toHaveBeenCalled(); }); it("should pass with 1 MVS file & 1 UNIX file chosen", async () => { const mocks = createGlobalMocks(); @@ -85,18 +85,18 @@ describe("LocalFileManagement unit tests", () => { mocks.mockIsDsNode.mockReturnValueOnce(false); mocks.mockIsUnixNode.mockReturnValueOnce(true); await LocalFileManagement.compareChosenFileContent(mocks.mockDsFileNode as any); - expect(mocks.mockDlUnixSpy).toBeCalledTimes(1); - expect(mocks.mockDlDsSpy).toBeCalledTimes(1); - expect(mocks.warnLogSpy).not.toBeCalled(); + expect(mocks.mockDlUnixSpy).toHaveBeenCalledTimes(1); + expect(mocks.mockDlDsSpy).toHaveBeenCalledTimes(1); + expect(mocks.warnLogSpy).not.toHaveBeenCalled(); }); it("should log warning and return if MVS or UNIX file not chosen", async () => { const mocks = createGlobalMocks(); mocks.mockIsDsNode.mockReturnValue(false); mocks.mockIsUnixNode.mockReturnValue(false); await LocalFileManagement.compareChosenFileContent(mocks.mockDsFileNode as any); - expect(mocks.mockDlUnixSpy).not.toBeCalled(); - expect(mocks.mockDlDsSpy).not.toBeCalled(); - expect(mocks.warnLogSpy).toBeCalled(); + expect(mocks.mockDlUnixSpy).not.toHaveBeenCalled(); + expect(mocks.mockDlDsSpy).not.toHaveBeenCalled(); + expect(mocks.warnLogSpy).toHaveBeenCalled(); }); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/LoggerUtils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/LoggerUtils.unit.test.ts index 92272ae4f7..175b4e88a3 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/LoggerUtils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/LoggerUtils.unit.test.ts @@ -152,7 +152,7 @@ describe("Logger Utils Unit Tests - function initializeZoweLogger", () => { }); const errorMessageSpy = jest.spyOn(Gui, "errorMessage").mockImplementation(); expect(await logger.ZoweLogger.initializeZoweLogger(globalMocks.testContext)).toBeUndefined(); - expect(errorMessageSpy).toBeCalledTimes(1); + expect(errorMessageSpy).toHaveBeenCalledTimes(1); errorMessageSpy.mockClear(); }); it("should throw an error if output channel was not able to initialize", async () => { @@ -166,7 +166,7 @@ describe("Logger Utils Unit Tests - function initializeZoweLogger", () => { const errorMessageSpy = jest.spyOn(Gui, "errorMessage").mockImplementation(); expect(await logger.ZoweLogger.initializeZoweLogger(globalMocks.testContext)).toBeUndefined(); - expect(errorMessageSpy).toBeCalledTimes(1); + expect(errorMessageSpy).toHaveBeenCalledTimes(1); errorMessageSpy.mockClear(); }); }); @@ -236,7 +236,7 @@ describe("ZoweLogger.dispose()", () => { it("Output channel disposed", async () => { const spy = jest.spyOn(logger.ZoweLogger.zeOutputChannel, "dispose"); expect(await logger.ZoweLogger.disposeZoweLogger()).toBeUndefined(); - expect(spy).toBeCalled(); + expect(spy).toHaveBeenCalled(); }); }); @@ -250,6 +250,6 @@ describe("ZoweLogger.updateVscLoggerSetting", () => { get: jest.fn(), } as any); await (logger.ZoweLogger as any).updateVscLoggerSetting(testCLISetting); - expect(setCliLoggerSettingSpy).toBeCalledWith(true); + expect(setCliLoggerSettingSpy).toHaveBeenCalledWith(true); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts index 5c66cce018..46b6fc0463 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/ProfileManagement.unit.test.ts @@ -117,22 +117,22 @@ describe("ProfileManagement unit tests", () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(undefined); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.opCancelledSpy).toBeCalledWith("Operation Cancelled"); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.opCancelledSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("profile using basic authentication should see promptCredentials called when Update Credentials chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockUpdateChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.promptSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.promptSpy).toHaveBeenCalled(); }); it("profile using basic authentication should see editSession called when Edit Profile chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockEditProfChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.editSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.editSpy).toHaveBeenCalled(); }); it("profile using basic authentication should see editSession called when Delete Profile chosen with v2 profile", async () => { const mocks = createBlockMocks(createGlobalMocks()); @@ -142,8 +142,8 @@ describe("ProfileManagement unit tests", () => { }); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockDeleteProfChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.editSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.editSpy).toHaveBeenCalled(); }); it("profile using basic authentication should see hide session command called for profile in data set tree view", async () => { const mocks = createBlockMocks(createGlobalMocks()); @@ -154,7 +154,7 @@ describe("ProfileManagement unit tests", () => { mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockHideProfChosen); mocks.mockResolveQp.mockResolvedValueOnce(ProfileManagement["getPromptChangeForAllTreesOptions"]()[1]); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); expect(mocks.commandSpy).toHaveBeenLastCalledWith("zowe.ds.removeSession", mocks.mockDsSessionNode, null, false); }); }); @@ -171,29 +171,29 @@ describe("ProfileManagement unit tests", () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(undefined); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.opCancelledSpy).toBeCalledWith("Operation Cancelled"); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.opCancelledSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("profile using token authentication should see ssoLogin called when Log in to authentication service chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockLoginChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.loginSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.loginSpy).toHaveBeenCalled(); }); it("profile using token authentication should see ssoLogout called when Log out from authentication service chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockLogoutChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.logoutSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.logoutSpy).toHaveBeenCalled(); }); it("profile using token authentication should see correct command called for hiding a unix tree session node", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockHideProfChosen); mocks.mockResolveQp.mockResolvedValueOnce(ProfileManagement["getPromptChangeForAllTreesOptions"]()[1]); await ProfileManagement.manageProfile(mocks.mockUnixSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); expect(mocks.commandSpy).toHaveBeenLastCalledWith("zowe.uss.removeSession", mocks.mockUnixSessionNode, null, false); }); it("profile using token authentication should see correct command called for enabling validation a unix tree session node", async () => { @@ -201,7 +201,7 @@ describe("ProfileManagement unit tests", () => { mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockEnableValidationChosen); mocks.mockResolveQp.mockResolvedValueOnce(ProfileManagement["getPromptChangeForAllTreesOptions"]()[1]); await ProfileManagement.manageProfile(mocks.mockTreeProviders.uss.mSessionNodes[0]); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg.replace("sestest", "zosmf")); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg.replace("sestest", "zosmf")); expect(mocks.commandSpy).toHaveBeenLastCalledWith("zowe.uss.enableValidation", mocks.mockTreeProviders.uss.mSessionNodes[0]); }); it("profile using token authentication should see correct command called for disabling validation a unix tree session node", async () => { @@ -209,7 +209,7 @@ describe("ProfileManagement unit tests", () => { mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockDisableValidationChosen); mocks.mockResolveQp.mockResolvedValueOnce(ProfileManagement["getPromptChangeForAllTreesOptions"]()[1]); await ProfileManagement.manageProfile(mocks.mockUnixSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); expect(mocks.commandSpy).toHaveBeenLastCalledWith("zowe.uss.disableValidation", mocks.mockUnixSessionNode); }); }); @@ -224,36 +224,36 @@ describe("ProfileManagement unit tests", () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(undefined); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.opCancelledSpy).toBeCalledWith("Operation Cancelled"); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.opCancelledSpy).toHaveBeenCalledWith("Operation Cancelled"); }); it("profile with no authentication method should see promptCredentials called when Add Basic Credentials chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockAddBasicChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.promptSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.promptSpy).toHaveBeenCalled(); }); it("profile with no authentication method should see ssoLogin called when Log in to authentication service chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockLoginChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.loginSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.loginSpy).toHaveBeenCalled(); }); it("profile with no authentication method should see editSession called when Edit Profile chosen", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockEditProfChosen); await ProfileManagement.manageProfile(mocks.mockDsSessionNode); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg); - expect(mocks.editSpy).toBeCalled(); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg); + expect(mocks.editSpy).toHaveBeenCalled(); }); it("profile using token authentication should see correct command called for enabling validation a data set tree session node", async () => { const mocks = createBlockMocks(createGlobalMocks()); mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockEnableValidationChosen); mocks.mockResolveQp.mockResolvedValueOnce(ProfileManagement["getPromptChangeForAllTreesOptions"]()[0]); await ProfileManagement.manageProfile(mocks.mockTreeProviders.ds.mSessionNodes[1]); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg.replace("sestest", "zosmf2")); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg.replace("sestest", "zosmf2")); expect(mocks.commandSpy).toHaveBeenLastCalledWith("zowe.ds.enableValidation", mocks.mockTreeProviders.ds.mSessionNodes[1]); }); it("profile using token authentication should see correct command called for disabling validation a data set tree session node", async () => { @@ -261,7 +261,7 @@ describe("ProfileManagement unit tests", () => { mocks.mockResolveQp.mockResolvedValueOnce(mocks.mockDisableValidationChosen); mocks.mockResolveQp.mockResolvedValueOnce(ProfileManagement["getPromptChangeForAllTreesOptions"]()[0]); await ProfileManagement.manageProfile(mocks.mockTreeProviders.ds.mSessionNodes[0]); - expect(mocks.debugLogSpy).toBeCalledWith(mocks.logMsg.replace("sestest", "zosmf")); + expect(mocks.debugLogSpy).toHaveBeenCalledWith(mocks.logMsg.replace("sestest", "zosmf")); expect(mocks.commandSpy).toHaveBeenLastCalledWith("zowe.ds.disableValidation", mocks.mockTreeProviders.ds.mSessionNodes[0]); }); }); @@ -272,7 +272,7 @@ describe("ProfileManagement unit tests", () => { const infoMessageSpy = jest.spyOn(Gui, "infoMessage"); jest.spyOn(ProfileManagement as any, "promptChangeForAllTrees").mockReturnValue(undefined); await expect(ProfileManagement["handleHideProfiles"](mocks.mockDsSessionNode)).resolves.toEqual(undefined); - expect(infoMessageSpy).toBeCalledTimes(1); + expect(infoMessageSpy).toHaveBeenCalledTimes(1); }); it("should hide the job session", async () => { const mocks = createGlobalMocks(); @@ -329,7 +329,7 @@ describe("ProfileManagement unit tests", () => { globalMocks.mockProfileInstance.allProfiles = []; const regSpy = jest.spyOn(blockMocks.registry, "registeredJesApiTypes"); expect(ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES)).toEqual([]); - expect(regSpy).not.toBeCalled(); + expect(regSpy).not.toHaveBeenCalled(); }); it("should return empty array when profile in allProfiles doesn't load", () => { const globalMocks = createGlobalMocks(); @@ -337,7 +337,7 @@ describe("ProfileManagement unit tests", () => { jest.spyOn(globalMocks.mockProfileInstance, "loadNamedProfile").mockReturnValue(undefined); const regSpy = jest.spyOn(blockMocks.registry, "registeredJesApiTypes"); expect(ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES)).toEqual([]); - expect(regSpy).not.toBeCalled(); + expect(regSpy).not.toHaveBeenCalled(); }); it("should return empty array when profile type isn't registered", () => { const blockMocks = createBlockMocks(createGlobalMocks()); @@ -360,7 +360,7 @@ describe("ProfileManagement unit tests", () => { configurable: true, }); expect(ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES)).toEqual([]); - expect(warnSpy).toBeCalledWith(thrownError); + expect(warnSpy).toHaveBeenCalledWith(thrownError); }); }); @@ -387,10 +387,10 @@ describe("ProfileManagement unit tests", () => { } as any); resolveQuickPickSpy.mockResolvedValue(expectedResult); await expect(ProfileManagement["promptChangeForAllTrees"]("test", true)).resolves.toEqual(expectedResult); - expect(createQuickPickSpy).toBeCalledTimes(1); - expect(resolveQuickPickSpy).toBeCalledTimes(1); - expect(showSpy).toBeCalledTimes(1); - expect(hideSpy).toBeCalledTimes(1); + expect(createQuickPickSpy).toHaveBeenCalledTimes(1); + expect(resolveQuickPickSpy).toHaveBeenCalledTimes(1); + expect(showSpy).toHaveBeenCalledTimes(1); + expect(hideSpy).toHaveBeenCalledTimes(1); }); }); describe("getRegisteredProfileNameList unit tests", () => { @@ -435,7 +435,7 @@ describe("ProfileManagement unit tests", () => { globalMocks.mockProfileInstance.allProfiles = []; const regSpy = jest.spyOn(blockMocks.registry, "registeredJesApiTypes"); expect(ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES)).toEqual([]); - expect(regSpy).not.toBeCalled(); + expect(regSpy).not.toHaveBeenCalled(); }); it("should return empty array when profile in allProfiles doesn't load", () => { const globalMocks = createGlobalMocks(); @@ -443,7 +443,7 @@ describe("ProfileManagement unit tests", () => { jest.spyOn(globalMocks.mockProfileInstance, "loadNamedProfile").mockReturnValue(undefined); const regSpy = jest.spyOn(blockMocks.registry, "registeredJesApiTypes"); expect(ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES)).toEqual([]); - expect(regSpy).not.toBeCalled(); + expect(regSpy).not.toHaveBeenCalled(); }); it("should return empty array when profile type isn't registered", () => { const blockMocks = createBlockMocks(createGlobalMocks()); @@ -466,7 +466,7 @@ describe("ProfileManagement unit tests", () => { configurable: true, }); expect(ProfileManagement.getRegisteredProfileNameList(globals.Trees.JES)).toEqual([]); - expect(warnSpy).toBeCalledWith(thrownError); + expect(warnSpy).toHaveBeenCalledWith(thrownError); }); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts index 7ab4bebef5..cd8c29f818 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/ProfilesUtils.unit.test.ts @@ -91,8 +91,8 @@ describe("ProfilesUtils unit tests", () => { const label = "test"; const moreInfo = "Task failed successfully"; await profUtils.errorHandling(errorDetails, label, moreInfo); - expect(Gui.errorMessage).toBeCalledWith(moreInfo + ` Error: ${errorDetails.message}`); - expect(ZoweLogger.error).toBeCalledWith( + expect(Gui.errorMessage).toHaveBeenCalledWith(moreInfo + ` Error: ${errorDetails.message}`); + expect(ZoweLogger.error).toHaveBeenCalledWith( `${errorDetails.toString()}\n` + util.inspect({ errorDetails, label, moreInfo }, { depth: null }) ); }); @@ -108,8 +108,8 @@ describe("ProfilesUtils unit tests", () => { const label = "test"; const moreInfo = "Task failed successfully"; await profUtils.errorHandling(errorDetails, label, moreInfo as unknown as string); - expect(Gui.errorMessage).toBeCalledWith(`${moreInfo} ` + errorDetails); - expect(ZoweLogger.error).toBeCalledWith( + expect(Gui.errorMessage).toHaveBeenCalledWith(`${moreInfo} ` + errorDetails); + expect(ZoweLogger.error).toHaveBeenCalledWith( `Error: ${errorDetails.message}\n` + util.inspect({ errorDetails, label, moreInfo }, { depth: null }) ); }); @@ -139,7 +139,7 @@ describe("ProfilesUtils unit tests", () => { }), }); await profUtils.errorHandling(errorDetails, label, moreInfo); - expect(spyOpenConfigFile).toBeCalledTimes(1); + expect(spyOpenConfigFile).toHaveBeenCalledTimes(1); }); it("should handle error for invalid credentials and prompt for authentication", async () => { @@ -160,8 +160,8 @@ describe("ProfilesUtils unit tests", () => { getSecurePropsForProfile: () => [], } as any); await profUtils.errorHandling(errorDetails, label, moreInfo); - expect(showMessageSpy).toBeCalledTimes(1); - expect(promptCredsSpy).toBeCalledTimes(1); + expect(showMessageSpy).toHaveBeenCalledTimes(1); + expect(promptCredsSpy).toHaveBeenCalledTimes(1); showMessageSpy.mockClear(); promptCredsSpy.mockClear(); }); @@ -184,9 +184,9 @@ describe("ProfilesUtils unit tests", () => { ssoLogin: ssoLoginSpy, } as any); await profUtils.errorHandling(errorDetails, label, moreInfo); - expect(showMessageSpy).toBeCalledTimes(1); - expect(ssoLoginSpy).toBeCalledTimes(1); - expect(showErrorSpy).not.toBeCalled(); + expect(showMessageSpy).toHaveBeenCalledTimes(1); + expect(ssoLoginSpy).toHaveBeenCalledTimes(1); + expect(showErrorSpy).not.toHaveBeenCalled(); showErrorSpy.mockClear(); showMessageSpy.mockClear(); ssoLoginSpy.mockClear(); @@ -213,9 +213,9 @@ describe("ProfilesUtils unit tests", () => { ssoLogin: ssoLoginSpy, } as any); await profUtils.errorHandling(errorDetails, label, moreInfo); - expect(showErrorSpy).toBeCalledTimes(1); - expect(ssoLoginSpy).toBeCalledTimes(1); - expect(showMessageSpy).not.toBeCalled(); + expect(showErrorSpy).toHaveBeenCalledTimes(1); + expect(ssoLoginSpy).toHaveBeenCalledTimes(1); + expect(showMessageSpy).not.toHaveBeenCalled(); showErrorSpy.mockClear(); showMessageSpy.mockClear(); ssoLoginSpy.mockClear(); @@ -248,9 +248,9 @@ describe("ProfilesUtils unit tests", () => { getSecurePropsForProfile: () => [], } as any); await profUtils.errorHandling(errorDetails, label, moreInfo); - expect(showErrorSpy).toBeCalledTimes(1); - expect(promptCredentialsSpy).not.toBeCalled(); - expect(showMsgSpy).toBeCalledWith("Operation Cancelled"); + expect(showErrorSpy).toHaveBeenCalledTimes(1); + expect(promptCredentialsSpy).not.toHaveBeenCalled(); + expect(showMsgSpy).toHaveBeenCalledWith("Operation Cancelled"); showErrorSpy.mockClear(); showMsgSpy.mockClear(); promptCredentialsSpy.mockClear(); @@ -273,8 +273,8 @@ describe("ProfilesUtils unit tests", () => { getSecurePropsForProfile: () => [], } as any); await profUtils.errorHandling(errorDetails, label, moreInfo); - expect(showErrorSpy).toBeCalledTimes(1); - expect(promptCredentialsSpy).not.toBeCalled(); + expect(showErrorSpy).toHaveBeenCalledTimes(1); + expect(promptCredentialsSpy).not.toHaveBeenCalled(); showErrorSpy.mockClear(); promptCredentialsSpy.mockClear(); }); @@ -539,7 +539,7 @@ describe("ProfilesUtils unit tests", () => { JSON.stringify({ overrides: { CredentialManager: "@zowe/cli", testValue: true } }, null, 2) ); profUtils.ProfilesUtils.writeOverridesFile(); - expect(blockMocks.mockWriteFileSync).toBeCalledTimes(0); + expect(blockMocks.mockWriteFileSync).toHaveBeenCalledTimes(0); }); it("should return and have no change to the existing file if PROFILE_SECURITY matches file", () => { @@ -547,7 +547,7 @@ describe("ProfilesUtils unit tests", () => { const fileJson = blockMocks.mockFileRead; blockMocks.mockReadFileSync.mockReturnValueOnce(JSON.stringify(fileJson, null, 2)); profUtils.ProfilesUtils.writeOverridesFile(); - expect(blockMocks.mockWriteFileSync).toBeCalledTimes(0); + expect(blockMocks.mockWriteFileSync).toHaveBeenCalledTimes(0); }); it("should add credential manager overrides object to existing object", () => { @@ -559,8 +559,8 @@ describe("ProfilesUtils unit tests", () => { const mergedJson = { ...blockMocks.mockFileRead, ...fileJson }; const mergedString = JSON.stringify(mergedJson, null, 2); profUtils.ProfilesUtils.writeOverridesFile(); - expect(blockMocks.mockWriteFileSync).toBeCalledTimes(1); - expect(blockMocks.mockWriteFileSync).toBeCalledWith(blockMocks.zoweDir, mergedString, { encoding: "utf-8", flag: "w" }); + expect(blockMocks.mockWriteFileSync).toHaveBeenCalledTimes(1); + expect(blockMocks.mockWriteFileSync).toHaveBeenCalledWith(blockMocks.zoweDir, mergedString, { encoding: "utf-8", flag: "w" }); }); it("should have not exist and create default file", () => { @@ -574,8 +574,8 @@ describe("ProfilesUtils unit tests", () => { const loggerSpy = jest.spyOn(ZoweLogger, "debug"); const content = JSON.stringify(blockMocks.mockFileRead, null, 2); profUtils.ProfilesUtils.writeOverridesFile(); - expect(loggerSpy).toBeCalledWith("Reading imperative.json failed. Will try to create file."); - expect(blockMocks.mockWriteFileSync).toBeCalledWith(blockMocks.zoweDir, content, { encoding: "utf-8", flag: "w" }); + expect(loggerSpy).toHaveBeenCalledWith("Reading imperative.json failed. Will try to create file."); + expect(blockMocks.mockWriteFileSync).toHaveBeenCalledWith(blockMocks.zoweDir, content, { encoding: "utf-8", flag: "w" }); expect(blockMocks.mockWriteFileSync).not.toThrowError(); }); @@ -587,7 +587,7 @@ describe("ProfilesUtils unit tests", () => { blockMocks.mockReadFileSync.mockReturnValueOnce(JSON.stringify(fileJson, null, 2).slice(1)); const writeFileSpy = jest.spyOn(fs, "writeFileSync"); expect(profUtils.ProfilesUtils.writeOverridesFile).not.toThrow(); - expect(writeFileSpy).toBeCalled(); + expect(writeFileSpy).toHaveBeenCalled(); }); }); @@ -658,7 +658,7 @@ describe("ProfilesUtils unit tests", () => { await expect((profUtils.ProfilesUtils as any).activateCredentialManagerOverride(credentialManagerExtension)).resolves.toEqual( {} as zowe.imperative.ICredentialManagerConstructor ); - expect(activateSpy).toBeCalledTimes(1); + expect(activateSpy).toHaveBeenCalledTimes(1); }); it("should successfully activate the extension passed in but return undefined if no exports are found", async () => { @@ -670,7 +670,7 @@ describe("ProfilesUtils unit tests", () => { } as any; await expect((profUtils.ProfilesUtils as any).activateCredentialManagerOverride(credentialManagerExtension)).resolves.toEqual(undefined); - expect(activateSpy).toBeCalledTimes(1); + expect(activateSpy).toHaveBeenCalledTimes(1); }); it("should throw an error if the extension fails to activate", async () => { @@ -699,8 +699,8 @@ describe("ProfilesUtils unit tests", () => { const setGlobalSecurityValueSpy = jest.spyOn(globals, "setGlobalSecurityValue"); const recordCredMgrInConfigSpy = jest.spyOn(zowe.imperative.CredentialManagerOverride, "recordCredMgrInConfig"); await profUtils.ProfilesUtils.updateCredentialManagerSetting("@zowe/cli"); - expect(setGlobalSecurityValueSpy).toBeCalledWith("@zowe/cli"); - expect(recordCredMgrInConfigSpy).toBeCalledWith("@zowe/cli"); + expect(setGlobalSecurityValueSpy).toHaveBeenCalledWith("@zowe/cli"); + expect(recordCredMgrInConfigSpy).toHaveBeenCalledWith("@zowe/cli"); }); }); @@ -791,7 +791,7 @@ describe("ProfilesUtils unit tests", () => { throw new Error("test error"); }); expect(profUtils.ProfilesUtils.isVSCodeCredentialPluginInstalled("test")).toBe(false); - expect(zoweLoggerTraceSpy).toBeCalledTimes(1); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(1); }); }); @@ -820,7 +820,7 @@ describe("ProfilesUtils unit tests", () => { }); expect(profUtils.ProfilesUtils.getCredentialManagerOverride()).toBe("My Custom Credential Manager"); - expect(zoweLoggerTraceSpy).toBeCalledTimes(1); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(1); }); it("should return default manager if the override file does not exist", () => { @@ -836,8 +836,8 @@ describe("ProfilesUtils unit tests", () => { expect(err).toBe("test"); } - expect(zoweLoggerTraceSpy).toBeCalledTimes(1); - expect(zoweLoggerInfoSpy).toBeCalledTimes(1); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(1); + expect(zoweLoggerInfoSpy).toHaveBeenCalledTimes(1); }); }); @@ -862,8 +862,8 @@ describe("ProfilesUtils unit tests", () => { credMgrZEName: "test", }) ).resolves.toEqual({} as zowe.imperative.ProfileInfo); - expect(zoweLoggerTraceSpy).toBeCalledTimes(2); - expect(zoweLoggerInfoSpy).toBeCalledTimes(1); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(2); + expect(zoweLoggerInfoSpy).toHaveBeenCalledTimes(1); }); }); @@ -891,9 +891,9 @@ describe("ProfilesUtils unit tests", () => { }); await expect(profUtils.ProfilesUtils["fetchRegisteredPlugins"]()).resolves.not.toThrow(); - expect(zoweLoggerTraceSpy).toBeCalledTimes(1); - expect(updateCredentialManagerSettingSpy).toBeCalledTimes(0); - expect(setDirectValueSpy).toBeCalledTimes(0); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(1); + expect(updateCredentialManagerSettingSpy).toHaveBeenCalledTimes(0); + expect(setDirectValueSpy).toHaveBeenCalledTimes(0); }); it("suggest changing the override setting after finding a registered custom credential manager and selecting 'yes'", async () => { @@ -914,9 +914,9 @@ describe("ProfilesUtils unit tests", () => { jest.spyOn(Gui, "infoMessage").mockResolvedValue("Yes"); await expect(profUtils.ProfilesUtils["fetchRegisteredPlugins"]()).resolves.not.toThrow(); - expect(zoweLoggerTraceSpy).toBeCalledTimes(2); - expect(updateCredentialManagerSettingSpy).toBeCalledTimes(1); - expect(setDirectValueSpy).toBeCalledTimes(1); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(2); + expect(updateCredentialManagerSettingSpy).toHaveBeenCalledTimes(1); + expect(setDirectValueSpy).toHaveBeenCalledTimes(1); }); it("suggest changing the override setting and selecting 'no' and should keep the default manager", async () => { @@ -937,9 +937,9 @@ describe("ProfilesUtils unit tests", () => { jest.spyOn(Gui, "infoMessage").mockResolvedValue("Don't ask again"); await expect(profUtils.ProfilesUtils["fetchRegisteredPlugins"]()).resolves.not.toThrow(); - expect(zoweLoggerTraceSpy).toBeCalledTimes(1); - expect(updateCredentialManagerSettingSpy).toBeCalledTimes(0); - expect(setDirectValueSpy).toBeCalledTimes(1); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(1); + expect(updateCredentialManagerSettingSpy).toHaveBeenCalledTimes(0); + expect(setDirectValueSpy).toHaveBeenCalledTimes(1); }); }); @@ -968,8 +968,8 @@ describe("ProfilesUtils unit tests", () => { credMgrZEName: "test", }) ).resolves.not.toThrow(); - expect(zoweLoggerTraceSpy).toBeCalledTimes(1); - expect(reloadWindowSpy).toBeCalledWith("workbench.action.reloadWindow"); + expect(zoweLoggerTraceSpy).toHaveBeenCalledTimes(1); + expect(reloadWindowSpy).toHaveBeenCalledWith("workbench.action.reloadWindow"); }); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/SessionUtils.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/SessionUtils.unit.test.ts index 649455521d..cfa4530a78 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/SessionUtils.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/SessionUtils.unit.test.ts @@ -59,13 +59,13 @@ describe("SessionUtils removeSession Unit Tests", () => { const blockMocks = createBlockMocks(); jest.spyOn(blockMocks.testDatasetTree, "getTreeType").mockReturnValue(PersistenceSchemaEnum.Job); await removeSession(blockMocks.testDatasetTree, "SESTEST"); - expect(blockMocks.testDatasetTree.removeFileHistory).toBeCalledTimes(0); + expect(blockMocks.testDatasetTree.removeFileHistory).toHaveBeenCalledTimes(0); }); it("should run treeProvider.removeFileHistory", async () => { const blockMocks = createBlockMocks(); jest.spyOn(blockMocks.testDatasetTree, "getTreeType").mockReturnValue(PersistenceSchemaEnum.USS); jest.spyOn(blockMocks.testDatasetTree, "getFileHistory").mockReturnValue(["[SESTEST]: /u/test/test.txt"]); await removeSession(blockMocks.testDatasetTree, "SESTEST"); - expect(blockMocks.testDatasetTree.removeFileHistory).toBeCalledTimes(1); + expect(blockMocks.testDatasetTree.removeFileHistory).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/SettingsConfig.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/SettingsConfig.unit.test.ts index 2b5393113e..1fbd148ed8 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/SettingsConfig.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/SettingsConfig.unit.test.ts @@ -41,8 +41,8 @@ describe("SettingsConfig Unit Tests", () => { const setValueSpy = jest.spyOn(ZoweLocalStorage, "setValue"); const promptReloadSpy = jest.spyOn(SettingsConfig as any, "promptReload"); await (SettingsConfig as any).migrateToLocalStorage(); - expect(setValueSpy).toBeCalledTimes(6); - expect(promptReloadSpy).toBeCalledTimes(1); + expect(setValueSpy).toHaveBeenCalledTimes(6); + expect(promptReloadSpy).toHaveBeenCalledTimes(1); }); }); @@ -167,7 +167,7 @@ describe("SettingsConfig Unit Tests", () => { jest.spyOn(ZoweLocalStorage, "getValue").mockReturnValueOnce(false); const migrateToLocalStorageSpy = jest.spyOn(SettingsConfig as any, "migrateToLocalStorage"); await expect(SettingsConfig.standardizeSettings()).resolves.not.toThrow(); - expect(migrateToLocalStorageSpy).toBeCalledTimes(1); + expect(migrateToLocalStorageSpy).toHaveBeenCalledTimes(1); }); }); }); diff --git a/packages/zowe-explorer/__tests__/__unit__/utils/TempFolder.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/utils/TempFolder.unit.test.ts index f38165db2d..1f918f1f1f 100644 --- a/packages/zowe-explorer/__tests__/__unit__/utils/TempFolder.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/utils/TempFolder.unit.test.ts @@ -65,10 +65,10 @@ describe("TempFolder Unit Tests", () => { jest.spyOn(fs, "existsSync").mockReturnValue(true); const moveSyncSpy = jest.spyOn(fsExtra, "moveSync"); await expect(TempFolder.moveTempFolder("testpath12", "testpath123")).resolves.toEqual(undefined); - expect(moveSyncSpy).toBeCalledTimes(1); + expect(moveSyncSpy).toHaveBeenCalledTimes(1); const expectedPath1 = process.platform === "win32" ? blockMocks.winPath : blockMocks.unixPath.split(path.sep).join(path.posix.sep); const expectedPath2 = process.platform === "win32" ? blockMocks.winPath2 : blockMocks.unixPath2.split(path.sep).join(path.posix.sep); - expect(moveSyncSpy).toBeCalledWith(expectedPath1, expectedPath2, { overwrite: true }); + expect(moveSyncSpy).toHaveBeenCalledWith(expectedPath1, expectedPath2, { overwrite: true }); }); it("moveTempFolder should catch the error upon running moveSync", async () => { @@ -80,8 +80,8 @@ describe("TempFolder Unit Tests", () => { }); const errorMessageSpy = jest.spyOn(Gui, "errorMessage").mockImplementation(); await expect(TempFolder.moveTempFolder("testpath32", "testpath123")).resolves.toEqual(undefined); - expect(errorMessageSpy).toBeCalledTimes(1); - expect(ZoweLogger.error).toBeCalledTimes(1); + expect(errorMessageSpy).toHaveBeenCalledTimes(1); + expect(ZoweLogger.error).toHaveBeenCalledTimes(1); }); it("moveTempFolder should throw errors when a filesystem exception occurs", async () => { @@ -126,13 +126,13 @@ describe("TempFolder Unit Tests", () => { } as any); TempFolder.cleanDir("./sampleDir"); - expect(readdirSyncSpy).toBeCalledTimes(1); + expect(readdirSyncSpy).toHaveBeenCalledTimes(1); }); it("hideTempFolder should hide local directory from workspace", async () => { jest.spyOn(SettingsConfig, "getDirectValue").mockReturnValue(true); const setDirectValueSpy = jest.spyOn(SettingsConfig, "setDirectValue").mockImplementation(); await expect(TempFolder.hideTempFolder("test")).resolves.not.toThrow(); - expect(setDirectValueSpy).toBeCalledTimes(1); + expect(setDirectValueSpy).toHaveBeenCalledTimes(1); }); }); From fb61f05e1a3c069d768820caa10ed9717b692645 Mon Sep 17 00:00:00 2001 From: zFernand0 <37381190+zFernand0@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:48:58 +0000 Subject: [PATCH 9/9] update lerna.json :yum: Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 0bda805a36..12b8462910 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "3.0.0-next.202402071248", + "version": "3.0.0-next.202402140000", "command": { "version": { "forcePublish": true,