mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ui): contain install policy review clicks
This commit is contained in:
@@ -734,6 +734,8 @@ describe("renderPlugins", () => {
|
||||
technicalDetails.querySelector("summary")?.click();
|
||||
expect(technicalDetails.open).toBe(true);
|
||||
expect(onShowDetails).not.toHaveBeenCalled();
|
||||
technicalDetails.querySelector<HTMLElement>(".plugins-policy-review__details-body")?.click();
|
||||
expect(onShowDetails).not.toHaveBeenCalled();
|
||||
|
||||
actionButton(alert, "Cancel")?.click();
|
||||
expect(onDismissMessage).toHaveBeenCalledWith(key);
|
||||
|
||||
@@ -392,7 +392,10 @@ function renderRowMessage(
|
||||
? details.reason
|
||||
: t("pluginsPage.policyReviewBodyKnown", { count: String(findings.length) });
|
||||
return html`
|
||||
<div class="plugins-row-message plugins-row-message--warning" role="alert">
|
||||
<div
|
||||
class="plugins-row-message plugins-row-message--warning plugins-policy-review"
|
||||
role="alert"
|
||||
>
|
||||
<div class="plugins-policy-review__header">
|
||||
<span class="plugins-policy-review__icon" aria-hidden="true">
|
||||
${icons.alertTriangle}
|
||||
@@ -501,7 +504,7 @@ function renderRowMessage(
|
||||
function fromInteractiveChild(event: Event): boolean {
|
||||
return Boolean(
|
||||
(event.target as HTMLElement | null)?.closest(
|
||||
"button, a, input, label, form, summary, [role='menu']",
|
||||
"button, a, input, label, form, summary, .plugins-policy-review, [role='menu']",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user