mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ui): submit warning acknowledgement tokens
This commit is contained in:
@@ -13,6 +13,7 @@ describe("readPluginInstallPolicyWarning", () => {
|
||||
targetType: "plugin",
|
||||
requestMode: "install",
|
||||
reason: " ClawScan found issues to review. ",
|
||||
acknowledgementToken: " approval-token ",
|
||||
findings: [
|
||||
{
|
||||
ruleId: "semgrep-finding",
|
||||
@@ -32,6 +33,7 @@ describe("readPluginInstallPolicyWarning", () => {
|
||||
targetType: "plugin",
|
||||
requestMode: "install",
|
||||
reason: "ClawScan found issues to review.",
|
||||
acknowledgementToken: "approval-token",
|
||||
findings: [
|
||||
{
|
||||
ruleId: "semgrep-finding",
|
||||
|
||||
@@ -156,6 +156,7 @@ const installPolicyWarning = {
|
||||
targetType: "plugin",
|
||||
requestMode: "install",
|
||||
reason: "ClawScan found issues to review.",
|
||||
acknowledgementToken: "approval-token",
|
||||
findings: [
|
||||
{
|
||||
ruleId: "semgrep-finding",
|
||||
@@ -718,7 +719,7 @@ describeControlUiE2e("Control UI Plugins mocked Gateway E2E", () => {
|
||||
expect(requestParams(retry)).toEqual({
|
||||
source: "clawhub",
|
||||
packageName: "@openclaw/lobster",
|
||||
acknowledgeInstallPolicyWarning: true,
|
||||
installPolicyWarningAcknowledgement: "approval-token",
|
||||
});
|
||||
} finally {
|
||||
await context.close();
|
||||
|
||||
@@ -690,6 +690,7 @@ describe("renderPlugins", () => {
|
||||
targetType: "plugin",
|
||||
requestMode: "install",
|
||||
reason: "ClawScan found issues to review.",
|
||||
acknowledgementToken: "approval-token",
|
||||
findings: [
|
||||
{
|
||||
ruleId: "semgrep-finding",
|
||||
@@ -740,7 +741,7 @@ describe("renderPlugins", () => {
|
||||
actionButton(alert, "Install anyway")?.click();
|
||||
expect(onInstall).toHaveBeenCalledWith(key, {
|
||||
...request,
|
||||
acknowledgeInstallPolicyWarning: true,
|
||||
installPolicyWarningAcknowledgement: "approval-token",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@ function renderRowMessage(
|
||||
@click=${() =>
|
||||
props.onInstall(key, {
|
||||
...request,
|
||||
acknowledgeInstallPolicyWarning: true,
|
||||
installPolicyWarningAcknowledgement: details.acknowledgementToken,
|
||||
})}
|
||||
>
|
||||
${busy ? t("pluginsPage.installing") : t("pluginsPage.installAnyway")}
|
||||
|
||||
Reference in New Issue
Block a user