Update dependency @digdir/design-system-react to v0.54.0 #15321
frontend-unit-tests.yml
on: push
CodeQL
4m 12s
Typechecking and linting
2m 34s
Testing
4m 43s
Building
2m 36s
Annotations
20 errors
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Textfield'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Textarea'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Alert'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Link'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Alert'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Combobox'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Spinner'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Heading'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Link'.
|
Typechecking and linting
Module '"@digdir/design-system-react"' has no exported member 'Table'.
|
StringRestrictions › format button should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at createFiberFromTypeAndProps (../node_modules/react-dom/cjs/react-dom.development.js:4845:677)
at createFiberFromElement (../node_modules/react-dom/cjs/react-dom.development.js:4845:1198)
at createChild (../node_modules/react-dom/cjs/react-dom.development.js:2308:224)
at reconcileChildrenArray (../node_modules/react-dom/cjs/react-dom.development.js:2346:56)
at reconcileChildFibers (../node_modules/react-dom/cjs/react-dom.development.js:2414:110)
at reconcileChildren (../node_modules/react-dom/cjs/react-dom.development.js:3128:22)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3312:339)
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 performConcurrentWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4347:126)
at flushActQueue (../node_modules/react/cjs/react.development.js:2337:28)
at act (../node_modules/react/cjs/react.development.js:2261:15)
at ../node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (../node_modules/@testing-library/react/dist/pure.js:204:26)
at render (../node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
|
StringRestrictions › format button should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
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.
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at onChangeRestrictionValue (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:26:3)
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at printWarning (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:187:34)
at error (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:164:11)
at Object.createElementWithValidation [as createElement] (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2066:11)
at createElement (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:169:13)
at renderWithHooks (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performConcurrentWorkOnRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4343:166)
at flushActQueue (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2337:28)
at act (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2261:15)
at /home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:204:26)
at render (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
at Object.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-each/build/bind.js:81:13)
at Promise.then.completed (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/run.js:316:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTes
|
StringRestrictions › minLength textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at createFiberFromTypeAndProps (../node_modules/react-dom/cjs/react-dom.development.js:4845:677)
at createFiberFromElement (../node_modules/react-dom/cjs/react-dom.development.js:4845:1198)
at createChild (../node_modules/react-dom/cjs/react-dom.development.js:2308:224)
at reconcileChildrenArray (../node_modules/react-dom/cjs/react-dom.development.js:2346:56)
at reconcileChildFibers (../node_modules/react-dom/cjs/react-dom.development.js:2414:110)
at reconcileChildren (../node_modules/react-dom/cjs/react-dom.development.js:3128:22)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3312:339)
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 performConcurrentWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4347:126)
at flushActQueue (../node_modules/react/cjs/react.development.js:2337:28)
at act (../node_modules/react/cjs/react.development.js:2261:15)
at ../node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (../node_modules/@testing-library/react/dist/pure.js:204:26)
at render (../node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
|
StringRestrictions › minLength textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
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.
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at onChangeRestrictionValue (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:26:3)
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at printWarning (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:187:34)
at error (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:164:11)
at Object.createElementWithValidation [as createElement] (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2066:11)
at createElement (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:169:13)
at renderWithHooks (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performConcurrentWorkOnRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4343:166)
at flushActQueue (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2337:28)
at act (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2261:15)
at /home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:204:26)
at render (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
at Object.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-each/build/bind.js:81:13)
at Promise.then.completed (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/run.js:316:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTes
|
StringRestrictions › maxLength textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at createFiberFromTypeAndProps (../node_modules/react-dom/cjs/react-dom.development.js:4845:677)
at createFiberFromElement (../node_modules/react-dom/cjs/react-dom.development.js:4845:1198)
at createChild (../node_modules/react-dom/cjs/react-dom.development.js:2308:224)
at reconcileChildrenArray (../node_modules/react-dom/cjs/react-dom.development.js:2346:56)
at reconcileChildFibers (../node_modules/react-dom/cjs/react-dom.development.js:2414:110)
at reconcileChildren (../node_modules/react-dom/cjs/react-dom.development.js:3128:22)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3312:339)
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 performConcurrentWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4347:126)
at flushActQueue (../node_modules/react/cjs/react.development.js:2337:28)
at act (../node_modules/react/cjs/react.development.js:2261:15)
at ../node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (../node_modules/@testing-library/react/dist/pure.js:204:26)
at render (../node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
|
StringRestrictions › maxLength textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
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.
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at onChangeRestrictionValue (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:26:3)
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at printWarning (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:187:34)
at error (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:164:11)
at Object.createElementWithValidation [as createElement] (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2066:11)
at createElement (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:169:13)
at renderWithHooks (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performConcurrentWorkOnRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4343:166)
at flushActQueue (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2337:28)
at act (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2261:15)
at /home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:204:26)
at render (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
at Object.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-each/build/bind.js:81:13)
at Promise.then.completed (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/run.js:316:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTes
|
StringRestrictions › pattern textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at createFiberFromTypeAndProps (../node_modules/react-dom/cjs/react-dom.development.js:4845:677)
at createFiberFromElement (../node_modules/react-dom/cjs/react-dom.development.js:4845:1198)
at createChild (../node_modules/react-dom/cjs/react-dom.development.js:2308:224)
at reconcileChildrenArray (../node_modules/react-dom/cjs/react-dom.development.js:2346:56)
at reconcileChildFibers (../node_modules/react-dom/cjs/react-dom.development.js:2414:110)
at reconcileChildren (../node_modules/react-dom/cjs/react-dom.development.js:3128:22)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3312:339)
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 performConcurrentWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4347:126)
at flushActQueue (../node_modules/react/cjs/react.development.js:2337:28)
at act (../node_modules/react/cjs/react.development.js:2261:15)
at ../node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (../node_modules/@testing-library/react/dist/pure.js:204:26)
at render (../node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
|
StringRestrictions › pattern textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
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.
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at onChangeRestrictionValue (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:26:3)
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at printWarning (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:187:34)
at error (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:164:11)
at Object.createElementWithValidation [as createElement] (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2066:11)
at createElement (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:169:13)
at renderWithHooks (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performConcurrentWorkOnRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4343:166)
at flushActQueue (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2337:28)
at act (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2261:15)
at /home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:204:26)
at render (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
at Object.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-each/build/bind.js:81:13)
at Promise.then.completed (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/run.js:316:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTes
|
StringRestrictions › pattern_test_field textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at createFiberFromTypeAndProps (../node_modules/react-dom/cjs/react-dom.development.js:4845:677)
at createFiberFromElement (../node_modules/react-dom/cjs/react-dom.development.js:4845:1198)
at createChild (../node_modules/react-dom/cjs/react-dom.development.js:2308:224)
at reconcileChildrenArray (../node_modules/react-dom/cjs/react-dom.development.js:2346:56)
at reconcileChildFibers (../node_modules/react-dom/cjs/react-dom.development.js:2414:110)
at reconcileChildren (../node_modules/react-dom/cjs/react-dom.development.js:3128:22)
at mountIndeterminateComponent (../node_modules/react-dom/cjs/react-dom.development.js:3312:339)
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 performConcurrentWorkOnRoot (../node_modules/react-dom/cjs/react-dom.development.js:4347:126)
at flushActQueue (../node_modules/react/cjs/react.development.js:2337:28)
at act (../node_modules/react/cjs/react.development.js:2261:15)
at ../node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (../node_modules/@testing-library/react/dist/pure.js:204:26)
at render (../node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
|
StringRestrictions › pattern_test_field textbox should appear by default:
frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx#L24
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.
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `StringRestrictions`.
at onChangeRestrictionValue (packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:26:3)
at console.captureMessage [as error] (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-fail-on-console/index.js:63:11)
at printWarning (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:187:34)
at error (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:164:11)
at Object.createElementWithValidation [as createElement] (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2066:11)
at createElement (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.tsx:169:13)
at renderWithHooks (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:2656:157)
at mountIndeterminateComponent (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3301:1445)
at beginWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:3640:93)
at beginWork$1 (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4696:93)
at performUnitOfWork (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4522:270)
at workLoopSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4508:30)
at renderRootSync (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4504:159)
at performConcurrentWorkOnRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/react-dom/cjs/react-dom.development.js:4343:166)
at flushActQueue (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2337:28)
at act (/home/runner/work/altinn-studio/altinn-studio/node_modules/react/cjs/react.development.js:2261:15)
at /home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/act-compat.js:70:25
at renderRoot (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:204:26)
at render (/home/runner/work/altinn-studio/altinn-studio/node_modules/@testing-library/react/dist/pure.js:296:10)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:24:9)
at renderStringRestrictions (/home/runner/work/altinn-studio/altinn-studio/frontend/packages/schema-editor/src/components/SchemaInspector/ItemRestrictions/StringRestrictions/StringRestrictions.test.tsx:36:5)
at Object.<anonymous> (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-each/build/bind.js:81:13)
at Promise.then.completed (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/home/runner/work/altinn-studio/altinn-studio/node_modules/jest-circus/build/run.js:316:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTes
|