@trackunit/react-core-contexts-test 0.1.170 → 0.1.172
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 +4 -3
- package/index.esm2.js +4 -3
- package/package.json +1 -1
package/index.cjs2.js
CHANGED
|
@@ -88,7 +88,7 @@ function ApolloMockedProviderWithError(props) {
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
const link = client.ApolloLink.from([errorLoggingLink, mockLink]);
|
|
91
|
-
return (jsxRuntime.jsx(testing.MockedProvider, Object.assign({}, otherProps, {
|
|
91
|
+
return (jsxRuntime.jsx(testing.MockedProvider, Object.assign({}, otherProps, { defaultOptions: Object.assign(Object.assign({}, defaultOptions), { watchQuery: { fetchPolicy: "no-cache" } }), link: link })));
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/**
|
|
@@ -186,6 +186,7 @@ const mockEnvironmentContext = {
|
|
|
186
186
|
},
|
|
187
187
|
trackunitRestApiUrl: "",
|
|
188
188
|
hubspotRequestAppAccessFormId: "",
|
|
189
|
+
uptimeId: "",
|
|
189
190
|
};
|
|
190
191
|
|
|
191
192
|
const mockNavigationContext = {
|
|
@@ -666,10 +667,10 @@ class TrackunitProvidersMockBuilder {
|
|
|
666
667
|
* @param addTestRootContainer - if you want to add a root container to the test.
|
|
667
668
|
*/
|
|
668
669
|
getMockedCompositionRoot(testChildren, addTestRootContainer = true, forceDebugging = false) {
|
|
669
|
-
return (jsxRuntime.jsx(reactCoreHooks.EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsxRuntime.jsx(reactRouterDom.MemoryRouter, Object.assign({}, this.selectedRouterProps, { 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: { filterBarValues: this.selectedFilterBarValues }, children: jsxRuntime.jsx(reactCoreHooks.AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsxRuntime.jsx(ApolloMockedProviderWithError, {
|
|
670
|
+
return (jsxRuntime.jsx(reactCoreHooks.EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsxRuntime.jsx(reactRouterDom.MemoryRouter, Object.assign({}, this.selectedRouterProps, { 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: { filterBarValues: this.selectedFilterBarValues }, children: jsxRuntime.jsx(reactCoreHooks.AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsxRuntime.jsx(ApolloMockedProviderWithError, { addTypename: false, forceDebugging: forceDebugging, mocks: this.selectedApolloMocks, children: jsxRuntime.jsx(reactCoreHooks.NavigationContextProvider, { value: this.selectedNavigationContext, children: jsxRuntime.jsx(reactCoreHooks.CurrentUserPreferenceProvider, { value: this.selectedCurrentUserPreferenceContext, children: addTestRootContainer ? (jsxRuntime.jsx("div", { className: "inline-block h-[1000px] w-[1024px]", "data-testid": "testRoot", style: {
|
|
670
671
|
"--tw-scale-x": "0.99",
|
|
671
672
|
"--tw-scale-y": "0.99",
|
|
672
|
-
},
|
|
673
|
+
}, children: testChildren })) : (jsxRuntime.jsx("div", { children: testChildren })) }) }) }) }) }) }) }) }) }) }) }) }) })) }));
|
|
673
674
|
}
|
|
674
675
|
/**
|
|
675
676
|
* This will return the mocked composition root.
|
package/index.esm2.js
CHANGED
|
@@ -81,7 +81,7 @@ function ApolloMockedProviderWithError(props) {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
const link = ApolloLink.from([errorLoggingLink, mockLink]);
|
|
84
|
-
return (jsx(MockedProvider, Object.assign({}, otherProps, {
|
|
84
|
+
return (jsx(MockedProvider, Object.assign({}, otherProps, { defaultOptions: Object.assign(Object.assign({}, defaultOptions), { watchQuery: { fetchPolicy: "no-cache" } }), link: link })));
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
@@ -179,6 +179,7 @@ const mockEnvironmentContext = {
|
|
|
179
179
|
},
|
|
180
180
|
trackunitRestApiUrl: "",
|
|
181
181
|
hubspotRequestAppAccessFormId: "",
|
|
182
|
+
uptimeId: "",
|
|
182
183
|
};
|
|
183
184
|
|
|
184
185
|
const mockNavigationContext = {
|
|
@@ -659,10 +660,10 @@ class TrackunitProvidersMockBuilder {
|
|
|
659
660
|
* @param addTestRootContainer - if you want to add a root container to the test.
|
|
660
661
|
*/
|
|
661
662
|
getMockedCompositionRoot(testChildren, addTestRootContainer = true, forceDebugging = false) {
|
|
662
|
-
return (jsx(EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsx(MemoryRouter, Object.assign({}, this.selectedRouterProps, { 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: { filterBarValues: this.selectedFilterBarValues }, children: jsx(AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsx(ApolloMockedProviderWithError, {
|
|
663
|
+
return (jsx(EnvironmentContextProvider, { value: this.selectedEnvironmentContext, children: jsx(MemoryRouter, Object.assign({}, this.selectedRouterProps, { 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: { filterBarValues: this.selectedFilterBarValues }, children: jsx(AssetSortingProvider, { value: this.selectedAssetSortingContext, children: jsx(ApolloMockedProviderWithError, { addTypename: false, forceDebugging: forceDebugging, mocks: this.selectedApolloMocks, children: jsx(NavigationContextProvider, { value: this.selectedNavigationContext, children: jsx(CurrentUserPreferenceProvider, { value: this.selectedCurrentUserPreferenceContext, children: addTestRootContainer ? (jsx("div", { className: "inline-block h-[1000px] w-[1024px]", "data-testid": "testRoot", style: {
|
|
663
664
|
"--tw-scale-x": "0.99",
|
|
664
665
|
"--tw-scale-y": "0.99",
|
|
665
|
-
},
|
|
666
|
+
}, children: testChildren })) : (jsx("div", { children: testChildren })) }) }) }) }) }) }) }) }) }) }) }) }) })) }));
|
|
666
667
|
}
|
|
667
668
|
/**
|
|
668
669
|
* This will return the mocked composition root.
|