Skip to content

Commit 5dee237

Browse files
authored
Merge pull request #1015
* fix(33966): add an option filter to the selector * test(33966): add widget to the custom form testing wrapper * test(33966): add tests * test(33966): fix types and typescript dependencies * test(33966): add tests * test(33966): add tests * test(33966): add tests * test(33966): update mock wrapper * Revert "test(33966): add tests" * Update hivemq-edge-frontend/src/extensions/datahub/components/forms/F…
1 parent 9250584 commit 5dee237

File tree

9 files changed

+222
-137
lines changed

9 files changed

+222
-137
lines changed

hivemq-edge-frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@
129129
"@tanstack/eslint-plugin-query": "5.74.7",
130130
"@testing-library/jest-dom": "6.6.3",
131131
"@testing-library/react": "16.2.0",
132+
"@types/chai": "^5.2.2",
132133
"@types/debug": "4.1.12",
133-
"@types/jest": "29.5.1",
134134
"@types/luxon": "3.3.0",
135135
"@types/react": "18.0.28",
136136
"@types/react-dom": "18.0.11",

hivemq-edge-frontend/pnpm-lock.yaml

Lines changed: 15 additions & 129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hivemq-edge-frontend/src/__test-utils__/rjsf/CustomFormTesting.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ import { DescriptionFieldTemplate, ErrorListTemplate, TitleFieldTemplate } from
1313
interface CustomFormTestingProps
1414
extends Pick<
1515
FormProps<unknown>,
16-
'schema' | 'uiSchema' | 'formData' | 'onChange' | 'onSubmit' | 'onError' | 'formContext'
16+
| 'schema'
17+
| 'uiSchema'
18+
| 'formData'
19+
| 'onChange'
20+
| 'onBlur'
21+
| 'onFocus'
22+
| 'onSubmit'
23+
| 'onError'
24+
| 'formContext'
25+
| 'widgets'
1726
> {
1827
id?: string
1928
}
@@ -23,7 +32,10 @@ export const CustomFormTesting: FC<CustomFormTestingProps> = ({
2332
uiSchema,
2433
formData,
2534
formContext,
35+
widgets,
2636
onChange,
37+
onFocus,
38+
onBlur,
2739
onError,
2840
onSubmit,
2941
}) => {
@@ -35,10 +47,13 @@ export const CustomFormTesting: FC<CustomFormTestingProps> = ({
3547
formData={formData}
3648
formContext={formContext}
3749
onChange={onChange}
50+
onFocus={onFocus}
51+
onBlur={onBlur}
3852
onError={onError}
3953
onSubmit={onSubmit}
4054
liveValidate
4155
showErrorList="bottom"
56+
widgets={widgets}
4257
templates={{
4358
ObjectFieldTemplate,
4459
FieldTemplate,

0 commit comments

Comments
 (0)