Skip to content

Setting components throw exceptions in Jest tests in 1.18 of Experience Builder #232

Description

@Matt-at-Hyland

After upgrading to 1.18 from 1.17 the following error occurs when running Jest tests using with these components:

import {
SettingRow,
SettingSection,
} from "jimu-ui/advanced/setting-components";

TypeError: Cannot read properties of undefined (reading 'DataSourceSelector')

      43 |           width: 16px;
      44 |           height: 16px;
    > 45 |           background-image: url(${"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAsElEQVQ4jaWSLQ7EIBhEv2LxnAzP1cBzAU6DhKCpZneaQHYpP2k6omreCzA9yjf0IgyfGCMZY+g8zy2ADrpgmsA5R977raTC6IJpAiklCSEopTSVVBgddME0AeeclFJTSQ+jCwY5fh9xVERm8E0wkiAzeCjoJcgMbm/wJjdBf4XdOmwF49irdf4Es6l2E7MVXLOSXAJr7XKqkQTMFcwYQiha65JzLruggy4YZPgfPMkHXzQME+F7oHYAAAAASUVORK5CYII="});
         |                                                                                                                                                                                                                                                                                                                                                                                                ^
      46 |           position: relative;
      47 |           left: 18px;
      48 |           top: 12px;

      at Object.<anonymous>.System.register.setters (dist/jimu-ui/advanced/setting-components.js:45:4765)
      at dist/jimu-ui/advanced/setting-components.js:41:13
          at Array.forEach (<anonymous>)
      at SystemJS.Object.<anonymous>.System.register (dist/jimu-ui/advanced/setting-components.js:40:28)
      at Object.<anonymous> (dist/jimu-ui/advanced/setting-components.js:45:12)
      at hyland-widgets/widgets/content-widget/tests/setting.test.tsx:40:11
      at Object.<anonymous> (hyland-widgets/widgets/content-widget/src/setting/setting.tsx:5:1)
      at Object.<anonymous> (hyland-widgets/widgets/content-widget/tests/setting.test.tsx:5:1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions