Add new useGetBindableDataTypes
hook and use it for datatype selection
#18887
frontend-unit-tests.yml
on: push
CodeQL
4m 53s
Typechecking and linting
2m 18s
Testing
10m 22s
Annotations
10 errors
EditBinding without featureFlag › should render loading spinner:
frontend/packages/ux-editor/src/hooks/useGetLayoutSetByName.ts#L16
TypeError: Cannot read properties of undefined (reading 'sets')
at sets (packages/ux-editor/src/hooks/useGetLayoutSetByName.ts:16:29)
at useGetBindableDataTypes (packages/ux-editor/src/hooks/useGetBindableDataTypes.ts:16:42)
at SelectDataModelBinding (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataModelBinding.tsx:28:77)
at renderWithHooks (../node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (../node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at recoverFromConcurrentError (../node_modules/react-dom/cjs/react-dom.development.js:4383:170)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4442:126)
at flushSyncCallbacks (../node_modules/react-dom/cjs/react-dom.development.js:2155:108)
at ../node_modules/react-dom/cjs/react-dom.development.js:4323:1
at invokeTheCallbackFunction (../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
at ../node_modules/jsdom/lib/jsdom/browser/Window.js:554:9
|
EditBinding without featureFlag › should render loading spinner:
frontend/packages/ux-editor/src/hooks/useGetLayoutSetByName.ts#L16
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Uncaught [TypeError: Cannot read properties of undefined (reading 'sets')]
at reportException (../node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24)
at innerInvokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9)
at invokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (../node_modules/react-dom/cjs/react-dom.development.js:750:45)
at invokeGuardedCallback (../node_modules/react-dom/cjs/react-dom.development.js:771:126)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4706:1)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4438:63)
at flushSyncCallbacks (../node_modules/react-dom/cjs/react-dom.development.js:2155:108)
at ../node_modules/react-dom/cjs/react-dom.development.js:4323:1
at invokeTheCallbackFunction (../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
at ../node_modules/jsdom/lib/jsdom/browser/Window.js:554:9
at AsyncResource.runMicrotask (../node:internal/process/task_queues:137:8) {
detail: TypeError: Cannot read properties of undefined (reading 'sets')
at sets (packages/ux-editor/src/hooks/useGetLayoutSetByName.ts:16:29)
at useGetBindableDataTypes (packages/ux-editor/src/hooks/useGetBindableDataTypes.ts:16:42)
at SelectDataModelBinding (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataModelBinding.tsx:28:77)
at renderWithHooks (../node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (../node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at HTMLUnknownElement.callCallback (../node_modules/react-dom/cjs/react-dom.development.js:730:119)
at HTMLUnknownElement.callTheUserObjectsOperation (../node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30)
at innerInvokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25)
at invokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (../node_modules/react-dom/cjs/react-dom.development.js:750:45)
at invokeGuardedCallback (../node_modules/react-dom/cjs/react-dom.development.js:771:126)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4706:1)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.d
|
EditBinding without featureFlag › should render field set:
frontend/packages/ux-editor/src/hooks/useGetLayoutSetByName.ts#L16
TypeError: Cannot read properties of undefined (reading 'sets')
at sets (packages/ux-editor/src/hooks/useGetLayoutSetByName.ts:16:29)
at useGetBindableDataTypes (packages/ux-editor/src/hooks/useGetBindableDataTypes.ts:16:42)
at SelectDataModelBinding (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataModelBinding.tsx:28:77)
at renderWithHooks (../node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (../node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at recoverFromConcurrentError (../node_modules/react-dom/cjs/react-dom.development.js:4383:170)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4442:126)
at flushSyncCallbacks (../node_modules/react-dom/cjs/react-dom.development.js:2155:108)
at ../node_modules/react-dom/cjs/react-dom.development.js:4323:1
at invokeTheCallbackFunction (../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
at ../node_modules/jsdom/lib/jsdom/browser/Window.js:554:9
|
EditBinding without featureFlag › should render field set:
frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx#L107
TestingLibraryElementError: Unable to find an accessible element with the role "group" and name "label"
There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole
Ignored nodes: comments, script, style
<body>
<div />
</body>
at Object.getElementError (../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByRole (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx:107:29)
|
EditBinding without featureFlag › should render field set:
frontend/packages/ux-editor/src/hooks/useGetLayoutSetByName.ts#L16
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Uncaught [TypeError: Cannot read properties of undefined (reading 'sets')]
at reportException (../node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24)
at innerInvokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9)
at invokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (../node_modules/react-dom/cjs/react-dom.development.js:750:45)
at invokeGuardedCallback (../node_modules/react-dom/cjs/react-dom.development.js:771:126)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4706:1)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4438:63)
at flushSyncCallbacks (../node_modules/react-dom/cjs/react-dom.development.js:2155:108)
at ../node_modules/react-dom/cjs/react-dom.development.js:4323:1
at invokeTheCallbackFunction (../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
at ../node_modules/jsdom/lib/jsdom/browser/Window.js:554:9
at AsyncResource.runMicrotask (../node:internal/process/task_queues:137:8) {
detail: TypeError: Cannot read properties of undefined (reading 'sets')
at sets (packages/ux-editor/src/hooks/useGetLayoutSetByName.ts:16:29)
at useGetBindableDataTypes (packages/ux-editor/src/hooks/useGetBindableDataTypes.ts:16:42)
at SelectDataModelBinding (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataModelBinding.tsx:28:77)
at renderWithHooks (../node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (../node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at HTMLUnknownElement.callCallback (../node_modules/react-dom/cjs/react-dom.development.js:730:119)
at HTMLUnknownElement.callTheUserObjectsOperation (../node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30)
at innerInvokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25)
at invokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (../node_modules/react-dom/cjs/react-dom.development.js:750:45)
at invokeGuardedCallback (../node_modules/react-dom/cjs/react-dom.development.js:771:126)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4706:1)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.d
|
EditBinding without featureFlag › should render correct elements in field set:
frontend/packages/ux-editor/src/hooks/useGetLayoutSetByName.ts#L16
TypeError: Cannot read properties of undefined (reading 'sets')
at sets (packages/ux-editor/src/hooks/useGetLayoutSetByName.ts:16:29)
at useGetBindableDataTypes (packages/ux-editor/src/hooks/useGetBindableDataTypes.ts:16:42)
at SelectDataModelBinding (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataModelBinding.tsx:28:77)
at renderWithHooks (../node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (../node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at recoverFromConcurrentError (../node_modules/react-dom/cjs/react-dom.development.js:4383:170)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4442:126)
at flushSyncCallbacks (../node_modules/react-dom/cjs/react-dom.development.js:2155:108)
at ../node_modules/react-dom/cjs/react-dom.development.js:4323:1
at invokeTheCallbackFunction (../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
at ../node_modules/jsdom/lib/jsdom/browser/Window.js:554:9
|
EditBinding without featureFlag › should render correct elements in field set:
frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx#L123
TestingLibraryElementError: Unable to find an element with the text: label. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div />
</body>
at Object.getElementError (../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx:123:26)
|
EditBinding without featureFlag › should render correct elements in field set:
frontend/packages/ux-editor/src/hooks/useGetLayoutSetByName.ts#L16
Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs.
Error: Uncaught [TypeError: Cannot read properties of undefined (reading 'sets')]
at reportException (../node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24)
at innerInvokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9)
at invokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (../node_modules/react-dom/cjs/react-dom.development.js:750:45)
at invokeGuardedCallback (../node_modules/react-dom/cjs/react-dom.development.js:771:126)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4706:1)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4438:63)
at flushSyncCallbacks (../node_modules/react-dom/cjs/react-dom.development.js:2155:108)
at ../node_modules/react-dom/cjs/react-dom.development.js:4323:1
at invokeTheCallbackFunction (../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
at ../node_modules/jsdom/lib/jsdom/browser/Window.js:554:9
at AsyncResource.runMicrotask (../node:internal/process/task_queues:137:8) {
detail: TypeError: Cannot read properties of undefined (reading 'sets')
at sets (packages/ux-editor/src/hooks/useGetLayoutSetByName.ts:16:29)
at useGetBindableDataTypes (packages/ux-editor/src/hooks/useGetBindableDataTypes.ts:16:42)
at SelectDataModelBinding (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataModelBinding.tsx:28:77)
at renderWithHooks (../node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (../node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at HTMLUnknownElement.callCallback (../node_modules/react-dom/cjs/react-dom.development.js:730:119)
at HTMLUnknownElement.callTheUserObjectsOperation (../node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30)
at innerInvokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25)
at invokeEventListeners (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (../node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (../node_modules/react-dom/cjs/react-dom.development.js:750:45)
at invokeGuardedCallback (../node_modules/react-dom/cjs/react-dom.development.js:771:126)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4706:1)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.d
|
EditBinding without featureFlag › should display default data model and "choose datafield" when no bindings:
frontend/packages/ux-editor/src/hooks/useGetLayoutSetByName.ts#L16
TypeError: Cannot read properties of undefined (reading 'sets')
at sets (packages/ux-editor/src/hooks/useGetLayoutSetByName.ts:16:29)
at useGetBindableDataTypes (packages/ux-editor/src/hooks/useGetBindableDataTypes.ts:16:42)
at SelectDataModelBinding (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataModelBinding.tsx:28:77)
at renderWithHooks (../node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (../node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (../node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (../node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (../node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (../node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at recoverFromConcurrentError (../node_modules/react-dom/cjs/react-dom.development.js:4383:170)
at performSyncWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4442:126)
at flushSyncCallbacks (../node_modules/react-dom/cjs/react-dom.development.js:2155:108)
at ../node_modules/react-dom/cjs/react-dom.development.js:4323:1
at invokeTheCallbackFunction (../node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26)
at ../node_modules/jsdom/lib/jsdom/browser/Window.js:554:9
|
EditBinding without featureFlag › should display default data model and "choose datafield" when no bindings:
frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx#L156
TestingLibraryElementError: Unable to find an element with the text: defaultModel. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div />
</body>
at Object.getElementError (../node_modules/@testing-library/dom/dist/config.js:37:19)
at ../node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at ../node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at ../node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx:156:19)
|