@hero-design/rn 8.42.0 → 8.42.2
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/.turbo/turbo-build.log +1 -1
- package/es/index.js +684 -684
- package/lib/index.js +683 -683
- package/package.json +7 -7
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +211 -197
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Carousel/__tests__/index.spec.tsx +10 -8
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +0 -12
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +399 -416
- package/src/components/Error/__tests__/index.spec.tsx +6 -9
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +10 -8
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +451 -363
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +10 -7
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +419 -357
- package/src/components/Success/__tests__/index.spec.tsx +6 -9
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +23 -19
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +399 -416
- package/src/testHelpers/renderWithTheme.tsx +7 -1
|
@@ -3,7 +3,6 @@ import { fireEvent } from '@testing-library/react-native';
|
|
|
3
3
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
4
|
import Error from '..';
|
|
5
5
|
import Image from '../../Image';
|
|
6
|
-
import Portal from '../../Portal';
|
|
7
6
|
|
|
8
7
|
const title = `We’re sorry, something went wrong`;
|
|
9
8
|
const description = 'Please try again later';
|
|
@@ -47,14 +46,12 @@ describe('Error', () => {
|
|
|
47
46
|
});
|
|
48
47
|
it('renders full screen error page correctly', () => {
|
|
49
48
|
const { toJSON, getByText, getByTestId } = renderWithTheme(
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/>
|
|
57
|
-
</Portal.Provider>
|
|
49
|
+
<Error
|
|
50
|
+
variant="full-screen"
|
|
51
|
+
title={title}
|
|
52
|
+
description={description}
|
|
53
|
+
image="path_to_image"
|
|
54
|
+
/>
|
|
58
55
|
);
|
|
59
56
|
|
|
60
57
|
expect(getByText(title)).toBeTruthy();
|
|
@@ -9,7 +9,7 @@ import * as Events from '../utils/events';
|
|
|
9
9
|
import { emitter as EditorEventEmitter } from '../EditorEvent';
|
|
10
10
|
import RichTextEditor from '../RichTextEditor';
|
|
11
11
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
12
|
-
import { theme } from '../../../index';
|
|
12
|
+
import { Portal, theme } from '../../../index';
|
|
13
13
|
|
|
14
14
|
type OnMessageCallback = (event: {
|
|
15
15
|
nativeEvent: { data: string };
|
|
@@ -189,13 +189,15 @@ describe('RichTextEditor', () => {
|
|
|
189
189
|
|
|
190
190
|
wrapper.update(
|
|
191
191
|
<ThemeProvider theme={theme}>
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
192
|
+
<Portal.Provider>
|
|
193
|
+
<RichTextEditor
|
|
194
|
+
onChange={jest.fn()}
|
|
195
|
+
label="Rich Text Editor"
|
|
196
|
+
name="rich-text-editor"
|
|
197
|
+
error="this is error"
|
|
198
|
+
style={{ backgroundColor: 'yellow' }}
|
|
199
|
+
/>
|
|
200
|
+
</Portal.Provider>
|
|
199
201
|
</ThemeProvider>
|
|
200
202
|
);
|
|
201
203
|
|