@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.
@@ -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
- <Portal.Provider>
51
- <Success
52
- variant="full-screen"
53
- title={title}
54
- description={description}
55
- image="path_to_image"
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
- <ScenceView
29
- testID="scene-view"
30
- index={0}
31
- selectedIndex={2}
32
- lazy
33
- lazyPreloadDistance={1}
34
- >
35
- <Typography.Body variant="small">Scene 1</Typography.Body>
36
- </ScenceView>
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
- <ScenceView
62
- testID="scene-view"
63
- index={2}
64
- selectedIndex={1}
65
- lazy
66
- lazyPreloadDistance={1}
67
- >
68
- <Typography.Body variant="small">Scene 1</Typography.Body>
69
- </ScenceView>
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();