Skip to content

Commit

Permalink
chore: address PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com>
  • Loading branch information
zFernand0 committed Jul 29, 2024
1 parent 56ee155 commit 35d25b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions packages/zowe-explorer-api/src/tree/IZoweTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import * as imperative from "@zowe/imperative";
import { IZoweTreeNode, ZosEncoding } from "./IZoweTreeNode";
import { PersistenceSchemaEnum } from "../profiles/UserSettings";
import { Types } from "../Types";
import { Validation } from "../profiles/Validation";

/**
* The base interface for Zowe tree browsers that implement the
Expand Down Expand Up @@ -94,10 +95,10 @@ export interface IZoweTree<T> extends vscode.TreeDataProvider<T>, Partial<vscode
createZoweSchema(zoweFileProvider: IZoweTree<IZoweTreeNode>): void | Promise<void>;

/**
* Adds a favorite node
* @param favorite Adds a favorite node
* Validates the profile for the given node
* @param node Node to validate/check its current profile
*/
checkCurrentProfile(node: IZoweTreeNode): void | Promise<void>;
checkCurrentProfile(node: IZoweTreeNode): Validation.IValidationProfile | Promise<Validation.IValidationProfile>;

/**
* Log in to authentication service
Expand Down
6 changes: 4 additions & 2 deletions packages/zowe-explorer/__tests__/__mocks__/USSTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import * as vscode from "vscode";
import { IZoweUSSTreeNode, IZoweDatasetTreeNode, IZoweTreeNode } from "@zowe/zowe-explorer-api";
import { IZoweUSSTreeNode, IZoweDatasetTreeNode, IZoweTreeNode, Validation } from "@zowe/zowe-explorer-api";
import { ZoweUSSNode } from "../../src/trees/uss/ZoweUSSNode";
import { MockMethod } from "../__decorators__/MockMethod";
import { createTreeView } from "./mockCreators/shared";
Expand Down Expand Up @@ -98,7 +98,9 @@ export class USSTree implements vscode.TreeDataProvider<ZoweUSSNode> {
* @memberof USSTree
*/
@MockMethod()
public async checkCurrentProfile(_node: IZoweUSSTreeNode): Promise<void> {}
public checkCurrentProfile(_node: IZoweUSSTreeNode): Validation.IValidationProfile | Promise<Validation.IValidationProfile> {
return { status: "inactive", name: "mock" };
}

/**
* @param {string} name - The name to remove from the file history array
Expand Down

0 comments on commit 35d25b1

Please sign in to comment.