@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 Success 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('Success', () => {
|
|
|
47
46
|
});
|
|
48
47
|
it('renders full screen success page correctly', () => {
|
|
49
48
|
const { toJSON, getByText, getByTestId } = renderWithTheme(
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/>
|
|
57
|
-
</Portal.Provider>
|
|
49
|
+
<Success
|
|
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();
|
|
@@ -3,7 +3,7 @@ import { ThemeProvider } from '@emotion/react';
|
|
|
3
3
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
4
4
|
import ScenceView from '../SceneView';
|
|
5
5
|
import Typography from '../../Typography';
|
|
6
|
-
import { theme } from '../../../index';
|
|
6
|
+
import { Portal, theme } from '../../../index';
|
|
7
7
|
|
|
8
8
|
describe('ScenceView', () => {
|
|
9
9
|
describe('lazy', () => {
|
|
@@ -25,15 +25,17 @@ describe('ScenceView', () => {
|
|
|
25
25
|
|
|
26
26
|
rerender(
|
|
27
27
|
<ThemeProvider theme={theme}>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
<Portal.Provider>
|
|
29
|
+
<ScenceView
|
|
30
|
+
testID="scene-view"
|
|
31
|
+
index={0}
|
|
32
|
+
selectedIndex={2}
|
|
33
|
+
lazy
|
|
34
|
+
lazyPreloadDistance={1}
|
|
35
|
+
>
|
|
36
|
+
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
37
|
+
</ScenceView>
|
|
38
|
+
</Portal.Provider>
|
|
37
39
|
</ThemeProvider>
|
|
38
40
|
);
|
|
39
41
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -58,15 +60,17 @@ describe('ScenceView', () => {
|
|
|
58
60
|
|
|
59
61
|
rerender(
|
|
60
62
|
<ThemeProvider theme={theme}>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
<Portal.Provider>
|
|
64
|
+
<ScenceView
|
|
65
|
+
testID="scene-view"
|
|
66
|
+
index={2}
|
|
67
|
+
selectedIndex={1}
|
|
68
|
+
lazy
|
|
69
|
+
lazyPreloadDistance={1}
|
|
70
|
+
>
|
|
71
|
+
<Typography.Body variant="small">Scene 1</Typography.Body>
|
|
72
|
+
</ScenceView>
|
|
73
|
+
</Portal.Provider>
|
|
70
74
|
</ThemeProvider>
|
|
71
75
|
);
|
|
72
76
|
expect(toJSON()).toMatchSnapshot();
|