@trackunit/react-core-contexts-test 1.7.83 → 1.7.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/index.cjs2.js CHANGED
@@ -13380,7 +13380,7 @@ const mockConfirmationDialogContext = {
13380
13380
  /**
13381
13381
  * Mocks the current user context
13382
13382
  *
13383
- * @returns {IUserPreferencesContext} - Returns the mocked current user context
13383
+ * @returns {CurrentUserPreferenceState} - Returns the mocked current user context
13384
13384
  */
13385
13385
  const mockCurrentUserPreferenceContext = {
13386
13386
  language: "en",
@@ -14177,31 +14177,6 @@ class TrackunitProvidersMockBuilder {
14177
14177
  this.selectedApolloMocks = apolloMocks || [];
14178
14178
  return this;
14179
14179
  }
14180
- /**
14181
- * Validate the mocks that has been supplied to make sure they make sense.
14182
- * Note: This function is overridden in builders extending this one.
14183
- *
14184
- * @returns {boolean} true or throws error if any invalid mocks
14185
- */
14186
- validateSuppliedMocks() {
14187
- return true;
14188
- }
14189
- rootRoute(rootRoute) {
14190
- this.selectedRootRoute = rootRoute;
14191
- return this;
14192
- }
14193
- /**
14194
- * Make sure this represent the same structure as the main index.tsx does.
14195
- *
14196
- * @param testChildren - the child element being tested.
14197
- */
14198
- getMockedCompositionRoot(testChildren) {
14199
- return (jsxRuntime.jsx(reactCoreHooks.ErrorHandlingContextProvider, { value: this.selectedErrorHandler, children: jsxRuntime.jsx(reactCoreHooks.CurrentUserProvider, { value: this.selectedCurrentUserContext, children: jsxRuntime.jsx(reactCoreHooks.AnalyticsContext.Provider, { value: this.selectedAnalyticsContext, children: jsxRuntime.jsx(reactCoreHooks.UserSubscriptionProvider, { value: this.selectedUserSubscriptionContext, children: jsxRuntime.jsx(reactCoreHooks.OemBrandingContextProvider, { value: this.selectedOemBrandingContext, children: jsxRuntime.jsx(reactCoreHooks.TokenProvider, { value: this.selectedTokenContext, children: jsxRuntime.jsx(reactCoreHooks.ToastProvider, { value: this.selectedToastContext, children: jsxRuntime.jsx(reactCoreHooks.ConfirmationDialogProvider, { value: this.selectedConfirmationDialogContext, children: jsxRuntime.jsx(reactCoreHooks.FilterBarProvider, { value: this.selectedFilterBarValues, children: jsxRuntime.jsx(reactCoreHooks.ExportDataContext.Provider, { value: this.selectedExportDataContext, children: jsxRuntime.jsx(reactCoreHooks.AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsxRuntime.jsx(ApolloMockedProviderWithError, { addTypename: false, mocks: this.selectedApolloMocks, children: jsxRuntime.jsx(reactCoreHooks.NavigationContextProvider, { value: this.selectedNavigationContext, children: jsxRuntime.jsx(reactCoreHooks.CurrentUserPreferenceProvider, { value: this.selectedCurrentUserPreferenceContext, children: jsxRuntime.jsx(reactCoreHooks.EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsxRuntime.jsx(reactCoreHooks.ModalDialogContextProvider, { value: this.selectedModalDialogContext, children: jsxRuntime.jsx(reactCoreHooks.TimeRangeProvider, { value: this.selectedTimeRangeContext, children: jsxRuntime.jsx(reactCoreHooks.WidgetConfigProvider, { value: this.selectedWidgetConfigContext, children: testChildren }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
14200
- }
14201
- getMockedCompositionRootWithRouter(testChildren) {
14202
- const childrenWithRouter = (jsxRuntime.jsx(RouterContainer, { addTestRootContainer: true, rootRoute: this.selectedRootRoute, selectedRouterProps: this.selectedRouterProps, children: testChildren }));
14203
- return this.getMockedCompositionRoot(childrenWithRouter);
14204
- }
14205
14180
  /**
14206
14181
  * This will return the mocked composition root.
14207
14182
  */
@@ -14283,10 +14258,38 @@ class TrackunitProvidersMockBuilder {
14283
14258
  }
14284
14259
  /**
14285
14260
  * This will return the children in the correct mocked hierarchy of context providers.
14261
+ *
14262
+ * @param child - The child element being tested.
14263
+ * @returns { ReactNode } - The children in the correct mocked hierarchy of context providers.
14286
14264
  */
14287
14265
  storybook(child) {
14288
14266
  return this.getMockedCompositionRoot(child);
14289
14267
  }
14268
+ /**
14269
+ * Validate the mocks that has been supplied to make sure they make sense.
14270
+ * Note: This function is overridden in builders extending this one.
14271
+ *
14272
+ * @returns {boolean} true or throws error if any invalid mocks
14273
+ */
14274
+ validateSuppliedMocks() {
14275
+ return true;
14276
+ }
14277
+ rootRoute(rootRoute) {
14278
+ this.selectedRootRoute = rootRoute;
14279
+ return this;
14280
+ }
14281
+ /**
14282
+ * Make sure this represent the same structure as the main index.tsx does.
14283
+ *
14284
+ * @param testChildren - the child element being tested.
14285
+ */
14286
+ getMockedCompositionRoot(testChildren) {
14287
+ return (jsxRuntime.jsx(reactCoreHooks.ErrorHandlingContextProvider, { value: this.selectedErrorHandler, children: jsxRuntime.jsx(reactCoreHooks.CurrentUserProvider, { value: this.selectedCurrentUserContext, children: jsxRuntime.jsx(reactCoreHooks.AnalyticsContext.Provider, { value: this.selectedAnalyticsContext, children: jsxRuntime.jsx(reactCoreHooks.UserSubscriptionProvider, { value: this.selectedUserSubscriptionContext, children: jsxRuntime.jsx(reactCoreHooks.OemBrandingContextProvider, { value: this.selectedOemBrandingContext, children: jsxRuntime.jsx(reactCoreHooks.TokenProvider, { value: this.selectedTokenContext, children: jsxRuntime.jsx(reactCoreHooks.ToastProvider, { value: this.selectedToastContext, children: jsxRuntime.jsx(reactCoreHooks.ConfirmationDialogProvider, { value: this.selectedConfirmationDialogContext, children: jsxRuntime.jsx(reactCoreHooks.FilterBarProvider, { value: this.selectedFilterBarValues, children: jsxRuntime.jsx(reactCoreHooks.ExportDataContext.Provider, { value: this.selectedExportDataContext, children: jsxRuntime.jsx(reactCoreHooks.AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsxRuntime.jsx(ApolloMockedProviderWithError, { addTypename: false, mocks: this.selectedApolloMocks, children: jsxRuntime.jsx(reactCoreHooks.NavigationContextProvider, { value: this.selectedNavigationContext, children: jsxRuntime.jsx(reactCoreHooks.CurrentUserPreferenceProvider, { value: this.selectedCurrentUserPreferenceContext, children: jsxRuntime.jsx(reactCoreHooks.EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsxRuntime.jsx(reactCoreHooks.ModalDialogContextProvider, { value: this.selectedModalDialogContext, children: jsxRuntime.jsx(reactCoreHooks.TimeRangeProvider, { value: this.selectedTimeRangeContext, children: jsxRuntime.jsx(reactCoreHooks.WidgetConfigProvider, { value: this.selectedWidgetConfigContext, children: testChildren }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
14288
+ }
14289
+ getMockedCompositionRootWithRouter(testChildren) {
14290
+ const childrenWithRouter = (jsxRuntime.jsx(RouterContainer, { addTestRootContainer: true, rootRoute: this.selectedRootRoute, selectedRouterProps: this.selectedRouterProps, children: testChildren }));
14291
+ return this.getMockedCompositionRoot(childrenWithRouter);
14292
+ }
14290
14293
  }
14291
14294
  /**
14292
14295
  * This is the default mock builder for the TrackunitProviders.
package/index.esm2.js CHANGED
@@ -13358,7 +13358,7 @@ const mockConfirmationDialogContext = {
13358
13358
  /**
13359
13359
  * Mocks the current user context
13360
13360
  *
13361
- * @returns {IUserPreferencesContext} - Returns the mocked current user context
13361
+ * @returns {CurrentUserPreferenceState} - Returns the mocked current user context
13362
13362
  */
13363
13363
  const mockCurrentUserPreferenceContext = {
13364
13364
  language: "en",
@@ -14155,31 +14155,6 @@ class TrackunitProvidersMockBuilder {
14155
14155
  this.selectedApolloMocks = apolloMocks || [];
14156
14156
  return this;
14157
14157
  }
14158
- /**
14159
- * Validate the mocks that has been supplied to make sure they make sense.
14160
- * Note: This function is overridden in builders extending this one.
14161
- *
14162
- * @returns {boolean} true or throws error if any invalid mocks
14163
- */
14164
- validateSuppliedMocks() {
14165
- return true;
14166
- }
14167
- rootRoute(rootRoute) {
14168
- this.selectedRootRoute = rootRoute;
14169
- return this;
14170
- }
14171
- /**
14172
- * Make sure this represent the same structure as the main index.tsx does.
14173
- *
14174
- * @param testChildren - the child element being tested.
14175
- */
14176
- getMockedCompositionRoot(testChildren) {
14177
- return (jsx(ErrorHandlingContextProvider, { value: this.selectedErrorHandler, children: jsx(CurrentUserProvider, { value: this.selectedCurrentUserContext, children: jsx(AnalyticsContext.Provider, { value: this.selectedAnalyticsContext, children: jsx(UserSubscriptionProvider, { value: this.selectedUserSubscriptionContext, children: jsx(OemBrandingContextProvider, { value: this.selectedOemBrandingContext, children: jsx(TokenProvider, { value: this.selectedTokenContext, children: jsx(ToastProvider, { value: this.selectedToastContext, children: jsx(ConfirmationDialogProvider, { value: this.selectedConfirmationDialogContext, children: jsx(FilterBarProvider, { value: this.selectedFilterBarValues, children: jsx(ExportDataContext.Provider, { value: this.selectedExportDataContext, children: jsx(AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsx(ApolloMockedProviderWithError, { addTypename: false, mocks: this.selectedApolloMocks, children: jsx(NavigationContextProvider, { value: this.selectedNavigationContext, children: jsx(CurrentUserPreferenceProvider, { value: this.selectedCurrentUserPreferenceContext, children: jsx(EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsx(ModalDialogContextProvider, { value: this.selectedModalDialogContext, children: jsx(TimeRangeProvider, { value: this.selectedTimeRangeContext, children: jsx(WidgetConfigProvider, { value: this.selectedWidgetConfigContext, children: testChildren }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
14178
- }
14179
- getMockedCompositionRootWithRouter(testChildren) {
14180
- const childrenWithRouter = (jsx(RouterContainer, { addTestRootContainer: true, rootRoute: this.selectedRootRoute, selectedRouterProps: this.selectedRouterProps, children: testChildren }));
14181
- return this.getMockedCompositionRoot(childrenWithRouter);
14182
- }
14183
14158
  /**
14184
14159
  * This will return the mocked composition root.
14185
14160
  */
@@ -14261,10 +14236,38 @@ class TrackunitProvidersMockBuilder {
14261
14236
  }
14262
14237
  /**
14263
14238
  * This will return the children in the correct mocked hierarchy of context providers.
14239
+ *
14240
+ * @param child - The child element being tested.
14241
+ * @returns { ReactNode } - The children in the correct mocked hierarchy of context providers.
14264
14242
  */
14265
14243
  storybook(child) {
14266
14244
  return this.getMockedCompositionRoot(child);
14267
14245
  }
14246
+ /**
14247
+ * Validate the mocks that has been supplied to make sure they make sense.
14248
+ * Note: This function is overridden in builders extending this one.
14249
+ *
14250
+ * @returns {boolean} true or throws error if any invalid mocks
14251
+ */
14252
+ validateSuppliedMocks() {
14253
+ return true;
14254
+ }
14255
+ rootRoute(rootRoute) {
14256
+ this.selectedRootRoute = rootRoute;
14257
+ return this;
14258
+ }
14259
+ /**
14260
+ * Make sure this represent the same structure as the main index.tsx does.
14261
+ *
14262
+ * @param testChildren - the child element being tested.
14263
+ */
14264
+ getMockedCompositionRoot(testChildren) {
14265
+ return (jsx(ErrorHandlingContextProvider, { value: this.selectedErrorHandler, children: jsx(CurrentUserProvider, { value: this.selectedCurrentUserContext, children: jsx(AnalyticsContext.Provider, { value: this.selectedAnalyticsContext, children: jsx(UserSubscriptionProvider, { value: this.selectedUserSubscriptionContext, children: jsx(OemBrandingContextProvider, { value: this.selectedOemBrandingContext, children: jsx(TokenProvider, { value: this.selectedTokenContext, children: jsx(ToastProvider, { value: this.selectedToastContext, children: jsx(ConfirmationDialogProvider, { value: this.selectedConfirmationDialogContext, children: jsx(FilterBarProvider, { value: this.selectedFilterBarValues, children: jsx(ExportDataContext.Provider, { value: this.selectedExportDataContext, children: jsx(AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsx(ApolloMockedProviderWithError, { addTypename: false, mocks: this.selectedApolloMocks, children: jsx(NavigationContextProvider, { value: this.selectedNavigationContext, children: jsx(CurrentUserPreferenceProvider, { value: this.selectedCurrentUserPreferenceContext, children: jsx(EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsx(ModalDialogContextProvider, { value: this.selectedModalDialogContext, children: jsx(TimeRangeProvider, { value: this.selectedTimeRangeContext, children: jsx(WidgetConfigProvider, { value: this.selectedWidgetConfigContext, children: testChildren }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
14266
+ }
14267
+ getMockedCompositionRootWithRouter(testChildren) {
14268
+ const childrenWithRouter = (jsx(RouterContainer, { addTestRootContainer: true, rootRoute: this.selectedRootRoute, selectedRouterProps: this.selectedRouterProps, children: testChildren }));
14269
+ return this.getMockedCompositionRoot(childrenWithRouter);
14270
+ }
14268
14271
  }
14269
14272
  /**
14270
14273
  * This is the default mock builder for the TrackunitProviders.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-test",
3
- "version": "1.7.83",
3
+ "version": "1.7.85",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -10,12 +10,12 @@
10
10
  "@apollo/client": "3.13.8",
11
11
  "react": "19.0.0",
12
12
  "graphql": "^16.10.0",
13
- "@trackunit/react-core-hooks": "1.7.83",
13
+ "@trackunit/react-core-hooks": "1.7.85",
14
14
  "@trackunit/shared-utils": "1.9.73",
15
15
  "@tanstack/react-router": "1.114.29",
16
16
  "@tanstack/router-core": "1.114.29",
17
17
  "es-toolkit": "^1.39.10",
18
- "@trackunit/iris-app-runtime-core-api": "1.7.79"
18
+ "@trackunit/iris-app-runtime-core-api": "1.7.81"
19
19
  },
20
20
  "module": "./index.esm.js",
21
21
  "main": "./index.cjs.js",
@@ -1,7 +1,7 @@
1
1
  import { MockedResponse } from "@apollo/client/testing";
2
2
  import { AnyRoute } from "@tanstack/react-router";
3
3
  import { RenderResult } from "@testing-library/react";
4
- import { AssetSortingContextValue, ConfirmationDialogContextValue, CurrentUserContextInterface, ErrorHandlingContextValue, FilterBarContext, IAnalyticsContext, IEnvironmentContext, INavigationContext, IToastContext, ITokenContext, IUserPreferencesContext, IUserSubscriptionContext, ModalDialogContextValue, OemBrandingContext, TimeRangeContext, WidgetConfigContext } from "@trackunit/iris-app-runtime-core-api";
4
+ import { AnalyticsRuntimeApiSync, AssetSortingState, ConfirmationDialogRuntimeApi, CurrentUserContextInterface, CurrentUserPreferenceState, EnvironmentState, ErrorHandlingContextValue, FilterBarContext, IToastContext, ITokenContext, IUserSubscriptionContext, ModalDialogRuntimeApi, NavigationRuntimeApi, OemBrandingRuntimeApi, TimeRangeContext, WidgetConfigContext } from "@trackunit/iris-app-runtime-core-api";
5
5
  import { ExportDataContextState } from "@trackunit/react-core-hooks";
6
6
  import { ReactElement, ReactNode } from "react";
7
7
  import { MemoryRouterProps } from "./utils/routingUtils";
@@ -15,23 +15,23 @@ import { MemoryRouterProps } from "./utils/routingUtils";
15
15
  * - storybook
16
16
  */
17
17
  export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
18
- protected selectedEnvironmentContext: IEnvironmentContext;
19
- protected selectedModalDialogContext: ModalDialogContextValue;
18
+ protected selectedEnvironmentContext: EnvironmentState;
19
+ protected selectedModalDialogContext: ModalDialogRuntimeApi;
20
20
  protected selectedTimeRangeContext: TimeRangeContext;
21
21
  protected selectedWidgetConfigContext: WidgetConfigContext;
22
- protected selectedNavigationContext: INavigationContext;
22
+ protected selectedNavigationContext: NavigationRuntimeApi;
23
23
  protected selectedTokenContext: ITokenContext;
24
24
  protected selectedApolloMocks: Array<MockedResponse>;
25
25
  protected selectedRouterProps: MemoryRouterProps<T> | null;
26
26
  protected selectedRootRoute: AnyRoute | null;
27
27
  protected selectedToastContext: IToastContext;
28
28
  protected selectedErrorHandler: ErrorHandlingContextValue;
29
- protected selectedConfirmationDialogContext: ConfirmationDialogContextValue;
30
- protected selectedAssetSortingContext: AssetSortingContextValue;
29
+ protected selectedConfirmationDialogContext: ConfirmationDialogRuntimeApi;
30
+ protected selectedAssetSortingContext: AssetSortingState;
31
31
  protected selectedCurrentUserContext: CurrentUserContextInterface;
32
- protected selectedCurrentUserPreferenceContext: IUserPreferencesContext;
33
- protected selectedAnalyticsContext: IAnalyticsContext<Record<string, never>>;
34
- protected selectedOemBrandingContext: OemBrandingContext;
32
+ protected selectedCurrentUserPreferenceContext: CurrentUserPreferenceState;
33
+ protected selectedAnalyticsContext: AnalyticsRuntimeApiSync<Record<string, never>>;
34
+ protected selectedOemBrandingContext: OemBrandingRuntimeApi;
35
35
  protected selectedUserSubscriptionContext: IUserSubscriptionContext;
36
36
  protected selectedFilterBarValues: FilterBarContext;
37
37
  protected selectedExportDataContext: ExportDataContextState;
@@ -59,7 +59,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
59
59
  * @param analyticsContext - The analytics context to use.
60
60
  * @returns { TrackunitProvidersMockBuilder } - The builder.
61
61
  */
62
- analytics(analyticsContext: Partial<IAnalyticsContext<any>>): this;
62
+ analytics(analyticsContext: Partial<AnalyticsRuntimeApiSync<any>>): this;
63
63
  /**
64
64
  * Use this Environment Context.
65
65
  * Defaults to mockEnvironmentContext.
@@ -84,7 +84,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
84
84
  * @param environmentContext - The environment context to use.
85
85
  * @returns { TrackunitProvidersMockBuilder } - The builder.
86
86
  */
87
- environment(environmentContext: Partial<IEnvironmentContext>): this;
87
+ environment(environmentContext: Partial<EnvironmentState>): this;
88
88
  /**
89
89
  * Use this Time Range Context, used for myhome.
90
90
  * Defaults to mockTimeRangeContext.
@@ -111,7 +111,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
111
111
  * expect(screen.getByTestId("yourTestId")).toBeInTheDocument();
112
112
  * });
113
113
  */
114
- navigation(navigationContext: Partial<INavigationContext>): this;
114
+ navigation(navigationContext: Partial<NavigationRuntimeApi>): this;
115
115
  /**
116
116
  * Use this to pass in a differerent current user.
117
117
  * Defaults to mockCurrentUserContext.
@@ -159,7 +159,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
159
159
  * ...
160
160
  * @returns { TrackunitProvidersMockBuilder } - The builder.
161
161
  */
162
- currentUserPreference(currentUserPreferenceContext: Partial<IUserPreferencesContext>): this;
162
+ currentUserPreference(currentUserPreferenceContext: Partial<CurrentUserPreferenceState>): this;
163
163
  /**
164
164
  * Use this to pass in a differerent filter bar values when working with pages with filterbar.
165
165
  * Defaults to { filterBarValues: {} }.
@@ -232,7 +232,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
232
232
  * @param assetSortingContext - Override the default context.
233
233
  * @returns { TrackunitProvidersMockBuilder } - The builder.
234
234
  */
235
- assetSorting(assetSortingContext: Partial<AssetSortingContextValue>): this;
235
+ assetSorting(assetSortingContext: Partial<AssetSortingState>): this;
236
236
  /**
237
237
  * Use this to pass in a differerent export data context.
238
238
  * Defaults to mockExportDataContextState.
@@ -272,7 +272,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
272
272
  * ...
273
273
  * @param oemBrandingContext - Override the default context.
274
274
  */
275
- oemBrandingContext(oemBrandingContext: Partial<OemBrandingContext>): this;
275
+ oemBrandingContext(oemBrandingContext: Partial<OemBrandingRuntimeApi>): this;
276
276
  /**
277
277
  * Use this ToastContext with the given mocks.
278
278
  * Defaults to mockToastContext.
@@ -300,11 +300,11 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
300
300
  /**
301
301
  * confirmationDialog
302
302
  */
303
- confirmationDialog(confirmationDialog: Partial<ConfirmationDialogContextValue>): this;
303
+ confirmationDialog(confirmationDialog: Partial<ConfirmationDialogRuntimeApi>): this;
304
304
  /**
305
305
  * modalDialog
306
306
  */
307
- modalDialog(modalDialog: Partial<ModalDialogContextValue>): this;
307
+ modalDialog(modalDialog: Partial<ModalDialogRuntimeApi>): this;
308
308
  /**
309
309
  * errorHandler
310
310
  */
@@ -378,21 +378,6 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
378
378
  * @param apolloMocks - The mocks to use for the ApolloProvider.
379
379
  */
380
380
  apollo(apolloMocks?: Array<MockedResponse>): this;
381
- /**
382
- * Validate the mocks that has been supplied to make sure they make sense.
383
- * Note: This function is overridden in builders extending this one.
384
- *
385
- * @returns {boolean} true or throws error if any invalid mocks
386
- */
387
- protected validateSuppliedMocks(): true | never;
388
- protected rootRoute(rootRoute: AnyRoute | null): this;
389
- /**
390
- * Make sure this represent the same structure as the main index.tsx does.
391
- *
392
- * @param testChildren - the child element being tested.
393
- */
394
- protected getMockedCompositionRoot(testChildren: ReactNode): import("react/jsx-runtime").JSX.Element;
395
- protected getMockedCompositionRootWithRouter(testChildren: ReactNode): import("react/jsx-runtime").JSX.Element;
396
381
  /**
397
382
  * This will return the mocked composition root.
398
383
  */
@@ -438,8 +423,26 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
438
423
  verifyHookStability<TProps, TResult>(callback: (props: TProps) => TResult, parentElement?: (children: ReactNode) => ReactElement): Promise<boolean>;
439
424
  /**
440
425
  * This will return the children in the correct mocked hierarchy of context providers.
426
+ *
427
+ * @param child - The child element being tested.
428
+ * @returns { ReactNode } - The children in the correct mocked hierarchy of context providers.
441
429
  */
442
430
  storybook(child: ReactNode): import("react/jsx-runtime").JSX.Element;
431
+ /**
432
+ * Validate the mocks that has been supplied to make sure they make sense.
433
+ * Note: This function is overridden in builders extending this one.
434
+ *
435
+ * @returns {boolean} true or throws error if any invalid mocks
436
+ */
437
+ protected validateSuppliedMocks(): true | never;
438
+ protected rootRoute(rootRoute: AnyRoute | null): this;
439
+ /**
440
+ * Make sure this represent the same structure as the main index.tsx does.
441
+ *
442
+ * @param testChildren - the child element being tested.
443
+ */
444
+ protected getMockedCompositionRoot(testChildren: ReactNode): import("react/jsx-runtime").JSX.Element;
445
+ protected getMockedCompositionRootWithRouter(testChildren: ReactNode): import("react/jsx-runtime").JSX.Element;
443
446
  }
444
447
  /**
445
448
  * This is the default mock builder for the TrackunitProviders.
@@ -1,2 +1,2 @@
1
- import { IAnalyticsContext } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const mockAnalyticsContext: IAnalyticsContext<Record<string, never>>;
1
+ import { AnalyticsRuntimeApiSync } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const mockAnalyticsContext: AnalyticsRuntimeApiSync<Record<string, never>>;
@@ -1,2 +1,2 @@
1
- import { AssetSortingContextValue } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const mockAssetSortingContext: AssetSortingContextValue;
1
+ import { AssetSortingState } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const mockAssetSortingContext: AssetSortingState;
@@ -1,2 +1,2 @@
1
- import { ConfirmationDialogContextValue } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const mockConfirmationDialogContext: ConfirmationDialogContextValue;
1
+ import { ConfirmationDialogRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const mockConfirmationDialogContext: ConfirmationDialogRuntimeApi;
@@ -1,7 +1,7 @@
1
- import { IUserPreferencesContext } from "@trackunit/iris-app-runtime-core-api";
1
+ import { CurrentUserPreferenceState } from "@trackunit/iris-app-runtime-core-api";
2
2
  /**
3
3
  * Mocks the current user context
4
4
  *
5
- * @returns {IUserPreferencesContext} - Returns the mocked current user context
5
+ * @returns {CurrentUserPreferenceState} - Returns the mocked current user context
6
6
  */
7
- export declare const mockCurrentUserPreferenceContext: IUserPreferencesContext;
7
+ export declare const mockCurrentUserPreferenceContext: CurrentUserPreferenceState;
@@ -1,2 +1,2 @@
1
- import { IEnvironmentContext } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const mockEnvironmentContext: IEnvironmentContext;
1
+ import { EnvironmentState } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const mockEnvironmentContext: EnvironmentState;
@@ -1,2 +1,2 @@
1
- import { ModalDialogContextValue } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const mockModalDialogContext: ModalDialogContextValue;
1
+ import { ModalDialogRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const mockModalDialogContext: ModalDialogRuntimeApi;
@@ -1,2 +1,2 @@
1
- import { INavigationContext } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const mockNavigationContext: INavigationContext;
1
+ import { NavigationRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const mockNavigationContext: NavigationRuntimeApi;
@@ -1,2 +1,2 @@
1
- import { OemBrandingContext } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const mockOemBrandingContext: OemBrandingContext;
1
+ import { OemBrandingRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const mockOemBrandingContext: OemBrandingRuntimeApi;