diff --git a/.changeset/funny-rockets-bake.md b/.changeset/funny-rockets-bake.md new file mode 100644 index 00000000000..886c1aa178f --- /dev/null +++ b/.changeset/funny-rockets-bake.md @@ -0,0 +1,5 @@ +--- +'@talend/scripts-config-jest': minor +--- + +Fix peer dependencies and adapt code to be compatible with pnpm diff --git a/.changeset/small-kiwis-end.md b/.changeset/small-kiwis-end.md new file mode 100644 index 00000000000..ac2b4b0c516 --- /dev/null +++ b/.changeset/small-kiwis-end.md @@ -0,0 +1,5 @@ +--- +'@talend/scripts-config-storybook-lib': patch +--- + +fix: icon url to support prefix diff --git a/packages/components/src/DataViewer/Headers/TreeHeader/TreeHeader.test.js b/packages/components/src/DataViewer/Headers/TreeHeader/TreeHeader.test.js index 81dd53fceae..1e1c3e7f210 100644 --- a/packages/components/src/DataViewer/Headers/TreeHeader/TreeHeader.test.js +++ b/packages/components/src/DataViewer/Headers/TreeHeader/TreeHeader.test.js @@ -2,13 +2,6 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import Component from './TreeHeader.component'; -jest.mock('react-i18next', () => { - // eslint-disable-next-line global-require - const mockTranslations = require('../../../../test/i18nMock').default; - - return mockTranslations(); -}); - describe('TreeHeader', () => { it('should render a simple tree header', () => { const { container } = render(); diff --git a/packages/components/src/DataViewer/Icons/TreeBranchIcon/TreeBranchIcon.test.js b/packages/components/src/DataViewer/Icons/TreeBranchIcon/TreeBranchIcon.test.js index 56fdcb54be1..f1d54ad4830 100644 --- a/packages/components/src/DataViewer/Icons/TreeBranchIcon/TreeBranchIcon.test.js +++ b/packages/components/src/DataViewer/Icons/TreeBranchIcon/TreeBranchIcon.test.js @@ -1,12 +1,6 @@ import { render, screen } from '@testing-library/react'; import Component, { getDefaultIcon } from './TreeBranchIcon.component'; jest.unmock('@talend/design-system'); -jest.mock('react-i18next', () => { - // eslint-disable-next-line global-require - const mockTranslations = require('../../../../test/i18nMock').default; - - return mockTranslations(); -}); describe('getDefaultIcon', () => { it('should return a custom object icon', () => { diff --git a/packages/components/src/Toggle/Toggle.stories.js b/packages/components/src/Toggle/Toggle.stories.js index 6d623ea7299..e8304eeb02d 100644 --- a/packages/components/src/Toggle/Toggle.stories.js +++ b/packages/components/src/Toggle/Toggle.stories.js @@ -1,5 +1,3 @@ -import { useState } from 'react'; -import PropTypes from 'prop-types'; import { action } from '@storybook/addon-actions'; import Toggle from './Toggle.component'; @@ -31,33 +29,6 @@ const withLabel = { label: 'Some label', }; -const labelToggleProps = { - values: [ - { value: 'val1', label: 'Value 1' }, - { value: 'val2', label: 'Value 2' }, - { value: 'val3', label: 'Value 3' }, - ], -}; - -const InteractiveLabelToggle = ({ defaultValue = '', name, autoFocus }) => { - const [value, setValue] = useState(defaultValue); - - return ( - - ); -}; -InteractiveLabelToggle.propTypes = { - defaultValue: PropTypes.string, - autoFocus: PropTypes.bool, - name: PropTypes.string.isRequired, -}; - export default { title: 'Components/Form - Controls/Toggle', }; @@ -89,35 +60,3 @@ export const Default = () => ( ); - -export const LabelToggle = () => ( -
-

Label Toggle

-
-

Non interactive two states

- -

Interactive

- -

Interactive autofocused

- -

Interactive with default selected value

- -

Disabled with selected value

- - -
-); diff --git a/packages/components/test/i18nMock.js b/packages/components/test/i18nMock.js deleted file mode 100644 index b69937e5963..00000000000 --- a/packages/components/test/i18nMock.js +++ /dev/null @@ -1,57 +0,0 @@ -export default function mockTranslations() { - const React = require('react'); - - const useMock = [k => k, {}]; - useMock.t = (key, options) => - (options.defaultValue || '').replace(/{{(\w+)}}/g, (_, k) => options[k]); - useMock.i18n = {}; - - // from https://github.com/i18next/react-i18next/blob/master/example/test-jest/__mocks__/react-i18next.js - - const hasChildren = node => node && (node.children || (node.props && node.props.children)); - - const getChildren = node => - node && node.children ? node.children : node.props && node.props.children; - - const renderNodes = reactNodes => { - if (typeof reactNodes === 'string') { - return reactNodes; - } - - return Object.keys(reactNodes).map((key, i) => { - const child = reactNodes[key]; - const isElement = React.isValidElement(child); - - if (typeof child === 'string') { - return child; - } - if (hasChildren(child)) { - const inner = renderNodes(getChildren(child)); - return React.cloneElement(child, { ...child.props, key: i }, inner); - } - if (typeof child === 'object' && !isElement) { - return Object.keys(child).reduce((str, childKey) => `${str}${child[childKey]}`, ''); - } - - return child; - }); - }; - return { - // this mock makes sure any components using the translate HoC receive the t function as a prop - withTranslation: () => Component => { - Component.defaultProps = { - ...Component.defaultProps, - t: (key, options) => - (options.defaultValue || '').replace(/{{(\w+)}}/g, (_, k) => options[k]), - }; - Component.displayName = `withI18nextTranslation(${Component.displayName || Component.name})`; - return Component; - }, - useTranslation: () => useMock, - setI18n: () => {}, - getI18n: () => ({ - t: (key, options) => (options.defaultValue || '').replace(/{{(\w+)}}/g, (_, k) => options[k]), - }), - Trans: ({ children }) => renderNodes(children), - }; -} diff --git a/packages/faceted-search/jest.setup.js b/packages/faceted-search/jest.setup.js index d3d48b9808c..2ce0d641a5e 100644 --- a/packages/faceted-search/jest.setup.js +++ b/packages/faceted-search/jest.setup.js @@ -1,3 +1,2 @@ // DS is mocked by ui-scripts, preventing us to use testing-library getByLabelText & others selectors jest.unmock('@talend/design-system'); -jest.mock('ally.js'); diff --git a/packages/faceted-search/src/components/Badges/BadgeTags/BadgeTags.component.test.js b/packages/faceted-search/src/components/Badges/BadgeTags/BadgeTags.component.test.js index e51ee0c1018..01c1c60c019 100644 --- a/packages/faceted-search/src/components/Badges/BadgeTags/BadgeTags.component.test.js +++ b/packages/faceted-search/src/components/Badges/BadgeTags/BadgeTags.component.test.js @@ -1,11 +1,9 @@ -import { BadgeTags } from './BadgeTags.component'; -import { BadgeFacetedProvider } from '../../context/badgeFaceted.context'; import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; +import { BadgeTags } from './BadgeTags.component'; +import { BadgeFacetedProvider } from '../../context/badgeFaceted.context'; import getDefaultT from '../../../translate'; -jest.mock('ally.js'); - const badgeFacetedContextValue = { dispatch: jest.fn(), }; diff --git a/packages/faceted-search/src/components/FacetedToolbar/FacetedToolbar.component.js b/packages/faceted-search/src/components/FacetedToolbar/FacetedToolbar.component.js index 8c11fa6e461..c7b96f13172 100644 --- a/packages/faceted-search/src/components/FacetedToolbar/FacetedToolbar.component.js +++ b/packages/faceted-search/src/components/FacetedToolbar/FacetedToolbar.component.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import { Form, ToggleSwitch } from '@talend/design-system'; +import { Form } from '@talend/design-system'; import { getTheme } from '@talend/react-components/lib/theme'; import { FACETED_MODE, USAGE_TRACKING_TAGS } from '../../constants'; @@ -11,7 +11,7 @@ const theme = getTheme(cssModule); const SwitchFacetedMode = ({ facetedMode, onChange, t }) => (
- diff --git a/packages/forms/src/UIForm/UIForm.container.test.js b/packages/forms/src/UIForm/UIForm.container.test.js index 5e4318f5698..228415e0c38 100644 --- a/packages/forms/src/UIForm/UIForm.container.test.js +++ b/packages/forms/src/UIForm/UIForm.container.test.js @@ -4,8 +4,6 @@ import userEvent from '@testing-library/user-event'; import { actions, getMockData, getMockNestedData, initProps } from '../../__mocks__/data'; import UIForm from './UIForm.container'; -jest.mock('ally.js'); - describe('UIForm container', () => { let props; beforeEach(() => { diff --git a/packages/forms/src/UIForm/Widget/Widget.component.test.js b/packages/forms/src/UIForm/Widget/Widget.component.test.js index 82d4658e92e..dd70aeed7d4 100644 --- a/packages/forms/src/UIForm/Widget/Widget.component.test.js +++ b/packages/forms/src/UIForm/Widget/Widget.component.test.js @@ -6,7 +6,6 @@ import { WidgetContext } from '../context'; import Widget from './Widget.component'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); describe('Widget component', () => { const schema = { diff --git a/packages/forms/src/UIForm/fields/Button/SingleButton.component.test.js b/packages/forms/src/UIForm/fields/Button/SingleButton.component.test.js index 137a39735fa..37f252ebf05 100644 --- a/packages/forms/src/UIForm/fields/Button/SingleButton.component.test.js +++ b/packages/forms/src/UIForm/fields/Button/SingleButton.component.test.js @@ -3,7 +3,6 @@ import userEvent from '@testing-library/user-event'; import SingleButton from './SingleButton.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); describe('SingleButton field', () => { diff --git a/packages/forms/src/UIForm/fields/Code/Code.component.test.tsx b/packages/forms/src/UIForm/fields/Code/Code.component.test.tsx index a7d5f5e25ee..70536ad8ca0 100644 --- a/packages/forms/src/UIForm/fields/Code/Code.component.test.tsx +++ b/packages/forms/src/UIForm/fields/Code/Code.component.test.tsx @@ -9,9 +9,6 @@ import 'ace-builds/src-noconflict/ext-language_tools'; import Code, { CodeProps } from './Code.component'; -// fix cannot read appendChild of null; -jest.mock('ally.js'); - declare global { interface Window { ReactAce: { default: typeof ReactAce }; diff --git a/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js b/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js index e8ce0d48e59..408b2fd511e 100644 --- a/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js +++ b/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js @@ -4,7 +4,6 @@ import userEvent from '@testing-library/user-event'; import Datalist from './Datalist.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); const schema = { diff --git a/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js b/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js index 5eb76eb3eee..eb62a0ec9a7 100644 --- a/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js +++ b/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js @@ -1,7 +1,6 @@ import { render, screen } from '@testing-library/react'; import DatalistTextMode from './TextMode.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); const schema = { title: 'My List', diff --git a/packages/forms/src/UIForm/fields/Date/Date.component.test.js b/packages/forms/src/UIForm/fields/Date/Date.component.test.js index da4b06f6bf0..a2e480122aa 100644 --- a/packages/forms/src/UIForm/fields/Date/Date.component.test.js +++ b/packages/forms/src/UIForm/fields/Date/Date.component.test.js @@ -1,6 +1,6 @@ import { act, render, screen, fireEvent } from '@testing-library/react'; import DateWidget from './Date.component'; -jest.mock('ally.js'); + jest.unmock('@talend/design-system'); describe('Date widget', () => { diff --git a/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js b/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js index c8d43298795..54c012796fc 100644 --- a/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js +++ b/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js @@ -1,7 +1,6 @@ import { act, render, screen, fireEvent } from '@testing-library/react'; import DateTimeWidget from './DateTime.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); describe('DateTime widget', () => { diff --git a/packages/forms/src/UIForm/fields/Date/Time.component.test.js b/packages/forms/src/UIForm/fields/Date/Time.component.test.js index b6347805a02..b1f0c1d6181 100644 --- a/packages/forms/src/UIForm/fields/Date/Time.component.test.js +++ b/packages/forms/src/UIForm/fields/Date/Time.component.test.js @@ -2,7 +2,6 @@ import { act, render, screen, fireEvent } from '@testing-library/react'; import TimeWidget from './Time.component'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); describe('Time component', () => { beforeEach(() => { diff --git a/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js b/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js index a728c67b41f..1cf42d191ec 100644 --- a/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js +++ b/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js @@ -3,7 +3,6 @@ import userEvent from '@testing-library/user-event'; import EnumerationWidget from './EnumerationWidget'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); describe('EnumerationWidget', () => { it('should render items', () => { diff --git a/packages/forms/src/UIForm/fields/FieldTemplate/FieldTemplate.component.test.js b/packages/forms/src/UIForm/fields/FieldTemplate/FieldTemplate.component.test.js index 11f3a06693b..cf07e0b033a 100644 --- a/packages/forms/src/UIForm/fields/FieldTemplate/FieldTemplate.component.test.js +++ b/packages/forms/src/UIForm/fields/FieldTemplate/FieldTemplate.component.test.js @@ -3,7 +3,6 @@ import { screen, render } from '@testing-library/react'; import FieldTemplate from './FieldTemplate.component'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); describe('FieldTemplate', () => { const defaultProps = { diff --git a/packages/forms/src/UIForm/fields/File/File.component.test.js b/packages/forms/src/UIForm/fields/File/File.component.test.js index 61d8214e0ac..26d5845d8ae 100644 --- a/packages/forms/src/UIForm/fields/File/File.component.test.js +++ b/packages/forms/src/UIForm/fields/File/File.component.test.js @@ -2,7 +2,6 @@ import { screen, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import File, { FileWidget, base64Decode } from './File.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); describe('File field', () => { diff --git a/packages/forms/src/UIForm/fields/File/displayMode/TextMode.component.test.js b/packages/forms/src/UIForm/fields/File/displayMode/TextMode.component.test.js index 13dcaec0303..ebdc24d94a9 100644 --- a/packages/forms/src/UIForm/fields/File/displayMode/TextMode.component.test.js +++ b/packages/forms/src/UIForm/fields/File/displayMode/TextMode.component.test.js @@ -1,6 +1,5 @@ import { screen, render } from '@testing-library/react'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); import TextMode from './TextMode.component'; diff --git a/packages/forms/src/UIForm/fields/KeyValue/KeyValue.component.test.js b/packages/forms/src/UIForm/fields/KeyValue/KeyValue.component.test.js index 2d0be6492de..21fff5e190c 100644 --- a/packages/forms/src/UIForm/fields/KeyValue/KeyValue.component.test.js +++ b/packages/forms/src/UIForm/fields/KeyValue/KeyValue.component.test.js @@ -3,7 +3,6 @@ import { screen, render } from '@testing-library/react'; import { WidgetContext } from '../../context'; import KeyValue from './KeyValue.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); const widgets = { diff --git a/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js b/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js index 2774af86448..c0ab93a0f58 100644 --- a/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js +++ b/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js @@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'; import ListView from './ListView.component'; const NO_RESULT_MESSAGE = 'No results found'; -jest.mock('ally.js'); + jest.unmock('@talend/design-system'); describe('ListView field', () => { diff --git a/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.test.js b/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.test.js index cfb628b23fc..7e0af78e3a0 100644 --- a/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.test.js +++ b/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.test.js @@ -3,7 +3,6 @@ import userEvent from '@testing-library/user-event'; import MultiSelectTag from './MultiSelectTag.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); describe('MultiSelectTag field', () => { diff --git a/packages/forms/src/UIForm/fields/RadioOrSelect/RadioOrSelect.component.test.js b/packages/forms/src/UIForm/fields/RadioOrSelect/RadioOrSelect.component.test.js index afa1d28ff1c..33b62d1a0e2 100644 --- a/packages/forms/src/UIForm/fields/RadioOrSelect/RadioOrSelect.component.test.js +++ b/packages/forms/src/UIForm/fields/RadioOrSelect/RadioOrSelect.component.test.js @@ -2,7 +2,6 @@ import { screen, render } from '@testing-library/react'; import RadioOrSelect from './RadioOrSelect.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); describe('RadioOrSelect field', () => { diff --git a/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js b/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js index cad819f0b36..7350280d17b 100644 --- a/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js +++ b/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js @@ -2,7 +2,6 @@ import { screen, render, fireEvent } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import Radios from './Radios.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); describe('Radios field', () => { diff --git a/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js b/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js index fe0d1c8be24..0f5e1eb9300 100644 --- a/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js +++ b/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js @@ -5,50 +5,65 @@ import userEvent from '@testing-library/user-event'; import ResourcePicker from './ResourcePicker.component'; -const ResourcePickerMock = ({ toolbar, onRowClick, isSelected, collection, ...props }) => ( -
-
-
- - toolbar.name.onChange(e)} - value={toolbar.name.value} - /> -
-
- - - -
-
- - - - - -
-
- - - - {collection && ( - - )} - ResourcePicker -
-); - -jest.mock('ally.js'); jest.unmock('@talend/design-system'); -jest.mock('@talend/react-components/lib/ResourcePicker', () => ResourcePickerMock); +jest.mock( + '@talend/react-components/lib/ResourcePicker', + () => + ({ toolbar, onRowClick, isSelected, collection, ...props }) => + ( +
+
+
+ + toolbar.name.onChange(e)} + value={toolbar.name.value} + /> +
+
+ + + +
+
+ + + + + +
+
+ + + + {collection && ( + + )} + ResourcePicker +
+ ), +); describe('ResourcePicker field', () => { const collection = [ diff --git a/packages/forms/src/UIForm/fields/Select/Select.component.test.js b/packages/forms/src/UIForm/fields/Select/Select.component.test.js index 4d832e5fe38..e85082f5128 100644 --- a/packages/forms/src/UIForm/fields/Select/Select.component.test.js +++ b/packages/forms/src/UIForm/fields/Select/Select.component.test.js @@ -4,7 +4,6 @@ import omit from 'lodash/omit'; import Select from './Select.component'; -jest.mock('ally.js'); jest.unmock('@talend/design-system'); describe('Select field', () => { diff --git a/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js b/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js index b8a42ffbb8a..475d3db9f6d 100644 --- a/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js +++ b/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js @@ -3,7 +3,6 @@ import userEvent from '@testing-library/user-event'; import Toggle from './Toggle.component'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); describe('Toggle field', () => { const schema = { diff --git a/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js b/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js index 20619cfb102..c7ee52e4c73 100644 --- a/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js +++ b/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js @@ -7,7 +7,6 @@ import { screen, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); function TestArray(props) { return
; diff --git a/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js b/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js index 174e895a074..e5271121e45 100644 --- a/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js +++ b/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js @@ -4,7 +4,6 @@ import userEvent from '@testing-library/user-event'; import ArrayItem from './ArrayItem.component'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); describe('Array Item component', () => { it('should render control panel with item content', () => { diff --git a/packages/forms/src/UIForm/fieldsets/Array/DefaultArrayTemplate.component.test.js b/packages/forms/src/UIForm/fieldsets/Array/DefaultArrayTemplate.component.test.js index f6dc7e83b0b..466120fea76 100644 --- a/packages/forms/src/UIForm/fieldsets/Array/DefaultArrayTemplate.component.test.js +++ b/packages/forms/src/UIForm/fieldsets/Array/DefaultArrayTemplate.component.test.js @@ -2,7 +2,6 @@ import { screen, render } from '@testing-library/react'; import DefaultArrayTemplate from './DefaultArrayTemplate.component'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); const schema = { description: 'Tnstructions to fill it', diff --git a/packages/forms/src/UIForm/fieldsets/CollapsibleFieldset/CollapsibleFieldset.component.test.js b/packages/forms/src/UIForm/fieldsets/CollapsibleFieldset/CollapsibleFieldset.component.test.js index e6db764589a..70f377b60a9 100644 --- a/packages/forms/src/UIForm/fieldsets/CollapsibleFieldset/CollapsibleFieldset.component.test.js +++ b/packages/forms/src/UIForm/fieldsets/CollapsibleFieldset/CollapsibleFieldset.component.test.js @@ -7,7 +7,6 @@ import { WidgetContext } from '../../context'; import widgets from '../../utils/widgets'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); function customTitle(value, schema) { return `${schema.title}: ${value.firstname} ${value.lastname}`; diff --git a/packages/forms/src/rhf/fields/Input/Input.test.js b/packages/forms/src/rhf/fields/Input/Input.test.js index cc375fb145f..fb876319190 100644 --- a/packages/forms/src/rhf/fields/Input/Input.test.js +++ b/packages/forms/src/rhf/fields/Input/Input.test.js @@ -5,7 +5,6 @@ import { useForm, FormProvider } from 'react-hook-form'; import Input from './RHFInput.component'; jest.unmock('@talend/design-system'); -jest.mock('ally.js'); /* eslint-disable-next-line react/prop-types */ function FormWrapper({ children, onSubmit }) { diff --git a/packages/forms/src/rhf/fields/Select/Select.stories.js b/packages/forms/src/rhf/fields/Select/Select.stories.js index d7c297d471a..acda33aac47 100644 --- a/packages/forms/src/rhf/fields/Select/Select.stories.js +++ b/packages/forms/src/rhf/fields/Select/Select.stories.js @@ -104,7 +104,13 @@ export const Validation = props => {