@applicaster/quick-brick-core 13.0.0-rc.11 → 13.0.0-rc.111

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.
Files changed (49) hide show
  1. package/App/ActionsProvider/__tests__/__snapshots__/ActionsProvider.test.js.snap +7 -7
  2. package/App/AssetCache/__tests__/__snapshots__/assetCache.test.ts.snap +103 -103
  3. package/App/AssetCache/__tests__/assetCache.test.ts +3 -2
  4. package/App/DeepLinking/URLSchemeHandler/SchemeHandlerHooks/__tests__/__snapshots__/schemeHandlerHooks.test.ts.snap +1 -1
  5. package/App/DeepLinking/URLSchemeHandler/SchemeHandlerHooks/__tests__/useOpenSchemeHandler.test.tsx +45 -116
  6. package/App/DeepLinking/URLSchemeHandler/__tests__/__snapshots__/URLSchemeHandler.test.tsx.snap +3 -3
  7. package/App/DeepLinking/URLSchemeListener/URLSchemeContextProvider.tsx +30 -3
  8. package/App/DeepLinking/URLSchemeListener/__tests__/URLSchemeListener.test.js +40 -0
  9. package/App/DeepLinking/URLSchemeListener/index.tsx +1 -1
  10. package/App/ErrorBoundary/__tests__/errorBoundary.test.jsx +232 -0
  11. package/App/ErrorBoundary/__tests__/store.test.js +143 -0
  12. package/App/ErrorBoundary/index.tsx +45 -21
  13. package/App/ErrorBoundary/store.ts +26 -0
  14. package/App/LoadingOverlay/LoadingOverlayManager.tsx +27 -0
  15. package/App/LoadingOverlay/index.tsx +49 -0
  16. package/App/LoadingOverlay/useLoadingOverlayVisibility.tsx +18 -0
  17. package/App/ModalProvider/ModalBottomSheet/DraggableBottomSheet/index.tsx +0 -1
  18. package/App/ModalProvider/ModalBottomSheet/ModalBottomSheetFrame.tsx +20 -8
  19. package/App/ModalProvider/ModalBottomSheet/Overlay.tsx +5 -7
  20. package/App/ModalProvider/ModalBottomSheet/index.tsx +16 -35
  21. package/App/ModalProvider/ModalPresenter.tsx +1 -1
  22. package/App/ModalProvider/index.tsx +6 -3
  23. package/App/NavigationProvider/NavigationProvider.tsx +77 -63
  24. package/App/NavigationProvider/__tests__/navigationProvider.test.tsx +0 -44
  25. package/App/NavigationProvider/navigator/__tests__/__snapshots__/reducer.test.ts.snap +189 -189
  26. package/App/NetworkStatusProvider/utils.ts +0 -1
  27. package/App/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +2 -2
  28. package/App/StoreConnector/__tests__/storeConnector.test.js +17 -11
  29. package/App/appLifeCycleManager/__tests__/appLifeCycleManager.test.tsx +146 -0
  30. package/App/appLifeCycleManager/index.tsx +6 -7
  31. package/App/index.tsx +6 -3
  32. package/App/remoteContextReloader/__tests__/remoteContextReloader.test.js +11 -21
  33. package/App/remoteContextReloader/consts.ts +2 -0
  34. package/App/remoteContextReloader/getRemoteContextData/getNativeRemoteContextData.ts +31 -6
  35. package/createZappApp/__tests__/__snapshots__/createZappApp.test.js.snap +5 -128
  36. package/createZappApp/__tests__/createZappApp.test.js +7 -20
  37. package/defaults/__tests__/defaults.test.js +3 -4
  38. package/index.d.ts +1 -1
  39. package/package.json +26 -14
  40. package/App/DeepLinking/URLSchemeListener/__tests__/URLSchemeListenerTest.js +0 -177
  41. package/App/ErrorBoundary/__tests__/__snapshots__/errorBoundary.test.js.snap +0 -9
  42. package/App/ErrorBoundary/__tests__/errorBoundary.test.js +0 -72
  43. package/App/ModalProvider/ModalChildrenWrapper/index.web.ts +0 -1
  44. package/App/NavigationProvider/__tests__/__snapshots__/navigationProvider.test.tsx.snap +0 -70
  45. package/App/StoreConnector/__tests__/__snapshots__/storeConnector.test.js.snap +0 -35
  46. package/App/appLifeCycleManager/__tests__/__snapshots__/appLifeCycleManager.test.js.snap +0 -30
  47. package/App/appLifeCycleManager/__tests__/appLifeCycleManager.test.js +0 -134
  48. package/App/remoteContextReloader/__tests__/__snapshots__/remoteContextReloader.test.js.snap +0 -43
  49. /package/App/ModalProvider/ModalChildrenWrapper/{index.ios.ts → index.ts} +0 -0
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "13.0.0-rc.11",
3
+ "version": "13.0.0-rc.111",
4
4
  "description": "Core package for Applicaster's Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
8
- "test": "jest -w=2",
9
8
  "build": "echo 'skipping ts build for core packages'"
10
9
  },
11
10
  "repository": {
@@ -29,13 +28,13 @@
29
28
  },
30
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
31
30
  "dependencies": {
32
- "@applicaster/applicaster-types": "13.0.0-rc.11",
33
- "@applicaster/quick-brick-core-plugins": "13.0.0-rc.11",
34
- "@applicaster/zapp-pipes-v2-client": "13.0.0-rc.11",
35
- "@applicaster/zapp-react-native-bridge": "13.0.0-rc.11",
36
- "@applicaster/zapp-react-native-redux": "13.0.0-rc.11",
37
- "@applicaster/zapp-react-native-ui-components": "13.0.0-rc.11",
38
- "@applicaster/zapp-react-native-utils": "13.0.0-rc.11",
31
+ "@applicaster/applicaster-types": "13.0.0-rc.111",
32
+ "@applicaster/quick-brick-core-plugins": "13.0.0-rc.111",
33
+ "@applicaster/zapp-pipes-v2-client": "13.0.0-rc.111",
34
+ "@applicaster/zapp-react-native-bridge": "13.0.0-rc.111",
35
+ "@applicaster/zapp-react-native-redux": "13.0.0-rc.111",
36
+ "@applicaster/zapp-react-native-ui-components": "13.0.0-rc.111",
37
+ "@applicaster/zapp-react-native-utils": "13.0.0-rc.111",
39
38
  "atob": "^2.1.2",
40
39
  "axios": "^0.28.0",
41
40
  "btoa": "^1.2.1",
@@ -50,15 +49,28 @@
50
49
  "uuid": "3.3.2"
51
50
  },
52
51
  "peerDependencies": {
52
+ "@applicaster/blur": "*",
53
+ "@applicaster/quick-brick-xray": "*",
54
+ "@applicaster/zapp-react-dom-ui-components": "*",
55
+ "@applicaster/zapp-react-native-tvos-app": "*",
56
+ "@applicaster/zapp-react-native-tvos-ui-components": "*",
57
+ "@babel/runtime": "*",
53
58
  "@react-native-community/netinfo": "*",
54
- "react": "17.0.2",
55
- "react-native": "0.68.6",
59
+ "immer": "*",
60
+ "react": "*",
61
+ "react-native": "*",
62
+ "react-native-fs": "*",
56
63
  "react-native-gesture-handler": "*",
57
- "react-native-safe-area-context": "*"
64
+ "react-native-linear-gradient": "*",
65
+ "react-native-safe-area-context": "*",
66
+ "react-native-svg": "*",
67
+ "react-native-web": "*",
68
+ "react-native-webview": "*",
69
+ "uglify-js": "*",
70
+ "validate-color": "*",
71
+ "zustand": "*"
58
72
  },
59
73
  "devDependencies": {
60
- "@types/react-native": "0.69.6",
61
- "@types/tizen-tv-webapis": "^2.0.1",
62
74
  "nock": "^10.0.0",
63
75
  "redux-mock-store": "^1.5.3"
64
76
  },
@@ -1,177 +0,0 @@
1
- import * as React from "react";
2
- import { View, Text } from "react-native";
3
- import { shallow } from "enzyme";
4
- import { shallowToJson } from "enzyme-to-json";
5
-
6
- import { URLSchemeListener } from "../index";
7
-
8
- const URL = "url";
9
-
10
- const TestComponent = () => (
11
- <View>
12
- <Text>I'm a test component</Text>
13
- </View>
14
- );
15
-
16
- const ReactNative = require("react-native");
17
- const { Linking } = ReactNative;
18
-
19
- const navigator = {
20
- push: jest.fn(),
21
- replace: jest.fn(),
22
- };
23
-
24
- jest.spyOn(console, "warn").mockImplementation(() => jest.fn());
25
-
26
- function clearMocks() {
27
- navigator.push.mockClear();
28
- navigator.replace.mockClear();
29
- console.warn.mockClear(); // eslint-disable-line no-console
30
- Linking.__resetListeners();
31
- Linking.__clearInitialURL();
32
- Linking.addEventListener.mockClear();
33
- Linking.removeEventListener.mockClear();
34
- Linking.getInitialURL.mockClear();
35
- Linking.openURL.mockClear();
36
- }
37
-
38
- describe("URLSchemeHandler", () => {
39
- const getWrapper = (props) =>
40
- shallow(
41
- <URLSchemeListener navigator={navigator} {...props}>
42
- <TestComponent />
43
- </URLSchemeListener>
44
- );
45
-
46
- beforeEach(clearMocks);
47
-
48
- it("renders correctly", () => {
49
- const wrapper = getWrapper();
50
- expect(shallowToJson(wrapper)).toMatchSnapshot();
51
- });
52
-
53
- describe("linking registration", () => {
54
- beforeEach(clearMocks);
55
-
56
- it("registers the listener when the component mounts", () => {
57
- const wrapper = getWrapper();
58
- const instance = wrapper.instance();
59
-
60
- expect(shallowToJson(wrapper)).toMatchSnapshot();
61
-
62
- expect(Linking.addEventListener).toHaveBeenCalledWith(
63
- URL,
64
- instance.handleOpenUrl
65
- );
66
- });
67
-
68
- it("unregisters the listener when the component unmounts", () => {
69
- const wrapper = getWrapper();
70
- const instance = wrapper.instance();
71
- wrapper.unmount();
72
-
73
- expect(Linking.removeEventListener).toHaveBeenCalledWith(
74
- URL,
75
- instance.handleOpenUrl
76
- );
77
- });
78
- });
79
-
80
- describe("initial url", () => {
81
- beforeEach(clearMocks);
82
-
83
- it("tries to get the initial url", () => {
84
- const listenerSpy = jest.fn();
85
- const wrapper = getWrapper({ listenerSpy });
86
-
87
- expect(shallowToJson(wrapper)).toMatchSnapshot();
88
- expect(listenerSpy).toHaveBeenCalledWith("getInitialURL");
89
- expect(Linking.getInitialURL).toHaveBeenCalled();
90
- });
91
-
92
- it("gets the initial url and redirect to it if it exists", async () => {
93
- const listenerSpy = jest.fn();
94
- const url = "http://foo.com";
95
- Linking.__setInitialURL(url);
96
-
97
- const wrapper = getWrapper({ listenerSpy });
98
- const instance = wrapper.instance();
99
-
100
- await instance.componentDidMount();
101
-
102
- expect(listenerSpy).toHaveBeenCalledWith("getInitialURL");
103
-
104
- expect(navigator.replace).toHaveBeenCalledWith(
105
- expect.objectContaining({ url })
106
- );
107
- });
108
-
109
- it("doesn't try to navigate if there is no initial url", async () => {
110
- const listenerSpy = jest.fn();
111
-
112
- const wrapper = getWrapper({ listenerSpy });
113
- const instance = wrapper.instance();
114
- jest.spyOn(instance, "handleOpenUrlError");
115
-
116
- await instance.componentDidMount();
117
-
118
- expect(listenerSpy).toHaveBeenCalledWith("getInitialURL");
119
- expect(listenerSpy).not.toHaveBeenCalledWith("canOpenURL");
120
- expect(navigator.replace).not.toHaveBeenCalled();
121
- });
122
- });
123
-
124
- describe("url scheme handler", () => {
125
- beforeEach(clearMocks);
126
-
127
- it("invokes the listener when a url is triggered", () => {
128
- const listenerSpy = jest.fn();
129
- const wrapper = getWrapper({ listenerSpy });
130
- const url = "http://foo.com";
131
-
132
- Linking.__callUrl(url);
133
-
134
- expect(shallowToJson(wrapper)).toMatchSnapshot();
135
-
136
- expect(listenerSpy).toHaveBeenCalledWith(
137
- "handleOpenUrl",
138
- expect.objectContaining({ url })
139
- );
140
- });
141
-
142
- it("invokes the navigator if a url is triggered and the url is valid", async () => {
143
- const listenerSpy = jest.fn();
144
- const wrapper = getWrapper({ listenerSpy });
145
- const instance = wrapper.instance();
146
- const spy = jest.spyOn(instance, "handleOpenUrl");
147
- const url = "http://foo.com";
148
-
149
- Linking.__callUrl(url);
150
-
151
- await spy;
152
-
153
- expect(navigator.replace).toHaveBeenCalledWith(
154
- expect.objectContaining({ url })
155
- );
156
- });
157
-
158
- it("doesn't invoke the navigator if a url is triggered and the url is undefined", async () => {
159
- const listenerSpy = jest.fn();
160
- const wrapper = getWrapper({ listenerSpy });
161
- const instance = wrapper.instance();
162
- const spy = jest.spyOn(instance, "handleOpenUrl");
163
- const url = undefined; // eslint-disable no-undefined
164
-
165
- Linking.__callUrl(url);
166
-
167
- await spy;
168
-
169
- expect(listenerSpy).toHaveBeenCalledWith(
170
- "handleOpenUrl",
171
- expect.objectContaining({ url })
172
- );
173
-
174
- expect(navigator.replace).not.toHaveBeenCalled();
175
- });
176
- });
177
- });
@@ -1,9 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<ErrorBoundary /> When an error is caught renders correctly 1`] = `
4
- <ErrorScreen
5
- dismissError={[Function]}
6
- />
7
- `;
8
-
9
- exports[`<ErrorBoundary /> when there is no error renders correctly 1`] = `<TestComponent />`;
@@ -1,72 +0,0 @@
1
- import React from "react";
2
- import { View, Text } from "react-native";
3
- import { shallow } from "enzyme";
4
- import { shallowToJson } from "enzyme-to-json";
5
-
6
- import { ErrorBoundary } from "../index";
7
-
8
- const TestComponent = ({ error }: { error: any }) => {
9
- if (error) {
10
- throw new Error("error !!");
11
- }
12
-
13
- return (
14
- <View>
15
- <Text>all is good</Text>
16
- </View>
17
- );
18
- };
19
-
20
- const errorState = {
21
- hasError: true,
22
- error: new Error("oh no"),
23
- info: { componentStack: "error at ... \n ..." },
24
- };
25
-
26
- describe("<ErrorBoundary />", () => {
27
- describe("when there is no error", () => {
28
- const wrapper = shallow(
29
- <ErrorBoundary>
30
- <TestComponent />
31
- </ErrorBoundary>
32
- );
33
-
34
- it("renders correctly", () => {
35
- expect(shallowToJson(wrapper)).toMatchSnapshot();
36
- });
37
- });
38
-
39
- describe("When an error is caught", () => {
40
- const _consoleLog = console.log; // eslint-disable-line no-console
41
-
42
- const didCatchSpy = jest.spyOn(
43
- ErrorBoundary.prototype,
44
- "componentDidCatch"
45
- );
46
-
47
- const wrapper = shallow(
48
- <ErrorBoundary>
49
- <TestComponent error />
50
- </ErrorBoundary>
51
- );
52
-
53
- wrapper.setState(errorState);
54
-
55
- beforeAll(() => {
56
- console.log = jest.fn(); // eslint-disable-line no-console
57
- });
58
-
59
- afterAll(() => {
60
- console.log = _consoleLog; // eslint-disable-line no-console
61
- });
62
-
63
- it.skip("the componentDidCatch method is called", () => {
64
- // a current bug with enzyme doesn't allow this to be tested
65
- expect(didCatchSpy).toHaveBeenCalled();
66
- });
67
-
68
- it("renders correctly", () => {
69
- expect(shallowToJson(wrapper)).toMatchSnapshot();
70
- });
71
- });
72
- });
@@ -1 +0,0 @@
1
- export { Fragment as ModalChildrenWrapper } from "react";
@@ -1,70 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<NavigationProvider /> modal feature removes the visible flag when dismissing a modal 1`] = `
4
- Object {
5
- "options": Object {
6
- "animated": true,
7
- "animationType": "slide",
8
- "onDismiss": [Function],
9
- "onRequestClose": [Function],
10
- "onShow": [Function],
11
- "presentationStyle": "overFullScreen",
12
- "transparent": true,
13
- },
14
- "props": Object {
15
- "screenData": Object {},
16
- },
17
- "screen": Object {
18
- "id": "A1234",
19
- "navigations": Array [],
20
- "ui_components": Array [],
21
- },
22
- "visible": true,
23
- }
24
- `;
25
-
26
- exports[`<NavigationProvider /> modal feature removes the visible flag when dismissing a modal 2`] = `
27
- Object {
28
- "options": Object {},
29
- "props": Object {},
30
- "screen": null,
31
- "visible": false,
32
- }
33
- `;
34
-
35
- exports[`<NavigationProvider /> modal feature sets the modalState when opening a modal 1`] = `undefined`;
36
-
37
- exports[`<NavigationProvider /> modal feature should reset state to initial when dismissing a modal ( closeModalBottomSheet ) opened by openModalBottomSheet 1`] = `
38
- Object {
39
- "options": Object {
40
- "animated": false,
41
- "animationType": "none",
42
- "onDismiss": [Function],
43
- "onRequestClose": [Function],
44
- "onShow": [Function],
45
- "presentationStyle": "overFullScreen",
46
- "transparent": true,
47
- },
48
- "props": Object {},
49
- "screen": Object {
50
- "ModalBottomSheetContent": Object {
51
- "id": "A1234",
52
- "navigations": Array [],
53
- "ui_components": Array [],
54
- },
55
- "modalBottomSheetContentProps": Object {
56
- "some": "props",
57
- },
58
- },
59
- "visible": true,
60
- }
61
- `;
62
-
63
- exports[`<NavigationProvider /> modal feature should reset state to initial when dismissing a modal ( closeModalBottomSheet ) opened by openModalBottomSheet 2`] = `
64
- Object {
65
- "options": Object {},
66
- "props": Object {},
67
- "screen": null,
68
- "visible": false,
69
- }
70
- `;
@@ -1,35 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`storeConnector passes the props to the component 1`] = `
4
- <Component
5
- appSettings={
6
- Object {
7
- "bundleIdentifier": "com.app.test",
8
- }
9
- }
10
- components={
11
- Object {
12
- "grid": [MockFunction],
13
- }
14
- }
15
- dispatch={[Function]}
16
- rivers={
17
- Object {
18
- "A123": Object {
19
- "id": "A123",
20
- "name": "home",
21
- },
22
- }
23
- }
24
- store={
25
- Object {
26
- "clearActions": [Function],
27
- "dispatch": [Function],
28
- "getActions": [Function],
29
- "getState": [Function],
30
- "replaceReducer": [Function],
31
- "subscribe": [Function],
32
- }
33
- }
34
- />
35
- `;
@@ -1,30 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`appLifeCycleManager runs the loaders, then sends quickBrickReady event 1`] = `
4
- <View>
5
- <Text>
6
- I'm a component
7
- </Text>
8
- </View>
9
- `;
10
-
11
- exports[`appLifeCycleManager sends the quickBrickReady event when a loader doesn't resolves 1`] = `
12
- <View>
13
- <Text>
14
- I'm a component
15
- </Text>
16
- </View>
17
- `;
18
-
19
- exports[`appLifeCycleManager sends the quickBrickReady event when a loader doesn't resolves 2`] = `
20
- Array [
21
- Array [
22
- Object {
23
- "data": Object {
24
- "error": [Error: loading failed],
25
- },
26
- "message": "AppLifeCycleManager: A loading operation failed: loading failed",
27
- },
28
- ],
29
- ]
30
- `;
@@ -1,134 +0,0 @@
1
- import * as React from "react";
2
- import { View, Text } from "react-native";
3
- import { create, act } from "react-test-renderer";
4
-
5
- const Component = () => (
6
- <View>
7
- <Text>I'm a component</Text>
8
- </View>
9
- );
10
-
11
- const logger = {
12
- warning: jest.fn(),
13
- log: jest.fn(),
14
- debug: jest.fn(),
15
- info: jest.fn(),
16
- };
17
-
18
- jest.mock("../../logger", () => ({
19
- coreAppLogger: {
20
- addSubsystem: jest.fn(() => logger),
21
- },
22
- }));
23
-
24
- const QuickBrickManager = {
25
- sendQuickBrickEvent: jest.fn(),
26
- };
27
-
28
- const LOADING_ERROR = new Error("loading failed");
29
-
30
- const appLoader = jest.fn((_dispatch, _getState) => {
31
- if (_getState().shouldFail) return Promise.reject(LOADING_ERROR);
32
-
33
- return Promise.resolve();
34
- });
35
-
36
- const dispatch = jest.fn();
37
-
38
- const state = {
39
- rivers: {},
40
- plugins: {},
41
- appSettings: { runtimeConfigurationUrls: { rivers: "http://rivers.url" } },
42
- };
43
-
44
- const QUICK_BRICK_READY_EVENT = "quickBrickReady";
45
-
46
- const actions = {};
47
-
48
- jest.mock("@applicaster/zapp-react-native-utils/reactHooks/actions", () => ({
49
- useActions: jest.fn(() => ({ actions })),
50
- }));
51
-
52
- const { appLifeCycleManager } = require("../index");
53
-
54
- describe("appLifeCycleManager", () => {
55
- const decorator = appLifeCycleManager(appLoader, QuickBrickManager);
56
-
57
- beforeEach(() => {
58
- logger.warning.mockClear();
59
- appLoader.mockClear();
60
- QuickBrickManager.sendQuickBrickEvent.mockClear();
61
- dispatch.mockClear();
62
- });
63
-
64
- it("returns a function to decorate a component", () => {
65
- expect(decorator).toBeFunction();
66
- });
67
-
68
- it("runs the loaders, then sends quickBrickReady event", (done) => {
69
- const DecoratedComponent = decorator(Component);
70
-
71
- let wrapper;
72
-
73
- const testCallback = () => {
74
- expect(dispatch).toHaveBeenCalledWith(
75
- expect.objectContaining({ type: "SET_APP_READY" })
76
- );
77
-
78
- expect(QuickBrickManager.sendQuickBrickEvent).toHaveBeenCalledWith(
79
- QUICK_BRICK_READY_EVENT
80
- );
81
-
82
- done();
83
- };
84
-
85
- act(() => {
86
- wrapper = create(
87
- <DecoratedComponent
88
- dispatch={dispatch}
89
- {...state}
90
- testCallback={testCallback}
91
- />
92
- );
93
- });
94
-
95
- expect(wrapper.toJSON()).toMatchSnapshot();
96
- expect(appLoader).toHaveBeenCalled();
97
- expect.assertions(4);
98
- });
99
-
100
- it("sends the quickBrickReady event when a loader doesn't resolves", (done) => {
101
- const DecoratedComponent = decorator(Component);
102
-
103
- let wrapper;
104
-
105
- const testCallback = () => {
106
- expect(dispatch).toHaveBeenCalledWith(
107
- expect.objectContaining({ type: "SET_APP_READY" })
108
- );
109
-
110
- expect(QuickBrickManager.sendQuickBrickEvent).toHaveBeenCalledWith(
111
- QUICK_BRICK_READY_EVENT
112
- );
113
-
114
- expect(logger.warning.mock.calls).toMatchSnapshot();
115
-
116
- done();
117
- };
118
-
119
- act(() => {
120
- wrapper = create(
121
- <DecoratedComponent
122
- dispatch={dispatch}
123
- {...state}
124
- shouldFail
125
- testCallback={testCallback}
126
- />
127
- );
128
- });
129
-
130
- expect(wrapper.toJSON()).toMatchSnapshot();
131
- expect(appLoader).toHaveBeenCalled();
132
- expect.assertions(5);
133
- });
134
- });
@@ -1,43 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`remoteContextReloader adds a componentDidMount method 1`] = `
4
- <Component
5
- appSettings={
6
- Object {
7
- "runtimeConfigurationUrls": Object {
8
- "foo": "bar",
9
- },
10
- }
11
- }
12
- dispatch={[MockFunction]}
13
- plugins={Array []}
14
- />
15
- `;
16
-
17
- exports[`remoteContextReloader when in __DEV__ doesn't invoke the context reloader 1`] = `
18
- <Component
19
- appSettings={
20
- Object {
21
- "runtimeConfigurationUrls": Object {
22
- "foo": "bar",
23
- },
24
- }
25
- }
26
- dispatch={[MockFunction]}
27
- plugins={Array []}
28
- />
29
- `;
30
-
31
- exports[`remoteContextReloader when not in __DEV__ invokes the context reloader 1`] = `
32
- <Component
33
- appSettings={
34
- Object {
35
- "runtimeConfigurationUrls": Object {
36
- "foo": "bar",
37
- },
38
- }
39
- }
40
- dispatch={[MockFunction]}
41
- plugins={Array []}
42
- />
43
- `;