diff --git a/oxlint-suppressions.json b/oxlint-suppressions.json index 2a3bb75e6b0..082500034b6 100644 --- a/oxlint-suppressions.json +++ b/oxlint-suppressions.json @@ -221,11 +221,6 @@ "count": 2 } }, - "web/app/components/app/configuration/config-prompt/prompt-editor-height-resize-wrap.tsx": { - "jsx-a11y/no-static-element-interactions": { - "count": 1 - } - }, "web/app/components/app/configuration/config-prompt/simple-prompt-input.tsx": { "typescript/no-explicit-any": { "count": 3 @@ -2947,7 +2942,7 @@ "count": 1 }, "jsx-a11y/no-static-element-interactions": { - "count": 6 + "count": 5 } }, "web/app/components/snippets/hooks/use-snippet-run.ts": { @@ -4438,7 +4433,7 @@ "count": 4 }, "jsx-a11y/no-static-element-interactions": { - "count": 5 + "count": 4 }, "typescript/no-explicit-any": { "count": 1 diff --git a/web/app/components/app/configuration/config-prompt/__tests__/prompt-editor-height-resize-wrap.spec.tsx b/web/app/components/app/configuration/config-prompt/__tests__/prompt-editor-height-resize-wrap.spec.tsx new file mode 100644 index 00000000000..86d6cad85c6 --- /dev/null +++ b/web/app/components/app/configuration/config-prompt/__tests__/prompt-editor-height-resize-wrap.spec.tsx @@ -0,0 +1,69 @@ +import { fireEvent, render, screen, waitFor } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { useState } from 'react' +import PromptEditorHeightResizeWrap from '../prompt-editor-height-resize-wrap' + +function Editor({ hideResize = false }: { hideResize?: boolean }) { + const [height, setHeight] = useState(200) + return ( + +