Skip to content

Commit

Permalink
feat: add help link (#11663)
Browse files Browse the repository at this point in the history
* feat: add help link

* feat: add invalid action input unit test

* feat: update help link
  • Loading branch information
anchenyi authored May 21, 2024
1 parent 04a913c commit cdf282c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,13 @@ export class ValidateWithTestCasesDriver implements StepDriver {

private validateArgs(args: ValidateWithTestCasesArgs): Result<any, FxError> {
if (!args || !args.appPackagePath) {
return err(new InvalidActionInputError(actionName, ["appPackagePath"]));
return err(
new InvalidActionInputError(
actionName,
["appPackagePath"],
"https://aka.ms/teamsfx-actions/teamsapp-validate-test-cases"
)
);
}
return ok(undefined);
}
Expand Down
7 changes: 7 additions & 0 deletions packages/fx-core/tests/error/error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
assembleError,
FilePermissionError,
InternalError,
InvalidActionInputError,
matchDnsError,
UnhandledError,
UnhandledUserError,
Expand Down Expand Up @@ -177,6 +178,12 @@ describe("Errors", () => {
assert.isTrue(e1 instanceof InvalidYamlSchemaError);
assert.isTrue(e2 instanceof InvalidYamlSchemaError);
});
it("InvalidActionInputError", async () => {
const e1 = new InvalidActionInputError(".", []);
const e2 = new InvalidActionInputError(".", [], "https://aka.ms/teamsfx-actions");
assert.isTrue(e1 instanceof InvalidActionInputError);
assert.isTrue(e2 instanceof InvalidActionInputError);
});
});

describe("BaseComponentInnerError", () => {
Expand Down

0 comments on commit cdf282c

Please sign in to comment.