@finos/legend-application-marketplace 0.1.84 → 0.1.85
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/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts +1 -5
- package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js +0 -28
- package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx +1 -57
- package/src/index.ts +1 -0
- package/tsconfig.json +1 -1
- /package/lib/{components → pages}/__test-utils__/TEST_DATA__SearchResults.json +0 -0
- /package/src/{components → pages}/__test-utils__/TEST_DATA__SearchResults.json +0 -0
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { type RenderResult } from '@testing-library/react';
|
|
17
16
|
import { type AbstractPlugin, type AbstractPreset } from '@finos/legend-shared';
|
|
18
17
|
import { type LegendMarketplaceApplicationStore, LegendMarketplaceBaseStore } from '../../stores/LegendMarketplaceBaseStore.js';
|
|
19
18
|
import { LegendMarketplacePluginManager } from '../../application/LegendMarketplacePluginManager.js';
|
|
@@ -25,10 +24,7 @@ export declare const TEST__provideMockLegendMarketplaceBaseStore: (customization
|
|
|
25
24
|
extraPresets?: AbstractPreset[];
|
|
26
25
|
dataProductEnv?: string | undefined;
|
|
27
26
|
}) => Promise<LegendMarketplaceBaseStore>;
|
|
28
|
-
export declare const TEST__setUpMarketplace: (MOCK__store: LegendMarketplaceBaseStore, route?: string) => Promise<{
|
|
29
|
-
renderResult: RenderResult;
|
|
30
|
-
}>;
|
|
31
27
|
export declare const TEST__setUpMarketplaceLakehouse: (MOCK__baseStore: LegendMarketplaceBaseStore, route?: string) => Promise<{
|
|
32
|
-
renderResult: RenderResult<typeof import("@testing-library/dom/types/queries.js"), HTMLElement, HTMLElement>;
|
|
28
|
+
renderResult: import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries.js"), HTMLElement, HTMLElement>;
|
|
33
29
|
}>;
|
|
34
30
|
//# sourceMappingURL=LegendMarketplaceStoreTestUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendMarketplaceStoreTestUtils.d.ts","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"LegendMarketplaceStoreTestUtils.d.ts","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQhF,OAAO,EACL,KAAK,iCAAiC,EACtC,0BAA0B,EAC3B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AAMrG,eAAO,MAAM,2CAA2C,GAC/C,gBAAgB;IACrB,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAC3C,gBAAgB,CAAC,EAAE,iCAAiC,CAAC;IACrD,aAAa,CAAC,EAAE,8BAA8B,CAAC;IAC/C,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,KAAG,OAAO,CAAC,0BAA0B,CAkCrC,CAAC;AAEJ,eAAO,MAAM,+BAA+B,GAC1C,iBAAiB,0BAA0B,EAC3C,QAAQ,MAAM;;EAwBf,CAAC"}
|
|
@@ -17,7 +17,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
17
17
|
import { render, waitFor } from '@testing-library/react';
|
|
18
18
|
import {} from '@finos/legend-shared';
|
|
19
19
|
import { createMock, createSpy } from '@finos/legend-shared/test';
|
|
20
|
-
import { jest } from '@jest/globals';
|
|
21
20
|
import { ApplicationStore, ApplicationStoreProvider, } from '@finos/legend-application';
|
|
22
21
|
import { AuthProvider } from 'react-oidc-context';
|
|
23
22
|
import { TEST__BrowserEnvironmentProvider } from '@finos/legend-application/test';
|
|
@@ -27,24 +26,7 @@ import { LegendMarketplacePluginManager } from '../../application/LegendMarketpl
|
|
|
27
26
|
import { Core_LegendMarketplaceApplicationPlugin } from '../../application/extensions/Core_LegendMarketplaceApplicationPlugin.js';
|
|
28
27
|
import { TEST__getTestLegendMarketplaceApplicationConfig } from '../../application/__test-utils__/LegendMarketplaceApplicationTestUtils.js';
|
|
29
28
|
import { LegendMarketplaceFrameworkProvider } from '../../application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
30
|
-
import searchResults from './TEST_DATA__SearchResults.json' with { type: 'json' };
|
|
31
29
|
import { LegendMarketplaceWebApplicationRouter } from '../../application/LegendMarketplaceWebApplication.js';
|
|
32
|
-
jest.mock('@finos/legend-graph', () => {
|
|
33
|
-
const actual = jest.requireActual('@finos/legend-graph');
|
|
34
|
-
return {
|
|
35
|
-
...actual,
|
|
36
|
-
getCurrentUserIDFromEngineServer: jest.fn(() => Promise.resolve('test-consumer-user-id')),
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
jest.mock('swiper/react', () => ({
|
|
40
|
-
Swiper: ({}) => _jsx("div", {}),
|
|
41
|
-
SwiperSlide: ({}) => _jsx("div", {}),
|
|
42
|
-
}));
|
|
43
|
-
jest.mock('swiper/modules', () => ({
|
|
44
|
-
Navigation: ({}) => _jsx("div", {}),
|
|
45
|
-
Pagination: ({}) => _jsx("div", {}),
|
|
46
|
-
Autoplay: ({}) => _jsx("div", {}),
|
|
47
|
-
}));
|
|
48
30
|
export const TEST__provideMockLegendMarketplaceBaseStore = async (customization) => {
|
|
49
31
|
const pluginManager = customization?.pluginManager ?? LegendMarketplacePluginManager.create();
|
|
50
32
|
pluginManager
|
|
@@ -65,16 +47,6 @@ export const TEST__provideMockLegendMarketplaceBaseStore = async (customization)
|
|
|
65
47
|
MOCK__LegendMarketplaceBaseStoreProvider.useLegendMarketplaceBaseStore.mockReturnValue(mockBaseStore);
|
|
66
48
|
return mockBaseStore;
|
|
67
49
|
};
|
|
68
|
-
export const TEST__setUpMarketplace = async (MOCK__store, route) => {
|
|
69
|
-
createSpy(MOCK__store.marketplaceServerClient, 'dataProductSearch').mockResolvedValue({
|
|
70
|
-
dataProducts: searchResults,
|
|
71
|
-
});
|
|
72
|
-
const renderResult = render(_jsx(ApplicationStoreProvider, { store: MOCK__store.applicationStore, children: _jsx(TEST__BrowserEnvironmentProvider, { initialEntries: [route ?? '/'], children: _jsx(LegendMarketplaceFrameworkProvider, { children: _jsx(LegendMarketplaceWebApplicationRouter, {}) }) }) }));
|
|
73
|
-
await waitFor(() => renderResult.getByTestId(LEGEND_MARKETPLACE_TEST_ID.HEADER));
|
|
74
|
-
return {
|
|
75
|
-
renderResult,
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
50
|
export const TEST__setUpMarketplaceLakehouse = async (MOCK__baseStore, route) => {
|
|
79
51
|
const renderResult = render(_jsx(ApplicationStoreProvider, { store: MOCK__baseStore.applicationStore, children: _jsx(AuthProvider, { children: _jsx(TEST__BrowserEnvironmentProvider, { initialEntries: [route ?? '/'], baseUrl: route ?? '/', children: _jsx(LegendMarketplaceFrameworkProvider, { children: _jsx(LegendMarketplaceWebApplicationRouter, {}) }) }) }) }));
|
|
80
52
|
await waitFor(() => renderResult.getByTestId(LEGEND_MARKETPLACE_TEST_ID.HEADER));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendMarketplaceStoreTestUtils.js","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendMarketplaceStoreTestUtils.js","sourceRoot":"","sources":["../../../src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAA4C,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAEL,0BAA0B,GAC3B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,8BAA8B,EAAE,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,uCAAuC,EAAE,MAAM,yEAAyE,CAAC;AAClI,OAAO,EAAE,+CAA+C,EAAE,MAAM,2EAA2E,CAAC;AAC5I,OAAO,EAAE,kCAAkC,EAAE,MAAM,mEAAmE,CAAC;AACvH,OAAO,EAAE,qCAAqC,EAAE,MAAM,sDAAsD,CAAC;AAE7G,MAAM,CAAC,MAAM,2CAA2C,GACtD,KAAK,EAAE,aAON,EAAuC,EAAE;IACxC,MAAM,aAAa,GACjB,aAAa,EAAE,aAAa,IAAI,8BAA8B,CAAC,MAAM,EAAE,CAAC;IAC1E,aAAa;SACV,UAAU,CAAC;QACV,IAAI,uCAAuC,EAAE;QAC7C,GAAG,CAAC,aAAa,EAAE,YAAY,IAAI,EAAE,CAAC;KACvC,CAAC;SACD,UAAU,CAAC,CAAC,GAAG,CAAC,aAAa,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC;SACpD,OAAO,EAAE,CAAC;IACb,MAAM,gBAAgB,GACpB,aAAa,EAAE,gBAAgB;QAC/B,IAAI,gBAAgB,CAClB,+CAA+C,CAC7C,aAAa,EAAE,cAAc,CAC9B,EACD,aAAa,CACd,CAAC;IACJ,MAAM,aAAa,GACjB,aAAa,EAAE,aAAa;QAC5B,IAAI,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;IAEnD,SAAS,CACP,aAAa,CAAC,6BAA6B,EAC3C,+BAA+B,CAChC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;IAExB,MAAM,wCAAwC,GAAG,OAAO,CAAC,mEAAmE,CAAC,CAAC,CAAC,qGAAqG;IACpO,wCAAwC,CAAC,6BAA6B;QACpE,UAAU,EAAE,CAAC;IACf,wCAAwC,CAAC,6BAA6B,CAAC,eAAe,CACpF,aAAa,CACd,CAAC;IACF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,EAClD,eAA2C,EAC3C,KAAc,EACd,EAAE;IACF,MAAM,YAAY,GAAG,MAAM,CACzB,KAAC,wBAAwB,IAAC,KAAK,EAAE,eAAe,CAAC,gBAAgB,YAC/D,KAAC,YAAY,cACX,KAAC,gCAAgC,IAC/B,cAAc,EAAE,CAAC,KAAK,IAAI,GAAG,CAAC,EAC9B,OAAO,EAAE,KAAK,IAAI,GAAG,YAErB,KAAC,kCAAkC,cACjC,KAAC,qCAAqC,KAAG,GACN,GACJ,GACtB,GACU,CAC5B,CAAC;IAEF,MAAM,OAAO,CAAC,GAAG,EAAE,CACjB,YAAY,CAAC,WAAW,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAC5D,CAAC;IAEF,OAAO;QACL,YAAY;KACb,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './application/LegendMarketplace.js';
|
|
|
17
17
|
export * from './application/LegendMarketplaceApplicationConfig.js';
|
|
18
18
|
export * from './application/LegendMarketplacePluginManager.js';
|
|
19
19
|
export { useLegendMarketplaceApplicationStore, useLegendMarketplaceBaseStore, } from './application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
20
|
+
export * from './components/__test-utils__/LegendMarketplaceStoreTestUtils.js';
|
|
20
21
|
export { type LegendMarketplaceApplicationStore, type LegendMarketplaceBaseStore, } from './stores/LegendMarketplaceBaseStore.js';
|
|
21
22
|
export * from './application/LegendMarketplaceApplicationPlugin.js';
|
|
22
23
|
export { LegendMarketplaceProductViewerStore } from './stores/lakehouse/LegendMarketplaceProductViewerStore.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,oCAAoC,CAAC;AACnD,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,+DAA+D,CAAC;AACvE,OAAO,EACL,KAAK,iCAAiC,EACtC,KAAK,0BAA0B,GAChC,MAAM,wCAAwC,CAAC;AAChD,cAAc,qDAAqD,CAAC;AACpE,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,oCAAoC,CAAC;AACnD,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,+DAA+D,CAAC;AACvE,cAAc,gEAAgE,CAAC;AAC/E,OAAO,EACL,KAAK,iCAAiC,EACtC,KAAK,0BAA0B,GAChC,MAAM,wCAAwC,CAAC;AAChD,cAAc,qDAAqD,CAAC;AACpE,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export * from './application/LegendMarketplace.js';
|
|
|
18
18
|
export * from './application/LegendMarketplaceApplicationConfig.js';
|
|
19
19
|
export * from './application/LegendMarketplacePluginManager.js';
|
|
20
20
|
export { useLegendMarketplaceApplicationStore, useLegendMarketplaceBaseStore, } from './application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
21
|
+
export * from './components/__test-utils__/LegendMarketplaceStoreTestUtils.js';
|
|
21
22
|
export {} from './stores/LegendMarketplaceBaseStore.js';
|
|
22
23
|
export * from './application/LegendMarketplaceApplicationPlugin.js';
|
|
23
24
|
export { LegendMarketplaceProductViewerStore } from './stores/lakehouse/LegendMarketplaceProductViewerStore.js';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc;AACd,cAAc,oCAAoC,CAAC;AACnD,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAGN,MAAM,wCAAwC,CAAC;AAChD,cAAc,qDAAqD,CAAC;AACpE,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc;AACd,cAAc,oCAAoC,CAAC;AACnD,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,+DAA+D,CAAC;AACvE,cAAc,gEAAgE,CAAC;AAC/E,OAAO,EAGN,MAAM,wCAAwC,CAAC;AAChD,cAAc,qDAAqD,CAAC;AACpE,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC"}
|
package/lib/package.json
CHANGED
package/package.json
CHANGED
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { render, waitFor } from '@testing-library/react';
|
|
18
18
|
import { type AbstractPlugin, type AbstractPreset } from '@finos/legend-shared';
|
|
19
19
|
import { createMock, createSpy } from '@finos/legend-shared/test';
|
|
20
|
-
import { jest } from '@jest/globals';
|
|
21
20
|
import {
|
|
22
21
|
ApplicationStore,
|
|
23
22
|
ApplicationStoreProvider,
|
|
@@ -33,32 +32,8 @@ import { LegendMarketplacePluginManager } from '../../application/LegendMarketpl
|
|
|
33
32
|
import { Core_LegendMarketplaceApplicationPlugin } from '../../application/extensions/Core_LegendMarketplaceApplicationPlugin.js';
|
|
34
33
|
import { TEST__getTestLegendMarketplaceApplicationConfig } from '../../application/__test-utils__/LegendMarketplaceApplicationTestUtils.js';
|
|
35
34
|
import { LegendMarketplaceFrameworkProvider } from '../../application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
36
|
-
import searchResults from './TEST_DATA__SearchResults.json' with { type: 'json' };
|
|
37
35
|
import { LegendMarketplaceWebApplicationRouter } from '../../application/LegendMarketplaceWebApplication.js';
|
|
38
36
|
|
|
39
|
-
jest.mock('@finos/legend-graph', () => {
|
|
40
|
-
const actual: Record<string, unknown> = jest.requireActual(
|
|
41
|
-
'@finos/legend-graph',
|
|
42
|
-
);
|
|
43
|
-
return {
|
|
44
|
-
...actual,
|
|
45
|
-
getCurrentUserIDFromEngineServer: jest.fn(() =>
|
|
46
|
-
Promise.resolve('test-consumer-user-id'),
|
|
47
|
-
),
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
jest.mock('swiper/react', () => ({
|
|
52
|
-
Swiper: ({}) => <div></div>,
|
|
53
|
-
SwiperSlide: ({}) => <div></div>,
|
|
54
|
-
}));
|
|
55
|
-
|
|
56
|
-
jest.mock('swiper/modules', () => ({
|
|
57
|
-
Navigation: ({}) => <div></div>,
|
|
58
|
-
Pagination: ({}) => <div></div>,
|
|
59
|
-
Autoplay: ({}) => <div></div>,
|
|
60
|
-
}));
|
|
61
|
-
|
|
62
37
|
export const TEST__provideMockLegendMarketplaceBaseStore =
|
|
63
38
|
async (customization?: {
|
|
64
39
|
mockBaseStore?: LegendMarketplaceBaseStore;
|
|
@@ -103,37 +78,6 @@ export const TEST__provideMockLegendMarketplaceBaseStore =
|
|
|
103
78
|
return mockBaseStore;
|
|
104
79
|
};
|
|
105
80
|
|
|
106
|
-
export const TEST__setUpMarketplace = async (
|
|
107
|
-
MOCK__store: LegendMarketplaceBaseStore,
|
|
108
|
-
route?: string,
|
|
109
|
-
): Promise<{
|
|
110
|
-
renderResult: RenderResult;
|
|
111
|
-
}> => {
|
|
112
|
-
createSpy(
|
|
113
|
-
MOCK__store.marketplaceServerClient,
|
|
114
|
-
'dataProductSearch',
|
|
115
|
-
).mockResolvedValue({
|
|
116
|
-
dataProducts: searchResults,
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
const renderResult = render(
|
|
120
|
-
<ApplicationStoreProvider store={MOCK__store.applicationStore}>
|
|
121
|
-
<TEST__BrowserEnvironmentProvider initialEntries={[route ?? '/']}>
|
|
122
|
-
<LegendMarketplaceFrameworkProvider>
|
|
123
|
-
<LegendMarketplaceWebApplicationRouter />
|
|
124
|
-
</LegendMarketplaceFrameworkProvider>
|
|
125
|
-
</TEST__BrowserEnvironmentProvider>
|
|
126
|
-
</ApplicationStoreProvider>,
|
|
127
|
-
);
|
|
128
|
-
await waitFor(() =>
|
|
129
|
-
renderResult.getByTestId(LEGEND_MARKETPLACE_TEST_ID.HEADER),
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
return {
|
|
133
|
-
renderResult,
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
|
|
137
81
|
export const TEST__setUpMarketplaceLakehouse = async (
|
|
138
82
|
MOCK__baseStore: LegendMarketplaceBaseStore,
|
|
139
83
|
route?: string,
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export {
|
|
|
22
22
|
useLegendMarketplaceApplicationStore,
|
|
23
23
|
useLegendMarketplaceBaseStore,
|
|
24
24
|
} from './application/providers/LegendMarketplaceFrameworkProvider.js';
|
|
25
|
+
export * from './components/__test-utils__/LegendMarketplaceStoreTestUtils.js';
|
|
25
26
|
export {
|
|
26
27
|
type LegendMarketplaceApplicationStore,
|
|
27
28
|
type LegendMarketplaceBaseStore,
|
package/tsconfig.json
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"./src/utils/LakehouseUtils.tsx",
|
|
143
143
|
"./src/utils/LogUtils.tsx",
|
|
144
144
|
"./src/utils/SearchUtils.tsx",
|
|
145
|
-
"./src/
|
|
145
|
+
"./src/pages/__test-utils__/TEST_DATA__SearchResults.json"
|
|
146
146
|
],
|
|
147
147
|
"include": [
|
|
148
148
|
"src/**/*.ts",
|
|
File without changes
|
|
File without changes
|