@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 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
- <Portal.Provider>
51
- <Error
52
- variant="full-screen"
53
- title={title}
54
- description={description}
55
- image="path_to_image"
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
- <RichTextEditor
193
- onChange={jest.fn()}
194
- label="Rich Text Editor"
195
- name="rich-text-editor"
196
- error="this is error"
197
- style={{ backgroundColor: 'yellow' }}
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