@common-stack/client-react 3.0.2-alpha.4 → 3.0.2-alpha.5

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 (146) hide show
  1. package/lib/connector/base-connector.js +3 -10
  2. package/lib/connector/base-connector.js.map +1 -1
  3. package/lib/connector/connector.d.ts +0 -1
  4. package/lib/connector/connector.js +3 -8
  5. package/lib/connector/connector.js.map +1 -1
  6. package/lib/connector/connector.native.d.ts +0 -1
  7. package/lib/connector/connector.native.js +3 -9
  8. package/lib/connector/connector.native.js.map +1 -1
  9. package/lib/index.js +1 -11
  10. package/lib/index.js.map +1 -1
  11. package/lib/index.native.js +1 -11
  12. package/lib/index.native.js.map +1 -1
  13. package/lib/interfaces/menu.js +2 -3
  14. package/lib/interfaces/menu.js.map +1 -1
  15. package/lib/inversify/InversifyContext.js +4 -6
  16. package/lib/inversify/InversifyContext.js.map +1 -1
  17. package/lib/plugin-area/base-plugin-area.js +4 -10
  18. package/lib/plugin-area/base-plugin-area.js.map +1 -1
  19. package/lib/plugin-area/index.js +2 -6
  20. package/lib/plugin-area/index.js.map +1 -1
  21. package/lib/plugin-area/index.native.js +2 -7
  22. package/lib/plugin-area/index.native.js.map +1 -1
  23. package/lib/plugin-area/plugin-api.js +6 -9
  24. package/lib/plugin-area/plugin-api.js.map +1 -1
  25. package/lib/plugin-area/plugin-context.js +2 -18
  26. package/lib/plugin-area/plugin-context.js.map +1 -1
  27. package/lib/route/get-routes.js +3 -6
  28. package/lib/route/get-routes.js.map +1 -1
  29. package/lib/route/old/get-menus.js +2 -4
  30. package/lib/route/old/get-menus.js.map +1 -1
  31. package/lib/route/old/render.js +2 -5
  32. package/lib/route/old/render.js.map +1 -1
  33. package/lib/route/react-navigation/get-navigation-utils.js +3 -7
  34. package/lib/route/react-navigation/get-navigation-utils.js.map +1 -1
  35. package/lib/route/react-navigation/react-navigation-render.js +6 -10
  36. package/lib/route/react-navigation/react-navigation-render.js.map +1 -1
  37. package/lib/route/react-navigation/root-navigation.js +3 -5
  38. package/lib/route/react-navigation/root-navigation.js.map +1 -1
  39. package/lib/route/react-navigation/types.js +1 -2
  40. package/lib/route/react-navigation/types.js.map +1 -1
  41. package/lib/route/render-routes-native.js +4 -62
  42. package/lib/route/render-routes-native.js.map +1 -1
  43. package/lib/route/render-routes.js +2 -132
  44. package/lib/route/render-routes.js.map +1 -1
  45. package/lib/route/root-navigation.js +3 -5
  46. package/lib/route/root-navigation.js.map +1 -1
  47. package/lib/route-based-plugin-area/plugin-api.js +6 -9
  48. package/lib/route-based-plugin-area/plugin-api.js.map +1 -1
  49. package/lib/route-based-plugin-area/plugin-context.js +2 -18
  50. package/lib/route-based-plugin-area/plugin-context.js.map +1 -1
  51. package/lib/route-based-plugin-area/route-based-plugin-area.js +4 -10
  52. package/lib/route-based-plugin-area/route-based-plugin-area.js.map +1 -1
  53. package/lib/router-factory/index.js +3 -7
  54. package/lib/router-factory/index.js.map +1 -1
  55. package/lib/router-factory/index.native.js +3 -7
  56. package/lib/router-factory/index.native.js.map +1 -1
  57. package/lib/utils/before-ssr.js +2 -4
  58. package/lib/utils/before-ssr.js.map +1 -1
  59. package/lib/utils/combine.js +1 -3
  60. package/lib/utils/combine.js.map +1 -1
  61. package/lib/utils/hydrate.js +2 -4
  62. package/lib/utils/hydrate.js.map +1 -1
  63. package/lib/utils/sort-keys.js +3 -5
  64. package/lib/utils/sort-keys.js.map +1 -1
  65. package/lib/utils/utils.js +2 -3
  66. package/lib/utils/utils.js.map +1 -1
  67. package/package.json +7 -6
  68. package/lib/__tests__/fill-register-test.js +0 -45
  69. package/lib/__tests__/fill-register-test.js.map +0 -1
  70. package/lib/__tests__/helpers/sample-menu.js +0 -75
  71. package/lib/__tests__/helpers/sample-menu.js.map +0 -1
  72. package/lib/__tests__/integrated-routes.test.js +0 -59
  73. package/lib/__tests__/integrated-routes.test.js.map +0 -1
  74. package/lib/__tests__/router-render.test.js +0 -49
  75. package/lib/__tests__/router-render.test.js.map +0 -1
  76. package/lib/connector/connector.test.js +0 -11
  77. package/lib/connector/connector.test.js.map +0 -1
  78. package/lib/connector/index.js +0 -2
  79. package/lib/connector/index.js.map +0 -1
  80. package/lib/interfaces/extended-feature.js +0 -2
  81. package/lib/interfaces/extended-feature.js.map +0 -1
  82. package/lib/interfaces/feature.js +0 -2
  83. package/lib/interfaces/feature.js.map +0 -1
  84. package/lib/interfaces/index.js +0 -6
  85. package/lib/interfaces/index.js.map +0 -1
  86. package/lib/interfaces/new-router.js +0 -2
  87. package/lib/interfaces/new-router.js.map +0 -1
  88. package/lib/interfaces/router.js +0 -2
  89. package/lib/interfaces/router.js.map +0 -1
  90. package/lib/inversify/index.js +0 -2
  91. package/lib/inversify/index.js.map +0 -1
  92. package/lib/plugin-area/__tests__/higher-order-component-util.test.js +0 -39
  93. package/lib/plugin-area/__tests__/higher-order-component-util.test.js.map +0 -1
  94. package/lib/plugin-area/__tests__/plugin-api.test.js +0 -52
  95. package/lib/plugin-area/__tests__/plugin-api.test.js.map +0 -1
  96. package/lib/plugin-area/higher-order-component-util.js +0 -19
  97. package/lib/plugin-area/higher-order-component-util.js.map +0 -1
  98. package/lib/route/__tests__/admin-new-routes.test.js +0 -145
  99. package/lib/route/__tests__/admin-new-routes.test.js.map +0 -1
  100. package/lib/route/__tests__/config-routes.test.d.ts +0 -0
  101. package/lib/route/__tests__/config-routes.test.js +0 -326
  102. package/lib/route/__tests__/config-routes.test.js.map +0 -1
  103. package/lib/route/__tests__/getFlatMenus.test.js +0 -94
  104. package/lib/route/__tests__/getFlatMenus.test.js.map +0 -1
  105. package/lib/route/__tests__/render-routes-config.test.js +0 -57
  106. package/lib/route/__tests__/render-routes-config.test.js.map +0 -1
  107. package/lib/route/__tests__/route-type.test.js +0 -8
  108. package/lib/route/__tests__/route-type.test.js.map +0 -1
  109. package/lib/route/get-routes.test.js +0 -184
  110. package/lib/route/get-routes.test.js.map +0 -1
  111. package/lib/route/index.js +0 -3
  112. package/lib/route/index.js.map +0 -1
  113. package/lib/route/index.native.js +0 -2
  114. package/lib/route/index.native.js.map +0 -1
  115. package/lib/route/old/__tests__/config-sidebar-menu.test.js +0 -200
  116. package/lib/route/old/__tests__/config-sidebar-menu.test.js.map +0 -1
  117. package/lib/route/old/get-routes-notused.js +0 -63
  118. package/lib/route/old/get-routes-notused.js.map +0 -1
  119. package/lib/route/react-navigation/get-navigation-utils.test.js +0 -180
  120. package/lib/route/react-navigation/get-navigation-utils.test.js.map +0 -1
  121. package/lib/route/react-navigation/index.js +0 -3
  122. package/lib/route/react-navigation/index.js.map +0 -1
  123. package/lib/route/react-navigation/react-native.sample.test.js +0 -13
  124. package/lib/route/react-navigation/react-native.sample.test.js.map +0 -1
  125. package/lib/route/react-navigation/react-native.sample1.test.js +0 -30
  126. package/lib/route/react-navigation/react-native.sample1.test.js.map +0 -1
  127. package/lib/route/react-navigation/react-navigation-render.test.js +0 -139
  128. package/lib/route/react-navigation/react-navigation-render.test.js.map +0 -1
  129. package/lib/route/react-navigation/routes.js +0 -2
  130. package/lib/route/react-navigation/routes.js.map +0 -1
  131. package/lib/route/render-routes.test.js +0 -452
  132. package/lib/route/render-routes.test.js.map +0 -1
  133. package/lib/route/test-routes.js +0 -578
  134. package/lib/route/test-routes.js.map +0 -1
  135. package/lib/route-based-plugin-area/__tests__/higher-order-component-util.test.js +0 -39
  136. package/lib/route-based-plugin-area/__tests__/higher-order-component-util.test.js.map +0 -1
  137. package/lib/route-based-plugin-area/__tests__/plugin-api.test.js +0 -52
  138. package/lib/route-based-plugin-area/__tests__/plugin-api.test.js.map +0 -1
  139. package/lib/route-based-plugin-area/higher-order-component-util.js +0 -19
  140. package/lib/route-based-plugin-area/higher-order-component-util.js.map +0 -1
  141. package/lib/route-based-plugin-area/index.js +0 -3
  142. package/lib/route-based-plugin-area/index.js.map +0 -1
  143. package/lib/utils/index.js +0 -6
  144. package/lib/utils/index.js.map +0 -1
  145. package/lib/utils/sort-keys.test.js +0 -59
  146. package/lib/utils/sort-keys.test.js.map +0 -1
@@ -1,452 +0,0 @@
1
- import { cleanup, getByText, render, screen, waitFor } from '@testing-library/react';
2
- import { Link, useParams, createMemoryRouter, RouterProvider, Outlet, useLoaderData } from 'react-router-dom';
3
- import React from 'react';
4
- import { renderRoutes2 as renderRoutes } from './render-routes';
5
- function TestInitialProps({ foo }) {
6
- return React.createElement("h1", { "data-testid": "test" }, foo);
7
- }
8
- let mountCount = 0;
9
- let renderCount = 0;
10
- function TestInitialPropsWithoutUnmount({ foo }) {
11
- React.useEffect(() => {
12
- return () => {
13
- mountCount++;
14
- };
15
- }, []);
16
- return (React.createElement("div", null,
17
- React.createElement("h1", { "data-testid": "test2" }, foo),
18
- React.createElement("a", { href: "#bar" }, "link-bar"),
19
- React.createElement(Link, { to: "/get-initial-props" }, "change-route"),
20
- React.createElement("h2", { id: "bar" }, "h2-bar")));
21
- }
22
- function TestInitialPropsWithMount({ foo }) {
23
- React.useEffect(() => {
24
- mountCount++;
25
- }, []);
26
- renderCount++;
27
- return React.createElement("h1", { "data-testid": "test" }, foo);
28
- }
29
- const getInitialProps = async () => {
30
- return new Promise((resolve) => {
31
- setTimeout(() => {
32
- resolve({
33
- foo: 'bar',
34
- });
35
- }, 100);
36
- });
37
- };
38
- TestInitialProps.getInitialProps = getInitialProps;
39
- TestInitialPropsWithoutUnmount.getInitialProps = getInitialProps;
40
- TestInitialPropsWithMount.getInitialProps = getInitialProps;
41
- function TestInitialPropsParent({ foo, children, }) {
42
- return (React.createElement(React.Fragment, null,
43
- React.createElement("h1", { "data-testid": "test-parent" }, foo),
44
- children));
45
- }
46
- TestInitialPropsParent.getInitialProps = async () => {
47
- return new Promise((resolve) => {
48
- setTimeout(() => {
49
- resolve({
50
- foo: 'parent',
51
- });
52
- }, 100);
53
- });
54
- };
55
- const routerConfig = {
56
- isServer: false,
57
- ssrProps: {},
58
- loaderArgs: { foo: 'bar' },
59
- routes: [
60
- {
61
- path: '/with-loader',
62
- loader: async ({ foo }) => {
63
- return { title: 'Loader', foo };
64
- },
65
- component: (props) => {
66
- const loaderData = useLoaderData();
67
- return (React.createElement(React.Fragment, null,
68
- React.createElement("h1", { "data-testid": "root" }, loaderData.title),
69
- React.createElement("h2", { "data-testid": "foo" }, loaderData.foo),
70
- React.createElement(Outlet, null)));
71
- },
72
- routes: [
73
- {
74
- path: '/with-loader/child/:id',
75
- loader: async ({ params }) => {
76
- const list = ['one', 'two', 'three'];
77
- return { number: list[params.id] };
78
- },
79
- component: (props) => {
80
- const loaderData = useLoaderData();
81
- return (React.createElement(React.Fragment, null,
82
- React.createElement("h1", { "data-testid": "test" }, "Child"),
83
- React.createElement("h2", { "data-testid": "number" }, loaderData.number)));
84
- }
85
- },
86
- ],
87
- },
88
- {
89
- path: '/layout',
90
- component: (props) => (React.createElement(React.Fragment, null,
91
- React.createElement("h1", { "data-testid": "layout" }, "Layout"),
92
- React.createElement("h2", { "data-testid": "routes" }, props.routes.map((r) => r.path).join(',')),
93
- props.children)),
94
- routes: [
95
- {
96
- path: '/layout',
97
- component: (props) => (React.createElement(React.Fragment, null,
98
- React.createElement("h1", { "data-testid": "test" }, "Foo"),
99
- React.createElement("h2", { "data-testid": "routes-embed" }, props.routes.map((r) => r.path).join(',')))),
100
- },
101
- {
102
- path: '/layout/top',
103
- component: (props) => (React.createElement(React.Fragment, null,
104
- React.createElement("h1", { "data-testid": "top" }, "Top"))),
105
- },
106
- ],
107
- },
108
- {
109
- path: '/layout-without-component',
110
- routes: [
111
- {
112
- path: '/layout-without-component/foo',
113
- component: () => React.createElement("h1", { "data-testid": "test" }, "Foo"),
114
- },
115
- ],
116
- },
117
- {
118
- path: '/users/:id',
119
- component: (props) => {
120
- let params = useParams();
121
- return React.createElement(React.Fragment, null,
122
- React.createElement("h1", { "data-testid": "test" }, params.id),
123
- React.createElement(Outlet, null));
124
- },
125
- routes: [
126
- {
127
- path: '/users/:id/dashboard',
128
- component: (props) => {
129
- let params = useParams();
130
- return React.createElement("h2", { "data-testid": "test2" },
131
- "Dashboard of ",
132
- params.id);
133
- },
134
- },
135
- {
136
- path: '/users/:id/profile',
137
- component: (props) => {
138
- let params = useParams();
139
- return React.createElement("h2", { "data-testid": "test2" },
140
- "Profile of ",
141
- params.id);
142
- },
143
- }
144
- ]
145
- },
146
- {
147
- path: '/nested-routes',
148
- routes: [
149
- {
150
- path: '/nested-routes/first',
151
- component: () => React.createElement("h2", { "data-testid": "child" }, "First"),
152
- },
153
- {
154
- path: '/nested-routes/second',
155
- component: () => React.createElement(React.Fragment, null,
156
- React.createElement("h2", { "data-testid": "child" }, "Second"),
157
- React.createElement(Outlet, null)),
158
- routes: [
159
- {
160
- path: '/nested-routes/second/one',
161
- component: () => React.createElement("h3", { "data-testid": "nest-child" }, "One"),
162
- },
163
- {
164
- path: '/nested-routes/second/two',
165
- component: () => React.createElement("h3", { "data-testid": "nest-child" }, "Two"),
166
- },
167
- ],
168
- },
169
- ],
170
- },
171
- { path: '/bar', component: () => React.createElement("h1", { "data-testid": "test" }, "Bar") },
172
- {
173
- path: '/bar-exact',
174
- exact: true,
175
- component: () => React.createElement("h1", { "data-testid": "test" }, "Bar Exact"),
176
- },
177
- {
178
- path: '/bar-strict/',
179
- strict: true,
180
- component: () => React.createElement("h1", { "data-testid": "test" }, "Bar Strict mode will not work"),
181
- },
182
- {
183
- path: '/bar-sensitive',
184
- sensitive: true,
185
- component: () => React.createElement("h1", { "data-testid": "test" }, "Bar Sensitive"),
186
- },
187
- { path: '/redirect', redirect: '/d' },
188
- { path: '/d', component: () => React.createElement("h1", { "data-testid": "test" }, "Redirect") },
189
- { path: '/get-initial-props', component: TestInitialProps },
190
- {
191
- path: '/get-initial-props-without-unmount',
192
- component: TestInitialPropsWithoutUnmount,
193
- },
194
- {
195
- path: '/get-initial-props-with-mount',
196
- component: TestInitialPropsWithMount,
197
- },
198
- {
199
- path: '/get-initial-props-embed',
200
- component: TestInitialPropsParent,
201
- routes: [
202
- {
203
- path: '/get-initial-props-embed',
204
- component: TestInitialProps,
205
- },
206
- ],
207
- },
208
- {
209
- path: '/props-route',
210
- foo: 'bar',
211
- component: (props) => (React.createElement("h1", { "data-testid": "test" }, `${props.route.path} ${props.route.foo}`)),
212
- },
213
- {
214
- path: '/pass-props',
215
- component: (props) => {
216
- return React.Children.map(props.children, (child) => {
217
- return React.cloneElement(child, { foo: 'bar' });
218
- });
219
- },
220
- routes: [
221
- {
222
- path: '/pass-props',
223
- component: (props) => React.createElement("h1", { "data-testid": "test" }, props.foo),
224
- },
225
- ],
226
- },
227
- {
228
- path: '/wrappers',
229
- component: () => React.createElement("h1", null, "foo"),
230
- wrappers: [
231
- (props) => (React.createElement(React.Fragment, null,
232
- React.createElement("h1", null,
233
- "wrapper 1 ",
234
- props.route.path),
235
- props.children)),
236
- (props) => (React.createElement(React.Fragment, null,
237
- React.createElement("h1", null, "wrapper 2"),
238
- props.children)),
239
- ],
240
- },
241
- { component: () => React.createElement("h1", { "data-testid": "test" }, "Fallback") },
242
- ],
243
- // plugin: new Plugin(),
244
- };
245
- // const setComponent = (configs) => {
246
- // return configs.map((config) => {
247
- // config.component = (props) => {
248
- // const configParam = useParams();
249
- // if (Array.isArray(config.routes)) {
250
- // // console.log(props);
251
- // return <section><h1>{config.path}</h1><span>{JSON.stringify(configParam)}</span><Outlet /></section>
252
- // } else {
253
- // return <section><h1>{config.path}</h1><span>{JSON.stringify(configParam)}</span><p>{config.key}</p></section>
254
- // }
255
- // }
256
- // if (Array.isArray(config.routes)) {
257
- // config.routes = setComponent(config.routes);
258
- // }
259
- // return config
260
- // })
261
- // }
262
- // routerConfig.routes = setComponent(testRoutes);
263
- const routes = renderRoutes(routerConfig);
264
- beforeEach(() => {
265
- window.g_useSSR = true;
266
- window.g_initialProps = null;
267
- mountCount = 0;
268
- renderCount = 0;
269
- });
270
- afterEach(async () => {
271
- delete window.g_useSSR;
272
- delete window.g_initialProps;
273
- await cleanup();
274
- });
275
- // test('/o/:orgName/dashboard', async () => {
276
- // const router = createMemoryRouter(routes, {initialEntries: ['/o/toka/dashboard']});
277
- // const { container } = render(<RouterProvider router={router} />)
278
- // expect(container).toMatchSnapshot();
279
- // });
280
- test('/layout', async () => {
281
- const router = createMemoryRouter(routes, { initialEntries: ['/layout'] });
282
- const { container } = render(React.createElement(RouterProvider, { router: router }));
283
- // const { container } = render(
284
- // <MemoryRouter initialEntries={['/layout']}>
285
- // {routes}
286
- // </MemoryRouter>
287
- // );
288
- // expect(container).toMatchSnapshot();
289
- expect((await screen.findByTestId('layout')).innerHTML).toEqual('Layout');
290
- expect((await screen.findByTestId('routes')).innerHTML).toContain('/layout,/layout-without-component,/users/:id');
291
- expect((await screen.findByTestId('routes-embed')).innerHTML).toContain('/layout,/layout-without-component,/users/:id');
292
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Foo');
293
- });
294
- test('/layout/top', async () => {
295
- const router = createMemoryRouter(routes, { initialEntries: ['/layout/top'] });
296
- render(React.createElement(RouterProvider, { router: router }));
297
- expect((await screen.findByTestId('top')).innerHTML).toEqual('Top');
298
- });
299
- test('/layout-without-component', async () => {
300
- const router = createMemoryRouter(routes, { initialEntries: ['/layout-without-component/foo'] });
301
- render(React.createElement(RouterProvider, { router: router }));
302
- // render(
303
- // <MemoryRouter initialEntries={['/layout-without-component/foo']}>
304
- // {routes}
305
- // </MemoryRouter>,
306
- // );
307
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Foo');
308
- });
309
- test('/with-loader', async () => {
310
- const router = createMemoryRouter(routes, { initialEntries: ['/with-loader'] });
311
- render(React.createElement(RouterProvider, { router: router }));
312
- expect((await screen.findByTestId('root')).innerHTML).toEqual('Loader');
313
- expect((await screen.findByTestId('foo')).innerHTML).toEqual('bar');
314
- });
315
- test('/with-loader/child', async () => {
316
- const router = createMemoryRouter(routes, { initialEntries: ['/with-loader/child/1'] });
317
- render(React.createElement(RouterProvider, { router: router }));
318
- expect((await screen.findByTestId('root')).innerHTML).toEqual('Loader');
319
- expect((await screen.findByTestId('foo')).innerHTML).toEqual('bar');
320
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Child');
321
- expect((await screen.findByTestId('number')).innerHTML).toEqual('two');
322
- });
323
- test('/nested-routes/first', async () => {
324
- const router = createMemoryRouter(routes, { initialEntries: ['/nested-routes/first'] });
325
- render(React.createElement(RouterProvider, { router: router }));
326
- expect((await screen.findByTestId('child')).innerHTML).toEqual('First');
327
- });
328
- test('/nested-routes/second/one', async () => {
329
- const router = createMemoryRouter(routes, { initialEntries: ['/nested-routes/second/one'] });
330
- render(React.createElement(RouterProvider, { router: router }));
331
- expect((await screen.findByTestId('nest-child')).innerHTML).toEqual('One');
332
- });
333
- test('/bar', async () => {
334
- const router = createMemoryRouter(routes, { initialEntries: ['/bar'] });
335
- render(React.createElement(RouterProvider, { router: router }));
336
- // render(<MemoryRouter initialEntries={['/bar']}>{routes}</MemoryRouter>);
337
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Bar');
338
- });
339
- test('/BAR', async () => {
340
- const router = createMemoryRouter(routes, { initialEntries: ['/BAR'] });
341
- render(React.createElement(RouterProvider, { router: router }));
342
- // render(<MemoryRouter initialEntries={['/BAR']}>{routes}</MemoryRouter>);
343
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Bar');
344
- });
345
- test('/bar-exact/foo', async () => {
346
- const router = createMemoryRouter(routes, { initialEntries: ['/bar-exact/foo'] });
347
- render(React.createElement(RouterProvider, { router: router }));
348
- // render(
349
- // <MemoryRouter initialEntries={['/bar-exact/foo']}>{routes}</MemoryRouter>,
350
- // );
351
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Fallback');
352
- });
353
- test('/bar-strict', async () => {
354
- const router = createMemoryRouter(routes, { initialEntries: ['/bar-strict'] });
355
- render(React.createElement(RouterProvider, { router: router }));
356
- // render(
357
- // <MemoryRouter initialEntries={['/bar-strict']}>{routes}</MemoryRouter>,
358
- // );
359
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Bar Strict mode will not work');
360
- });
361
- test('/BAR-sensitive', async () => {
362
- const router = createMemoryRouter(routes, { initialEntries: ['/BAR-sensitive'] });
363
- render(React.createElement(RouterProvider, { router: router }));
364
- // render(
365
- // <MemoryRouter initialEntries={['/BAR-sensitive']}>{routes}</MemoryRouter>,
366
- // );
367
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Fallback');
368
- });
369
- test('/users/123', async () => {
370
- const router = createMemoryRouter(routes, { initialEntries: ['/users/123'] });
371
- render(React.createElement(RouterProvider, { router: router }));
372
- // render(<MemoryRouter initialEntries={['/users/123']}>{routes}</MemoryRouter>);
373
- expect((await screen.findByTestId('test')).innerHTML).toEqual('123');
374
- });
375
- test('/users/123/dashboard', async () => {
376
- const router = createMemoryRouter(routes, { initialEntries: ['/users/123/dashboard'] });
377
- render(React.createElement(RouterProvider, { router: router }));
378
- // render(<MemoryRouter initialEntries={['/users/123']}>{routes}</MemoryRouter>);
379
- expect((await screen.findByTestId('test2')).innerHTML).toEqual('Dashboard of 123');
380
- });
381
- test('/redirect', async () => {
382
- const router = createMemoryRouter(routes, { initialEntries: ['/redirect'] });
383
- render(React.createElement(RouterProvider, { router: router }));
384
- // const newRoutes = renderRoutes({...routerConfig, withRoutesElement: true});
385
- // render(<MemoryRouter initialEntries={['/redirect']}>{newRoutes}</MemoryRouter>);
386
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Redirect');
387
- });
388
- test('/props-route', async () => {
389
- const router = createMemoryRouter(routes, { initialEntries: ['/props-route'] });
390
- render(React.createElement(RouterProvider, { router: router }));
391
- // render(
392
- // <MemoryRouter initialEntries={['/props-route']}>{routes}</MemoryRouter>,
393
- // );
394
- expect((await screen.findByTestId('test')).innerHTML).toEqual('/props-route bar');
395
- });
396
- test('/pass-props', async () => {
397
- const router = createMemoryRouter(routes, { initialEntries: ['/pass-props'] });
398
- const { container } = render(React.createElement(RouterProvider, { router: router }));
399
- // const { container } = render(
400
- // <MemoryRouter initialEntries={['/pass-props']}>{routes}</MemoryRouter>,
401
- // );
402
- await waitFor(() => getByText(container, 'bar'));
403
- expect((await screen.findByTestId('test')).innerHTML).toEqual('bar');
404
- });
405
- test('/get-initial-props-with-mount', async () => {
406
- const newRoutes = renderRoutes(routerConfig);
407
- const router = createMemoryRouter(newRoutes, { initialEntries: ['/get-initial-props-with-mount'] });
408
- expect(mountCount).toEqual(0);
409
- expect(renderCount).toEqual(0);
410
- const { container } = render(React.createElement(RouterProvider, { router: router }));
411
- // const { container } = render(
412
- // <MemoryRouter initialEntries={['/get-initial-props-with-mount']}>
413
- // {newRoutes}
414
- // </MemoryRouter>,
415
- // );
416
- await waitFor(() => getByText(container, 'bar'));
417
- expect(mountCount).toEqual(1);
418
- expect(renderCount).toEqual(2);
419
- });
420
- test('/get-initial-props-embed', async () => {
421
- const newRoutes = renderRoutes(routerConfig);
422
- const router = createMemoryRouter(newRoutes, { initialEntries: ['/get-initial-props-embed'] });
423
- const { container } = render(React.createElement(RouterProvider, { router: router }));
424
- // const { container } = render(
425
- // <MemoryRouter initialEntries={['/get-initial-props-embed']}>
426
- // {newRoutes}
427
- // </MemoryRouter>,
428
- // );
429
- await waitFor(() => getByText(container, 'bar'));
430
- await waitFor(() => getByText(container, 'parent'));
431
- expect((await screen.findByTestId('test')).innerHTML).toEqual('bar');
432
- expect((await screen.findByTestId('test-parent')).innerHTML).toEqual('parent');
433
- });
434
- test('/wrappers', () => {
435
- const router = createMemoryRouter(routes, { initialEntries: ['/wrappers'] });
436
- const { container } = render(React.createElement(RouterProvider, { router: router }));
437
- // const { container } = render(
438
- // <MemoryRouter initialEntries={['/wrappers']}>{routes}</MemoryRouter>,
439
- // );
440
- expect(container.innerHTML).toEqual('<h1>wrapper 1 /wrappers</h1><h1>wrapper 2</h1><h1>foo</h1>');
441
- });
442
- test('/fallback-20140924', async () => {
443
- const router = createMemoryRouter(routes, { initialEntries: ['/fallback-20140924'] });
444
- render(React.createElement(RouterProvider, { router: router }));
445
- // render(
446
- // <MemoryRouter initialEntries={['/fallback-20140924']}>
447
- // {routes}
448
- // </MemoryRouter>,
449
- // );
450
- expect((await screen.findByTestId('test')).innerHTML).toEqual('Fallback');
451
- });
452
- //# sourceMappingURL=render-routes.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render-routes.test.js","sourceRoot":"","sources":["../../src/route/render-routes.test.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGhE,SAAS,gBAAgB,CAAC,EAAE,GAAG,EAAmB;IAChD,OAAO,2CAAgB,MAAM,IAAE,GAAG,CAAM,CAAC;AAC3C,CAAC;AAED,IAAI,UAAU,GAAG,CAAC,CAAC;AACnB,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,SAAS,8BAA8B,CAAC,EAAE,GAAG,EAAmB;IAC9D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,GAAG,EAAE;YACV,UAAU,EAAE,CAAC;QACf,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,CACL;QACE,2CAAgB,OAAO,IAAE,GAAG,CAAM;QAClC,2BAAG,IAAI,EAAC,MAAM,eAAa;QAC3B,oBAAC,IAAI,IAAC,EAAE,EAAC,oBAAoB,mBAAoB;QACjD,4BAAI,EAAE,EAAC,KAAK,aAAY,CACpB,CACP,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB,CAAC,EAAE,GAAG,EAAmB;IACzD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,UAAU,EAAE,CAAC;IACf,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,WAA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