cozy-ui 113.7.1 → 113.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -1
- package/CHANGELOG.md +15 -0
- package/assets/icons/ui/number.svg +1 -0
- package/jest.config.js +1 -2
- package/package.json +2 -8
- package/react/AppSections/components/AppsSection.spec.jsx +10 -19
- package/react/AppSections/index.spec.jsx +98 -77
- package/react/ContactsList/ContactRow.spec.js +28 -53
- package/react/DateMonthPicker/index.spec.jsx +17 -45
- package/react/Field/index.spec.js +28 -5
- package/react/Figure/Figure.spec.jsx +9 -4
- package/react/Figure/__snapshots__/Figure.spec.jsx.snap +289 -225
- package/react/FileInput/index.jsx +1 -0
- package/react/FileInput/index.spec.jsx +16 -38
- package/react/Icon/Readme.md +5 -1
- package/react/Icons/Number.jsx +16 -0
- package/react/Popup/index.spec.jsx +90 -41
- package/react/QualificationIconStack/Readme.md +14 -0
- package/react/QualificationIconStack/index.jsx +132 -0
- package/react/deprecated/ViewStack/example.jsx +1 -1
- package/react/hooks/useClientErrors.spec.jsx +16 -24
- package/react/providers/I18n/index.spec.jsx +13 -5
- package/react/providers/I18n/withLocales.spec.jsx +4 -4
- package/transpiled/react/FileInput/index.js +2 -1
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/Number.js +15 -0
- package/transpiled/react/QualificationIconStack/index.js +132 -0
- package/transpiled/react/deprecated/ViewStack/example.js +1 -1
- package/react/AppSections/__snapshots__/index.spec.jsx.snap +0 -1843
- package/react/AppSections/components/__snapshots__/AppsSection.spec.jsx.snap +0 -41
- package/react/ContactsList/__snapshots__/ContactRow.spec.js.snap +0 -69
- package/react/FileInput/__snapshots__/index.spec.jsx.snap +0 -86
- package/react/Input/__snapshots__/index.spec.jsx.snap +0 -11
- package/react/Input/index.spec.jsx +0 -12
- package/react/__snapshots__/examples.spec.jsx.snap +0 -3720
- package/react/deprecated/ActionMenu/__snapshots__/index.spec.jsx.snap +0 -157
- package/react/deprecated/ActionMenu/index.spec.jsx +0 -115
- package/react/deprecated/Alerter/__snapshots__/alerter.spec.js.snap +0 -88
- package/react/deprecated/Alerter/alerter.spec.js +0 -78
- package/react/deprecated/InfosCarrousel/index.spec.jsx +0 -71
- package/react/deprecated/Modal/index.spec.jsx +0 -70
- package/react/deprecated/ViewStack/index.spec.jsx +0 -64
- package/react/examples.spec.jsx +0 -67
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
|
|
3
4
|
import { I18n } from '.'
|
|
@@ -29,9 +30,8 @@ class MockComponent extends React.Component {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
describe('with locales', () => {
|
|
32
|
-
let root
|
|
33
33
|
const setup = ({ lang, Component }) => {
|
|
34
|
-
|
|
34
|
+
render(
|
|
35
35
|
<I18n lang={lang} dictRequire={localeCode => globalLocales[localeCode]}>
|
|
36
36
|
<Component />
|
|
37
37
|
</I18n>
|
|
@@ -42,9 +42,9 @@ describe('with locales', () => {
|
|
|
42
42
|
describe(description, () => {
|
|
43
43
|
it('should provide t with correct locale strings', () => {
|
|
44
44
|
setup({ lang: 'en', Component })
|
|
45
|
-
expect(
|
|
45
|
+
expect(screen.getByText('Hello local world !')).toBeInTheDocument()
|
|
46
46
|
setup({ lang: 'fr', Component })
|
|
47
|
-
expect(
|
|
47
|
+
expect(screen.getByText('Bonjour le monde local !')).toBeInTheDocument()
|
|
48
48
|
})
|
|
49
49
|
})
|
|
50
50
|
}
|