@c15t/react 2.0.0-rc.2 → 2.0.0-rc.4
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/client/components/consent-banner.js +4 -0
- package/client/components/consent-dialog-link.js +3 -0
- package/client/components/consent-dialog-trigger.js +3 -0
- package/client/components/consent-dialog.js +4 -0
- package/client/components/consent-widget.js +4 -0
- package/client/components/frame.js +3 -0
- package/client/components/iab-consent-banner.js +4 -0
- package/client/components/iab-consent-dialog.js +4 -0
- package/dist/components/consent-dialog-link/index.cjs +1 -0
- package/dist/components/consent-dialog-link/index.d.ts +2 -0
- package/dist/components/consent-dialog-link/index.d.ts.map +1 -0
- package/dist/components/consent-dialog-link/index.js +1 -0
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.d.ts.map +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.d.ts +16 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.d.ts.map +1 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.js +1 -0
- package/dist/components/consent-preferences-link/index.cjs +1 -0
- package/dist/components/consent-preferences-link/index.d.ts +2 -0
- package/dist/components/consent-preferences-link/index.d.ts.map +1 -0
- package/dist/components/consent-preferences-link/index.js +1 -0
- package/dist/components/iab-consent-dialog/iab-consent-dialog.d.ts +1 -1
- package/dist/components/shared/primitives/button.cjs +1 -1
- package/dist/components/shared/primitives/button.d.ts.map +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/use-consent-manager.cjs +1 -1
- package/dist/hooks/use-consent-manager.d.ts.map +1 -1
- package/dist/hooks/use-consent-manager.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/theme-utils.d.ts +1 -1
- package/dist/utils/theme-utils.d.ts.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +49 -6
- package/dist/components/__tests__/active-ui-transitions.e2e.test.cjs +0 -1
- package/dist/components/__tests__/active-ui-transitions.e2e.test.js +0 -1
- package/dist/components/__tests__/consent-flow.e2e.test.cjs +0 -1
- package/dist/components/__tests__/consent-flow.e2e.test.js +0 -1
- package/dist/components/__tests__/models-prop.e2e.test.cjs +0 -1
- package/dist/components/__tests__/models-prop.e2e.test.js +0 -1
- package/dist/components/__tests__/ui-source-tracking.e2e.test.cjs +0 -1
- package/dist/components/__tests__/ui-source-tracking.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/e2e-setup.cjs +0 -1
- package/dist/components/iab/__tests__/e2e-setup.js +0 -1
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.cjs +0 -1
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts +0 -212
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts.map +0 -1
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.js +0 -1
- package/dist/components/iab/__tests__/iab-banner.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-banner.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-events.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-events.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-gvl.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-gvl.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-preference-center.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-preference-center.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-storage.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-storage.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-stub.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-stub.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/msw-handlers.cjs +0 -1
- package/dist/components/iab/__tests__/msw-handlers.js +0 -1
- package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.cjs +0 -1
- package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.js +0 -1
- package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.js +0 -1
- package/dist/components/iab-consent-dialog/__tests__/preference-center.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/preference-center.test.js +0 -1
- package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.js +0 -1
- package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.js +0 -1
- package/dist/components/shared/ui/__tests__/primitives.test.cjs +0 -1
- package/dist/components/shared/ui/__tests__/primitives.test.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.js +0 -1
- package/dist/hooks/__tests__/use-color-scheme.test.cjs +0 -1
- package/dist/hooks/__tests__/use-color-scheme.test.js +0 -1
- package/dist/hooks/__tests__/use-consent-manager.test.cjs +0 -1
- package/dist/hooks/__tests__/use-consent-manager.test.js +0 -1
- package/dist/hooks/__tests__/use-focus-trap.test.cjs +0 -1
- package/dist/hooks/__tests__/use-focus-trap.test.js +0 -1
- package/dist/hooks/__tests__/use-scroll-lock.test.cjs +0 -1
- package/dist/hooks/__tests__/use-scroll-lock.test.js +0 -1
- package/dist/hooks/__tests__/use-styles.test.cjs +0 -1
- package/dist/hooks/__tests__/use-styles.test.js +0 -1
- package/dist/hooks/__tests__/use-theme.test.cjs +0 -1
- package/dist/hooks/__tests__/use-theme.test.js +0 -1
- package/dist/hooks/__tests__/use-translations.test.cjs +0 -1
- package/dist/hooks/__tests__/use-translations.test.js +0 -1
- package/dist/mockServiceWorker.js +0 -349
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.js +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.js +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.js +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.js +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.js +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.js +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.js +0 -1
- package/dist/providers/__tests__/provider-basic.test.cjs +0 -1
- package/dist/providers/__tests__/provider-basic.test.js +0 -1
- package/dist/providers/__tests__/provider-context.test.cjs +0 -1
- package/dist/providers/__tests__/provider-context.test.js +0 -1
- package/dist/providers/__tests__/provider-errors.test.cjs +0 -1
- package/dist/providers/__tests__/provider-errors.test.js +0 -1
- package/dist/providers/__tests__/provider-hydration.test.cjs +0 -1
- package/dist/providers/__tests__/provider-hydration.test.js +0 -1
- package/dist/providers/__tests__/test-helpers.cjs +0 -1
- package/dist/providers/__tests__/test-helpers.js +0 -1
- package/dist/server/headers.test.cjs +0 -1
- package/dist/server/headers.test.d.ts +0 -2
- package/dist/server/headers.test.d.ts.map +0 -1
- package/dist/server/headers.test.js +0 -1
- package/dist/server/normalize-url.test.cjs +0 -1
- package/dist/server/normalize-url.test.d.ts +0 -2
- package/dist/server/normalize-url.test.d.ts.map +0 -1
- package/dist/server/normalize-url.test.js +0 -1
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.png +0 -0
- package/dist/static/image/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png +0 -0
- package/dist/static/image/useColorScheme-handles-default-theme-based-on-document-class-1.png +0 -0
- package/dist/static/image/useColorScheme-responds-to-system-preference-1.png +0 -0
- package/dist/static/image/useColorScheme-sets-dark-theme-correctly-1.png +0 -0
- package/dist/static/image/useColorScheme-updates-theme-when-default-theme-changes-1.png +0 -0
- package/dist/static/image/useColorScheme-updates-theme-when-system-preference-changes-1.png +0 -0
- package/dist/static/image/useConsentManager-provides-manager-object-when-configured-1.png +0 -0
- package/dist/static/image/useStyles-handles-string-className-correctly-1.png +0 -0
- package/dist/static/image/useStyles-merges-theme-and-component-styles-correctly-1.png +0 -0
- package/dist/static/image/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png +0 -0
- package/dist/static/image/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png +0 -0
- package/dist/static/image/useTheme-local-theme-takes-precedence-over-global-theme-1.png +0 -0
- package/dist/static/image/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.png +0 -0
- package/dist/static/image/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.png +0 -0
- package/dist/static/image/useTranslations-merges-custom-translations-with-defaults-1.png +0 -0
- package/dist/static/image/useTranslations-returns-English-translations-by-default-1.png +0 -0
- package/dist/test-setup.browser.cjs +0 -1
- package/dist/test-setup.browser.d.ts +0 -8
- package/dist/test-setup.browser.d.ts.map +0 -1
- package/dist/test-setup.browser.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),index_cjs_namespaceObject=require("../../iab-consent-banner/index.cjs"),external_iab_consent_dialog_index_cjs_namespaceObject=require("../../iab-consent-dialog/index.cjs"),consent_manager_provider_cjs_namespaceObject=require("../../../providers/consent-manager-provider.cjs"),external_e2e_setup_cjs_namespaceObject=require("./e2e-setup.cjs");for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("IAB Stub E2E Tests",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{(0,external_e2e_setup_cjs_namespaceObject.clearConsentState)(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)()}),(0,external_vitest_namespaceObject.describe)("__tcfapi Availability",()=>{(0,external_vitest_namespaceObject.test)("__tcfapi should be available after CMP loads",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)(),(0,external_vitest_namespaceObject.expect)(window.__tcfapi).toBeDefined(),(0,external_vitest_namespaceObject.expect)(typeof window.__tcfapi).toBe("function")}),(0,external_vitest_namespaceObject.test)("__tcfapi should accept standard parameters",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=window.__tcfapi;(0,external_vitest_namespaceObject.expect)(e).toBeDefined(),await new Promise(t=>{e?.("ping",2,()=>{t()})})}),(0,external_vitest_namespaceObject.test)("__tcfapi should accept optional parameter",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=window.__tcfapi,t=await new Promise(t=>{e?.("removeEventListener",2,e=>{t(e)},12345)});(0,external_vitest_namespaceObject.expect)(t).toBe(!1)})}),(0,external_vitest_namespaceObject.describe)("Stub Ping Behavior",()=>{(0,external_vitest_namespaceObject.test)("ping should return cmpLoaded=true after CMP ready",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("ping",2,t=>{e(t)})});(0,external_vitest_namespaceObject.expect)(e.cmpLoaded).toBe(!0)}),(0,external_vitest_namespaceObject.test)('ping should return cmpStatus="loaded" after CMP ready',async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("ping",2,t=>{e(t)})});(0,external_vitest_namespaceObject.expect)(e.cmpStatus).toBe("loaded")})}),(0,external_vitest_namespaceObject.describe)("Queue Processing",()=>{(0,external_vitest_namespaceObject.test)("calls should be processed after CMP loads",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("getTCData",2,t=>{e(t)})});(0,external_vitest_namespaceObject.expect)(e).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("tcString")})}),(0,external_vitest_namespaceObject.describe)("Command Handling",()=>{(0,external_vitest_namespaceObject.test)("should handle ping command",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("ping",2,t=>{e(t)})});(0,external_vitest_namespaceObject.expect)(e.apiVersion).toBe("2.3")}),(0,external_vitest_namespaceObject.test)("should handle getTCData command",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("getTCData",2,t=>{e(t)})});(0,external_vitest_namespaceObject.expect)(e).toBeDefined(),(0,external_vitest_namespaceObject.expect)(typeof e.gdprApplies).toBe("boolean")}),(0,external_vitest_namespaceObject.test)("should handle addEventListener command",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("addEventListener",2,t=>{e(t)})});(0,external_vitest_namespaceObject.expect)(e.listenerId).toBeDefined(),(0,external_vitest_namespaceObject.expect)(typeof e.listenerId).toBe("number")}),(0,external_vitest_namespaceObject.test)("should handle getVendorList command",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("getVendorList",2,t=>{e(t)})});(0,external_vitest_namespaceObject.expect)(e.purposes).toBeDefined()}),(0,external_vitest_namespaceObject.test)("should return false for unknown commands",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await new Promise(e=>{window.__tcfapi?.("unknownCommand",2,(t,a)=>{e({data:t,success:a})})});(0,external_vitest_namespaceObject.expect)(e.success).toBe(!1)})})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as a,jsxs as t}from"react/jsx-runtime";import{beforeEach as e,describe as n,expect as i,test as o,vi as d}from"vitest";import{render as s}from"vitest-browser-react";import{IABConsentBanner as r}from"../../iab-consent-banner/index.js";import{IABConsentDialog as c}from"../../iab-consent-dialog/index.js";import{ConsentManagerProvider as w,clearConsentRuntimeCache as p}from"../../../providers/consent-manager-provider.js";import{clearConsentState as l,defaultIABOptions as m,waitForCMP as f,waitForElement as b}from"./e2e-setup.js";n("IAB Stub E2E Tests",()=>{e(()=>{l(),d.clearAllMocks(),p()}),n("__tcfapi Availability",()=>{o("__tcfapi should be available after CMP loads",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f(),i(window.__tcfapi).toBeDefined(),i(typeof window.__tcfapi).toBe("function")}),o("__tcfapi should accept standard parameters",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f();let e=window.__tcfapi;i(e).toBeDefined(),await new Promise(a=>{e?.("ping",2,()=>{a()})})}),o("__tcfapi should accept optional parameter",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f();let e=window.__tcfapi;i(await new Promise(a=>{e?.("removeEventListener",2,t=>{a(t)},12345)})).toBe(!1)})}),n("Stub Ping Behavior",()=>{o("ping should return cmpLoaded=true after CMP ready",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f(),i((await new Promise(a=>{window.__tcfapi?.("ping",2,t=>{a(t)})})).cmpLoaded).toBe(!0)}),o('ping should return cmpStatus="loaded" after CMP ready',async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f(),i((await new Promise(a=>{window.__tcfapi?.("ping",2,t=>{a(t)})})).cmpStatus).toBe("loaded")})}),n("Queue Processing",()=>{o("calls should be processed after CMP loads",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f();let e=await new Promise(a=>{window.__tcfapi?.("getTCData",2,t=>{a(t)})});i(e).toBeDefined(),i(e).toHaveProperty("tcString")})}),n("Command Handling",()=>{o("should handle ping command",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f(),i((await new Promise(a=>{window.__tcfapi?.("ping",2,t=>{a(t)})})).apiVersion).toBe("2.3")}),o("should handle getTCData command",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f();let e=await new Promise(a=>{window.__tcfapi?.("getTCData",2,t=>{a(t)})});i(e).toBeDefined(),i(typeof e.gdprApplies).toBe("boolean")}),o("should handle addEventListener command",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f();let e=await new Promise(a=>{window.__tcfapi?.("addEventListener",2,t=>{a(t)})});i(e.listenerId).toBeDefined(),i(typeof e.listenerId).toBe("number")}),o("should handle getVendorList command",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f(),i((await new Promise(a=>{window.__tcfapi?.("getVendorList",2,t=>{a(t)})})).purposes).toBeDefined()}),o("should return false for unknown commands",async()=>{s(t(w,{options:m,children:[a(r,{}),a(c,{})]})),await b('[data-testid="iab-consent-banner-card"]'),await f(),i((await new Promise(a=>{window.__tcfapi?.("unknownCommand",2,(t,e)=>{a({data:t,success:e})})})).success).toBe(!1)})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),index_cjs_namespaceObject=require("../../iab-consent-banner/index.cjs"),external_iab_consent_dialog_index_cjs_namespaceObject=require("../../iab-consent-dialog/index.cjs"),consent_manager_provider_cjs_namespaceObject=require("../../../providers/consent-manager-provider.cjs"),external_e2e_setup_cjs_namespaceObject=require("./e2e-setup.cjs");for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("__tcfapi E2E Tests",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{(0,external_e2e_setup_cjs_namespaceObject.clearConsentState)(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)()}),(0,external_vitest_namespaceObject.describe)("ping Command",()=>{(0,external_vitest_namespaceObject.test)("should return cmpLoaded=true after CMP ready",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPPingData)();(0,external_vitest_namespaceObject.expect)(e.cmpLoaded).toBe(!0)}),(0,external_vitest_namespaceObject.test)("should return correct gdprApplies value",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPPingData)();(0,external_vitest_namespaceObject.expect)(typeof e.gdprApplies).toBe("boolean")}),(0,external_vitest_namespaceObject.test)("should return cmpId matching configured ID",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPPingData)();(0,external_vitest_namespaceObject.expect)(e.cmpId).toBe(160)}),(0,external_vitest_namespaceObject.test)('should return apiVersion="2.3"',async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPPingData)();(0,external_vitest_namespaceObject.expect)(e.apiVersion).toBe("2.3")}),(0,external_vitest_namespaceObject.test)("should return tcfPolicyVersion=5",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPPingData)();(0,external_vitest_namespaceObject.expect)(e.tcfPolicyVersion).toBe(5)}),(0,external_vitest_namespaceObject.test)('should return cmpStatus="loaded"',async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPPingData)();(0,external_vitest_namespaceObject.expect)(e.cmpStatus).toBe("loaded")})}),(0,external_vitest_namespaceObject.describe)("addEventListener Command",()=>{(0,external_vitest_namespaceObject.test)("should invoke callback immediately on registration",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.addCMPEventListener)();(0,external_vitest_namespaceObject.expect)(e).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.eventStatus).toBeDefined()}),(0,external_vitest_namespaceObject.test)("should return unique listenerId",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.addCMPEventListener)(),t=await (0,external_e2e_setup_cjs_namespaceObject.addCMPEventListener)();(0,external_vitest_namespaceObject.expect)(e.listenerId).toBeDefined(),(0,external_vitest_namespaceObject.expect)(t.listenerId).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.listenerId).not.toBe(t.listenerId)}),(0,external_vitest_namespaceObject.test)('should fire eventStatus="tcloaded" initially',async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.addCMPEventListener)();(0,external_vitest_namespaceObject.expect)(e.eventStatus).toBe("tcloaded")})}),(0,external_vitest_namespaceObject.describe)("removeEventListener Command",()=>{(0,external_vitest_namespaceObject.test)("should remove listener by listenerId",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.addCMPEventListener)(),t=await (0,external_e2e_setup_cjs_namespaceObject.removeCMPEventListener)(e.listenerId);(0,external_vitest_namespaceObject.expect)(t).toBe(!0)}),(0,external_vitest_namespaceObject.test)("should return false for invalid listenerId",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.removeCMPEventListener)(999999);(0,external_vitest_namespaceObject.expect)(e).toBe(!1)})}),(0,external_vitest_namespaceObject.describe)("getTCData Command",()=>{(0,external_vitest_namespaceObject.test)("should return complete TCData object",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPTCData)();(0,external_vitest_namespaceObject.expect)(e).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("tcString"),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("gdprApplies"),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("cmpStatus"),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("isServiceSpecific"),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("publisherCC"),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("purpose"),(0,external_vitest_namespaceObject.expect)(e).toHaveProperty("vendor")}),(0,external_vitest_namespaceObject.test)("should return isServiceSpecific=true",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPTCData)();(0,external_vitest_namespaceObject.expect)(e.isServiceSpecific).toBe(!0)}),(0,external_vitest_namespaceObject.test)("should have purpose.consents and purpose.legitimateInterests",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPTCData)();(0,external_vitest_namespaceObject.expect)(e.purpose).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.purpose.consents).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.purpose.legitimateInterests).toBeDefined()}),(0,external_vitest_namespaceObject.test)("should have vendor.consents and vendor.legitimateInterests",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPTCData)();(0,external_vitest_namespaceObject.expect)(e.vendor).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.vendor.consents).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.vendor.legitimateInterests).toBeDefined()}),(0,external_vitest_namespaceObject.test)("should have specialFeatureOptins",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPTCData)();(0,external_vitest_namespaceObject.expect)(e.specialFeatureOptins).toBeDefined()}),(0,external_vitest_namespaceObject.test)("should have publisher object",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPTCData)();(0,external_vitest_namespaceObject.expect)(e.publisher).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.publisher.consents).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.publisher.legitimateInterests).toBeDefined()})}),(0,external_vitest_namespaceObject.describe)("getVendorList Command",()=>{(0,external_vitest_namespaceObject.test)("should return complete GVL",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.tcfApiPromise)("getVendorList",2);(0,external_vitest_namespaceObject.expect)(e).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.purposes).toBeDefined(),(0,external_vitest_namespaceObject.expect)(e.vendors).toBeDefined()}),(0,external_vitest_namespaceObject.test)("GVL should contain all 11 purposes",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=Object.keys((await (0,external_e2e_setup_cjs_namespaceObject.tcfApiPromise)("getVendorList",2)).purposes).map(Number);(0,external_vitest_namespaceObject.expect)(e).toContain(1),(0,external_vitest_namespaceObject.expect)(e).toContain(11),(0,external_vitest_namespaceObject.expect)(e.length).toBe(11)})}),(0,external_vitest_namespaceObject.describe)("getInAppTCData Command (Mobile Alias)",()=>{(0,external_vitest_namespaceObject.test)("should return same data as getTCData",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:external_e2e_setup_cjs_namespaceObject.defaultIABOptions,children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.IABConsentBanner,{}),(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_index_cjs_namespaceObject.IABConsentDialog,{})]})),await (0,external_e2e_setup_cjs_namespaceObject.waitForElement)('[data-testid="iab-consent-banner-card"]'),await (0,external_e2e_setup_cjs_namespaceObject.waitForCMP)();let e=await (0,external_e2e_setup_cjs_namespaceObject.getCMPTCData)(),t=await (0,external_e2e_setup_cjs_namespaceObject.tcfApiPromise)("getInAppTCData",2);(0,external_vitest_namespaceObject.expect)(t.gdprApplies).toBe(e.gdprApplies),(0,external_vitest_namespaceObject.expect)(t.cmpStatus).toBe(e.cmpStatus)})})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{beforeEach as a,describe as i,expect as n,test as o,vi as s}from"vitest";import{render as r}from"vitest-browser-react";import{IABConsentBanner as d}from"../../iab-consent-banner/index.js";import{IABConsentDialog as c}from"../../iab-consent-dialog/index.js";import{ConsentManagerProvider as p,clearConsentRuntimeCache as l}from"../../../providers/consent-manager-provider.js";import{addCMPEventListener as u,clearConsentState as w,defaultIABOptions as b,getCMPPingData as m,getCMPTCData as h,removeCMPEventListener as f,tcfApiPromise as v,waitForCMP as y,waitForElement as B}from"./e2e-setup.js";i("__tcfapi E2E Tests",()=>{a(()=>{w(),s.clearAllMocks(),l()}),i("ping Command",()=>{o("should return cmpLoaded=true after CMP ready",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await m()).cmpLoaded).toBe(!0)}),o("should return correct gdprApplies value",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n(typeof(await m()).gdprApplies).toBe("boolean")}),o("should return cmpId matching configured ID",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await m()).cmpId).toBe(160)}),o('should return apiVersion="2.3"',async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await m()).apiVersion).toBe("2.3")}),o("should return tcfPolicyVersion=5",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await m()).tcfPolicyVersion).toBe(5)}),o('should return cmpStatus="loaded"',async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await m()).cmpStatus).toBe("loaded")})}),i("addEventListener Command",()=>{o("should invoke callback immediately on registration",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await u();n(a).toBeDefined(),n(a.eventStatus).toBeDefined()}),o("should return unique listenerId",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await u(),i=await u();n(a.listenerId).toBeDefined(),n(i.listenerId).toBeDefined(),n(a.listenerId).not.toBe(i.listenerId)}),o('should fire eventStatus="tcloaded" initially',async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await u()).eventStatus).toBe("tcloaded")})}),i("removeEventListener Command",()=>{o("should remove listener by listenerId",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await u();n(await f(a.listenerId)).toBe(!0)}),o("should return false for invalid listenerId",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n(await f(999999)).toBe(!1)})}),i("getTCData Command",()=>{o("should return complete TCData object",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await h();n(a).toBeDefined(),n(a).toHaveProperty("tcString"),n(a).toHaveProperty("gdprApplies"),n(a).toHaveProperty("cmpStatus"),n(a).toHaveProperty("isServiceSpecific"),n(a).toHaveProperty("publisherCC"),n(a).toHaveProperty("purpose"),n(a).toHaveProperty("vendor")}),o("should return isServiceSpecific=true",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await h()).isServiceSpecific).toBe(!0)}),o("should have purpose.consents and purpose.legitimateInterests",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await h();n(a.purpose).toBeDefined(),n(a.purpose.consents).toBeDefined(),n(a.purpose.legitimateInterests).toBeDefined()}),o("should have vendor.consents and vendor.legitimateInterests",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await h();n(a.vendor).toBeDefined(),n(a.vendor.consents).toBeDefined(),n(a.vendor.legitimateInterests).toBeDefined()}),o("should have specialFeatureOptins",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y(),n((await h()).specialFeatureOptins).toBeDefined()}),o("should have publisher object",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await h();n(a.publisher).toBeDefined(),n(a.publisher.consents).toBeDefined(),n(a.publisher.legitimateInterests).toBeDefined()})}),i("getVendorList Command",()=>{o("should return complete GVL",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await v("getVendorList",2);n(a).toBeDefined(),n(a.purposes).toBeDefined(),n(a.vendors).toBeDefined()}),o("GVL should contain all 11 purposes",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=Object.keys((await v("getVendorList",2)).purposes).map(Number);n(a).toContain(1),n(a).toContain(11),n(a.length).toBe(11)})}),i("getInAppTCData Command (Mobile Alias)",()=>{o("should return same data as getTCData",async()=>{r(t(p,{options:b,children:[e(d,{}),e(c,{})]})),await B('[data-testid="iab-consent-banner-card"]'),await y();let a=await h(),i=await v("getInAppTCData",2);n(i.gdprApplies).toBe(a.gdprApplies),n(i.cmpStatus).toBe(a.cmpStatus)})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var n in r)__webpack_require__.o(r,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{nonIABRegionHandler:()=>nonIABRegionHandler,errorHandler:()=>errorHandler,handlers:()=>handlers,invalidGVLHandler:()=>invalidGVLHandler});const external_msw_namespaceObject=require("msw"),mock_consent_state_cjs_namespaceObject=require("./fixtures/mock-consent-state.cjs"),handlers=[external_msw_namespaceObject.http.get("https://gvl.consent.io*",({request:e})=>{console.log("[MSW] GVL request intercepted:",e.url);let r=new URL(e.url).searchParams.get("vendorIds");if(r){let e=r.split(",").map(Number),n={};for(let r of e)mock_consent_state_cjs_namespaceObject.mockGVL.vendors[r]&&(n[r]=mock_consent_state_cjs_namespaceObject.mockGVL.vendors[r]);return external_msw_namespaceObject.HttpResponse.json({...mock_consent_state_cjs_namespaceObject.mockGVL,vendors:n})}return external_msw_namespaceObject.HttpResponse.json(mock_consent_state_cjs_namespaceObject.mockGVL)})],nonIABRegionHandler=external_msw_namespaceObject.http.get("https://gvl.consent.io*",()=>(console.log("[MSW] Returning 204 (non-IAB region)"),new external_msw_namespaceObject.HttpResponse(null,{status:204}))),errorHandler=external_msw_namespaceObject.http.get("https://gvl.consent.io*",()=>(console.log("[MSW] Returning error"),external_msw_namespaceObject.HttpResponse.error())),invalidGVLHandler=external_msw_namespaceObject.http.get("https://gvl.consent.io*",()=>(console.log("[MSW] Returning invalid GVL"),external_msw_namespaceObject.HttpResponse.json({invalid:"data"})));for(var __rspack_i in exports.errorHandler=__webpack_exports__.errorHandler,exports.handlers=__webpack_exports__.handlers,exports.invalidGVLHandler=__webpack_exports__.invalidGVLHandler,exports.nonIABRegionHandler=__webpack_exports__.nonIABRegionHandler,__webpack_exports__)-1===["errorHandler","handlers","invalidGVLHandler","nonIABRegionHandler"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{HttpResponse as e,http as n}from"msw";import{mockGVL as o}from"./fixtures/mock-consent-state.js";let t=[n.get("https://gvl.consent.io*",({request:n})=>{console.log("[MSW] GVL request intercepted:",n.url);let t=new URL(n.url).searchParams.get("vendorIds");if(t){let n=t.split(",").map(Number),r={};for(let e of n)o.vendors[e]&&(r[e]=o.vendors[e]);return e.json({...o,vendors:r})}return e.json(o)})],r=n.get("https://gvl.consent.io*",()=>(console.log("[MSW] Returning 204 (non-IAB region)"),new e(null,{status:204}))),s=n.get("https://gvl.consent.io*",()=>(console.log("[MSW] Returning error"),e.error())),l=n.get("https://gvl.consent.io*",()=>(console.log("[MSW] Returning invalid GVL"),e.json({invalid:"data"})));export{s as errorHandler,t as handlers,l as invalidGVLHandler,r as nonIABRegionHandler};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),consent_manager_provider_cjs_namespaceObject=require("../../../providers/consent-manager-provider.cjs"),external_iab_consent_banner_cjs_namespaceObject=require("../iab-consent-banner.cjs"),localStorageMock=(()=>{let e={};return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]},clear:()=>{e={}}}})();Object.defineProperty(window,"localStorage",{value:localStorageMock});const mockGVL={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information",description:"",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Security",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Test Vendor",purposes:[1,2],legIntPurposes:[],specialPurposes:[],features:[],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:0,usesCookies:!1,cookieRefresh:!1,usesNonCookieAccess:!1,urls:[]}},stacks:{1:{id:1,name:"Test Stack",description:"",purposes:[2],specialFeatures:[]}}};globalThis.fetch=external_vitest_namespaceObject.vi.fn(()=>Promise.resolve(new Response(JSON.stringify(mockGVL),{status:200,headers:{"Content-Type":"application/json"}})));const defaultIABOptions={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("IAB Consent Banner Unit Tests",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{for(let e of(window.localStorage.clear(),document.cookie.split(";"))){let t=e.split("=")[0]?.trim();t&&(document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`)}external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.describe)("Component Rendering",()=>{(0,external_vitest_namespaceObject.test)("should render banner when IAB is enabled",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should render accept button",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-accept-button"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should render reject button",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-reject-button"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should render customize button",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-customize-button"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Accessibility",()=>{(0,external_vitest_namespaceObject.test)("should have dialog role",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');(0,external_vitest_namespaceObject.expect)(e?.getAttribute("role")).toBe("dialog")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should have aria-label",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');(0,external_vitest_namespaceObject.expect)(e?.getAttribute("aria-label")).toBeTruthy()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should be focusable",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');(0,external_vitest_namespaceObject.expect)(e?.tabIndex).toBe(0)},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Props",()=>{(0,external_vitest_namespaceObject.test)("should accept primaryButton prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{primaryButton:"accept"})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept trapFocus prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{trapFocus:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');(0,external_vitest_namespaceObject.expect)(e?.getAttribute("aria-modal")).toBe("true")},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Content",()=>{(0,external_vitest_namespaceObject.test)("should display header section",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-header"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should display footer section",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_banner_cjs_namespaceObject.IABConsentBanner,{})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-footer"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e;import{jsx as t}from"react/jsx-runtime";import{beforeEach as o,describe as n,expect as a,test as i,vi as r}from"vitest";import{render as s}from"vitest-browser-react";import{ConsentManagerProvider as c,clearConsentRuntimeCache as d}from"../../../providers/consent-manager-provider.js";import{IABConsentBanner as l}from"../iab-consent-banner.js";Object.defineProperty(window,"localStorage",{value:(e={},{getItem:t=>e[t]||null,setItem:(t,o)=>{e[t]=o},removeItem:t=>{delete e[t]},clear:()=>{e={}}})});let u={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information",description:"",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Security",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Test Vendor",purposes:[1,2],legIntPurposes:[],specialPurposes:[],features:[],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:0,usesCookies:!1,cookieRefresh:!1,usesNonCookieAccess:!1,urls:[]}},stacks:{1:{id:1,name:"Test Stack",description:"",purposes:[2],specialFeatures:[]}}};globalThis.fetch=r.fn(()=>Promise.resolve(new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})));let p={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};n("IAB Consent Banner Unit Tests",()=>{o(()=>{for(let e of(window.localStorage.clear(),document.cookie.split(";"))){let t=e.split("=")[0]?.trim();t&&(document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`)}r.clearAllMocks(),d(),delete window.__tcfapi}),n("Component Rendering",()=>{i("should render banner when IAB is enabled",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{a(document.querySelector('[data-testid="iab-consent-banner-card"]')).toBeInTheDocument()},{timeout:3e3})}),i("should render accept button",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{a(document.querySelector('[data-testid="iab-consent-banner-accept-button"]')).toBeInTheDocument()},{timeout:3e3})}),i("should render reject button",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{a(document.querySelector('[data-testid="iab-consent-banner-reject-button"]')).toBeInTheDocument()},{timeout:3e3})}),i("should render customize button",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{a(document.querySelector('[data-testid="iab-consent-banner-customize-button"]')).toBeInTheDocument()},{timeout:3e3})})}),n("Accessibility",()=>{i("should have dialog role",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');a(e?.getAttribute("role")).toBe("dialog")},{timeout:3e3})}),i("should have aria-label",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');a(e?.getAttribute("aria-label")).toBeTruthy()},{timeout:3e3})}),i("should be focusable",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');a(e?.tabIndex).toBe(0)},{timeout:3e3})})}),n("Props",()=>{i("should accept primaryButton prop",async()=>{s(t(c,{options:p,children:t(l,{primaryButton:"accept"})})),await r.waitFor(()=>{a(document.querySelector('[data-testid="iab-consent-banner-card"]')).toBeInTheDocument()},{timeout:3e3})}),i("should accept trapFocus prop",async()=>{s(t(c,{options:p,children:t(l,{trapFocus:!0})})),await r.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-banner-card"]');a(e?.getAttribute("aria-modal")).toBe("true")},{timeout:3e3})})}),n("Content",()=>{i("should display header section",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{a(document.querySelector('[data-testid="iab-consent-banner-header"]')).toBeInTheDocument()},{timeout:3e3})}),i("should display footer section",async()=>{s(t(c,{options:p,children:t(l,{})})),await r.waitFor(()=>{a(document.querySelector('[data-testid="iab-consent-banner-footer"]')).toBeInTheDocument()},{timeout:3e3})})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),consent_manager_provider_cjs_namespaceObject=require("../../../providers/consent-manager-provider.cjs"),external_iab_consent_dialog_cjs_namespaceObject=require("../iab-consent-dialog.cjs"),localStorageMock=(()=>{let e={};return{getItem:t=>e[t]||null,setItem:(t,a)=>{e[t]=a},removeItem:t=>{delete e[t]},clear:()=>{e={}}}})();Object.defineProperty(window,"localStorage",{value:localStorageMock});const mockGVL={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"Cookies...",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"Advertising...",illustrations:[]},3:{id:3,name:"Create profiles for personalised advertising",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},8:{id:8,name:"Measure content performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Ensure security, prevent and detect fraud",description:"",illustrations:[]},2:{id:2,name:"Deliver content",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data from other sources",description:"",illustrations:[]},2:{id:2,name:"Link different devices",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation data",description:"",illustrations:[]},2:{id:2,name:"Actively scan device characteristics",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Consent Only Vendor",purposes:[1,2,3],legIntPurposes:[],specialPurposes:[1],features:[1],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://vendor1.com/privacy"}]},10:{id:10,name:"LI Vendor",purposes:[1],legIntPurposes:[2,7,9,10],specialPurposes:[1],features:[],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://vendor10.com/privacy"}]},20:{id:20,name:"Another LI Vendor",purposes:[1,2],legIntPurposes:[7,8,9],specialPurposes:[1,2],features:[1,2],specialFeatures:[],flexiblePurposes:[2],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://vendor20.com/privacy"}]},755:{id:755,name:"Google Advertising Products",purposes:[1,2,3],legIntPurposes:[7,9,10],specialPurposes:[1,2],features:[1,2],specialFeatures:[1],flexiblePurposes:[2,7,9,10],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://policies.google.com/privacy"}]}},stacks:{1:{id:1,name:"Advertising measurement",description:"",purposes:[2,7],specialFeatures:[]}}};globalThis.fetch=external_vitest_namespaceObject.vi.fn(()=>Promise.resolve(new Response(JSON.stringify(mockGVL),{status:200,headers:{"Content-Type":"application/json"}})));const defaultIABOptions={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("Legitimate Interest UI - Purpose Level",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("LI purposes section should be separate from consent",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("LI toggle should default to allowed (not objected)",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("Purpose 1 should not have LI toggle (per IAB spec)",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("Purposes 2-11 can have LI toggles",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Legitimate Interest UI - Vendor Level",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("Vendor with LI purposes should show LI toggle",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()}),(0,external_vitest_namespaceObject.test)("Vendor without LI purposes should not show LI toggle",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()}),(0,external_vitest_namespaceObject.test)("Vendor-level LI objection should be independent per vendor",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()})}),(0,external_vitest_namespaceObject.describe)("Legitimate Interest UI - Objection Behavior",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("Toggling to object should set LI to false",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("Purpose-level LI objection should cascade to vendors using that purpose",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("LI objection should persist after save",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Legitimate Interest UI - Display Requirements",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("LI section should display purpose names from GVL",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("LI toggle should be clearly distinguishable from consent toggle",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("Vendor details should show which purposes use LI",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()})}),(0,external_vitest_namespaceObject.describe)("Legitimate Interest UI - Flexible Purposes",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("Flexible purposes can use either consent or LI",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("Vendor with flexible purposes should show both consent and LI options",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e;import{jsx as o}from"react/jsx-runtime";import{beforeEach as t,describe as i,expect as n,test as s,vi as a}from"vitest";import{render as r}from"vitest-browser-react";import{ConsentManagerProvider as c,clearConsentRuntimeCache as d}from"../../../providers/consent-manager-provider.js";import{IABConsentDialog as l}from"../iab-consent-dialog.js";Object.defineProperty(window,"localStorage",{value:(e={},{getItem:o=>e[o]||null,setItem:(o,t)=>{e[o]=t},removeItem:o=>{delete e[o]},clear:()=>{e={}}})});let u={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"Cookies...",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"Advertising...",illustrations:[]},3:{id:3,name:"Create profiles for personalised advertising",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},8:{id:8,name:"Measure content performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Ensure security, prevent and detect fraud",description:"",illustrations:[]},2:{id:2,name:"Deliver content",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data from other sources",description:"",illustrations:[]},2:{id:2,name:"Link different devices",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation data",description:"",illustrations:[]},2:{id:2,name:"Actively scan device characteristics",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Consent Only Vendor",purposes:[1,2,3],legIntPurposes:[],specialPurposes:[1],features:[1],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://vendor1.com/privacy"}]},10:{id:10,name:"LI Vendor",purposes:[1],legIntPurposes:[2,7,9,10],specialPurposes:[1],features:[],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://vendor10.com/privacy"}]},20:{id:20,name:"Another LI Vendor",purposes:[1,2],legIntPurposes:[7,8,9],specialPurposes:[1,2],features:[1,2],specialFeatures:[],flexiblePurposes:[2],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://vendor20.com/privacy"}]},755:{id:755,name:"Google Advertising Products",purposes:[1,2,3],legIntPurposes:[7,9,10],specialPurposes:[1,2],features:[1,2],specialFeatures:[1],flexiblePurposes:[2,7,9,10],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://policies.google.com/privacy"}]}},stacks:{1:{id:1,name:"Advertising measurement",description:"",purposes:[2,7],specialFeatures:[]}}};globalThis.fetch=a.fn(()=>Promise.resolve(new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})));let p={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};i("Legitimate Interest UI - Purpose Level",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),d(),delete window.__tcfapi}),s("LI purposes section should be separate from consent",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("LI toggle should default to allowed (not objected)",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("Purpose 1 should not have LI toggle (per IAB spec)",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("Purposes 2-11 can have LI toggles",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Legitimate Interest UI - Vendor Level",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),d(),delete window.__tcfapi}),s("Vendor with LI purposes should show LI toggle",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()}),s("Vendor without LI purposes should not show LI toggle",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()}),s("Vendor-level LI objection should be independent per vendor",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()})}),i("Legitimate Interest UI - Objection Behavior",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),d(),delete window.__tcfapi}),s("Toggling to object should set LI to false",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("Purpose-level LI objection should cascade to vendors using that purpose",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("LI objection should persist after save",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Legitimate Interest UI - Display Requirements",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),d(),delete window.__tcfapi}),s("LI section should display purpose names from GVL",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("LI toggle should be clearly distinguishable from consent toggle",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("Vendor details should show which purposes use LI",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()})}),i("Legitimate Interest UI - Flexible Purposes",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),d(),delete window.__tcfapi}),s("Flexible purposes can use either consent or LI",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("Vendor with flexible purposes should show both consent and LI options",async()=>{r(o(c,{options:p,children:o(l,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),consent_manager_provider_cjs_namespaceObject=require("../../../providers/consent-manager-provider.cjs"),external_iab_consent_dialog_cjs_namespaceObject=require("../iab-consent-dialog.cjs"),localStorageMock=(()=>{let e={};return{getItem:t=>e[t]||null,setItem:(t,a)=>{e[t]=a},removeItem:t=>{delete e[t]},clear:()=>{e={}}}})();Object.defineProperty(window,"localStorage",{value:localStorageMock});const mockGVL={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"Cookies, device identifiers...",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"Advertising can be presented...",illustrations:[]},3:{id:3,name:"Create profiles for personalised advertising",description:"Information about your activity...",illustrations:[]},4:{id:4,name:"Use profiles to select personalised advertising",description:"",illustrations:[]},5:{id:5,name:"Create profiles to personalise content",description:"",illustrations:[]},6:{id:6,name:"Use profiles to select personalised content",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},8:{id:8,name:"Measure content performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]},11:{id:11,name:"Use limited data to select content",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Ensure security, prevent fraud",description:"",illustrations:[]},2:{id:2,name:"Deliver content",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data",description:"",illustrations:[]},2:{id:2,name:"Link different devices",description:"",illustrations:[]},3:{id:3,name:"Identify devices",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation data",description:"",illustrations:[]},2:{id:2,name:"Actively scan device characteristics",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Test Vendor 1",purposes:[1,2,3],legIntPurposes:[7,8],specialPurposes:[1],features:[1],specialFeatures:[1],flexiblePurposes:[2],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://test.com/privacy"}]},755:{id:755,name:"Google Advertising",purposes:[1,2,3,4,5,6,7,8,9,10,11],legIntPurposes:[],specialPurposes:[1,2],features:[1,2,3],specialFeatures:[1,2],flexiblePurposes:[2,7,9,10,11],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://policies.google.com/privacy"}]}},stacks:{1:{id:1,name:"Advertising measurement",description:"",purposes:[2,7],specialFeatures:[]},2:{id:2,name:"Content personalisation",description:"",purposes:[5,6,11],specialFeatures:[]}}};globalThis.fetch=external_vitest_namespaceObject.vi.fn(()=>Promise.resolve(new Response(JSON.stringify(mockGVL),{status:200,headers:{"Content-Type":"application/json"}})));const defaultIABOptions={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("IAB Consent Dialog Unit Tests",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{for(let e of(window.localStorage.clear(),document.cookie.split(";"))){let t=e.split("=")[0]?.trim();t&&(document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`)}external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.describe)("Component Rendering",()=>{(0,external_vitest_namespaceObject.test)("should render when open=true",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should render card container",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-card"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Tab Navigation",()=>{(0,external_vitest_namespaceObject.test)("should display tab buttons",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button[data-state]');(0,external_vitest_namespaceObject.expect)(e.length).toBeGreaterThan(0)},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should have purposes tab",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e?.textContent?.toLowerCase()).toContain("purpose")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should have vendors tab",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e?.textContent?.toLowerCase()).toContain("vendor")},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Accessibility",()=>{(0,external_vitest_namespaceObject.test)("should have dialog role",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-card"]');(0,external_vitest_namespaceObject.expect)(e?.getAttribute("role")).toBe("dialog")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should have aria-label",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-card"]');(0,external_vitest_namespaceObject.expect)(e?.getAttribute("aria-label")).toBeTruthy()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Action Buttons",()=>{(0,external_vitest_namespaceObject.test)("should display Accept All button",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("accept all"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should display Reject All button",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("reject all"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should display Save button",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("save")||e.textContent?.toLowerCase().includes("confirm"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Content Loading",()=>{(0,external_vitest_namespaceObject.test)("should display purposes after GVL loads",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Props",()=>{(0,external_vitest_namespaceObject.test)("should accept hideBranding prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0,hideBranding:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept showTrigger prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{showTrigger:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{(0,external_vitest_namespaceObject.expect)(document.body).toBeTruthy()},{timeout:1e3})})})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e;import{jsx as t}from"react/jsx-runtime";import{beforeEach as o,describe as i,expect as n,test as s,vi as a}from"vitest";import{render as r}from"vitest-browser-react";import{ConsentManagerProvider as d,clearConsentRuntimeCache as l}from"../../../providers/consent-manager-provider.js";import{IABConsentDialog as c}from"../iab-consent-dialog.js";Object.defineProperty(window,"localStorage",{value:(e={},{getItem:t=>e[t]||null,setItem:(t,o)=>{e[t]=o},removeItem:t=>{delete e[t]},clear:()=>{e={}}})});let u={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"Cookies, device identifiers...",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"Advertising can be presented...",illustrations:[]},3:{id:3,name:"Create profiles for personalised advertising",description:"Information about your activity...",illustrations:[]},4:{id:4,name:"Use profiles to select personalised advertising",description:"",illustrations:[]},5:{id:5,name:"Create profiles to personalise content",description:"",illustrations:[]},6:{id:6,name:"Use profiles to select personalised content",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},8:{id:8,name:"Measure content performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]},11:{id:11,name:"Use limited data to select content",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Ensure security, prevent fraud",description:"",illustrations:[]},2:{id:2,name:"Deliver content",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data",description:"",illustrations:[]},2:{id:2,name:"Link different devices",description:"",illustrations:[]},3:{id:3,name:"Identify devices",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation data",description:"",illustrations:[]},2:{id:2,name:"Actively scan device characteristics",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Test Vendor 1",purposes:[1,2,3],legIntPurposes:[7,8],specialPurposes:[1],features:[1],specialFeatures:[1],flexiblePurposes:[2],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://test.com/privacy"}]},755:{id:755,name:"Google Advertising",purposes:[1,2,3,4,5,6,7,8,9,10,11],legIntPurposes:[],specialPurposes:[1,2],features:[1,2,3],specialFeatures:[1,2],flexiblePurposes:[2,7,9,10,11],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://policies.google.com/privacy"}]}},stacks:{1:{id:1,name:"Advertising measurement",description:"",purposes:[2,7],specialFeatures:[]},2:{id:2,name:"Content personalisation",description:"",purposes:[5,6,11],specialFeatures:[]}}};globalThis.fetch=a.fn(()=>Promise.resolve(new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})));let p={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};i("IAB Consent Dialog Unit Tests",()=>{o(()=>{for(let e of(window.localStorage.clear(),document.cookie.split(";"))){let t=e.split("=")[0]?.trim();t&&(document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`)}a.clearAllMocks(),l(),delete window.__tcfapi}),i("Component Rendering",()=>{s("should render when open=true",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("should render card container",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-card"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Tab Navigation",()=>{s("should display tab buttons",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{n(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button[data-state]').length).toBeGreaterThan(0)},{timeout:3e3})}),s("should have purposes tab",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');n(e?.textContent?.toLowerCase()).toContain("purpose")},{timeout:3e3})}),s("should have vendors tab",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');n(e?.textContent?.toLowerCase()).toContain("vendor")},{timeout:3e3})})}),i("Accessibility",()=>{s("should have dialog role",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-card"]');n(e?.getAttribute("role")).toBe("dialog")},{timeout:3e3})}),s("should have aria-label",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-card"]');n(e?.getAttribute("aria-label")).toBeTruthy()},{timeout:3e3})})}),i("Action Buttons",()=>{s("should display Accept All button",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("accept all"))).toBeDefined()},{timeout:3e3})}),s("should display Reject All button",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("reject all"))).toBeDefined()},{timeout:3e3})}),s("should display Save button",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{n(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("save")||e.textContent?.toLowerCase().includes("confirm"))).toBeDefined()},{timeout:3e3})})}),i("Content Loading",()=>{s("should display purposes after GVL loads",async()=>{r(t(d,{options:p,children:t(c,{open:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Props",()=>{s("should accept hideBranding prop",async()=>{r(t(d,{options:p,children:t(c,{open:!0,hideBranding:!0})})),await a.waitFor(()=>{n(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),s("should accept showTrigger prop",async()=>{r(t(d,{options:p,children:t(c,{showTrigger:!0})})),await a.waitFor(()=>{n(document.body).toBeTruthy()},{timeout:1e3})})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),consent_manager_provider_cjs_namespaceObject=require("../../../providers/consent-manager-provider.cjs"),external_iab_consent_dialog_cjs_namespaceObject=require("../iab-consent-dialog.cjs"),localStorageMock=(()=>{let e={};return{getItem:t=>e[t]||null,setItem:(t,a)=>{e[t]=a},removeItem:t=>{delete e[t]},clear:()=>{e={}}}})();Object.defineProperty(window,"localStorage",{value:localStorageMock});const mockGVL={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"Cookies, device identifiers...",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"Advertising can be presented...",illustrations:[]},3:{id:3,name:"Create profiles for personalised advertising",description:"Information about your activity...",illustrations:[]},4:{id:4,name:"Use profiles to select personalised advertising",description:"",illustrations:[]},5:{id:5,name:"Create profiles to personalise content",description:"",illustrations:[]},6:{id:6,name:"Use profiles to select personalised content",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},8:{id:8,name:"Measure content performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]},11:{id:11,name:"Use limited data to select content",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Ensure security, prevent and detect fraud, and fix errors",description:"",illustrations:[]},2:{id:2,name:"Deliver and present advertising and content",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data from other data sources",description:"",illustrations:[]},2:{id:2,name:"Link different devices",description:"",illustrations:[]},3:{id:3,name:"Identify devices based on information transmitted automatically",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation data",description:"With your acceptance, your precise location...",illustrations:[]},2:{id:2,name:"Actively scan device characteristics for identification",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Test Vendor 1",purposes:[1,2,3,7],legIntPurposes:[8,9],specialPurposes:[1],features:[1],specialFeatures:[1],flexiblePurposes:[2],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[]},755:{id:755,name:"Google Advertising",purposes:[1,2,3,4,5,6,7,8,9,10,11],legIntPurposes:[],specialPurposes:[1,2],features:[1,2,3],specialFeatures:[1,2],flexiblePurposes:[2,7,9,10,11],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[]}},stacks:{1:{id:1,name:"Advertising measurement",description:"",purposes:[2,7],specialFeatures:[]},2:{id:2,name:"Content personalisation",description:"",purposes:[5,6,11],specialFeatures:[]}}};globalThis.fetch=external_vitest_namespaceObject.vi.fn(()=>Promise.resolve(new Response(JSON.stringify(mockGVL),{status:200,headers:{"Content-Type":"application/json"}})));const defaultIABOptions={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("Purposes Tab - Consent",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("Purpose 1 should be displayed",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should display multiple purposes",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Purposes Tab - Legitimate Interest",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("should display LI section for purposes with LI vendors",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Purposes Tab - Special Purposes",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("special purposes section should exist when expanded",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Purposes Tab - Special Features",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("should display special features section",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("special feature toggles should exist",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Purposes Tab - Stacks",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("should group purposes into stacks from GVL",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e;import{jsx as t}from"react/jsx-runtime";import{beforeEach as o,describe as i,expect as s,test as a,vi as n}from"vitest";import{render as r}from"vitest-browser-react";import{ConsentManagerProvider as c,clearConsentRuntimeCache as l}from"../../../providers/consent-manager-provider.js";import{IABConsentDialog as d}from"../iab-consent-dialog.js";Object.defineProperty(window,"localStorage",{value:(e={},{getItem:t=>e[t]||null,setItem:(t,o)=>{e[t]=o},removeItem:t=>{delete e[t]},clear:()=>{e={}}})});let p={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"Cookies, device identifiers...",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"Advertising can be presented...",illustrations:[]},3:{id:3,name:"Create profiles for personalised advertising",description:"Information about your activity...",illustrations:[]},4:{id:4,name:"Use profiles to select personalised advertising",description:"",illustrations:[]},5:{id:5,name:"Create profiles to personalise content",description:"",illustrations:[]},6:{id:6,name:"Use profiles to select personalised content",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},8:{id:8,name:"Measure content performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]},11:{id:11,name:"Use limited data to select content",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Ensure security, prevent and detect fraud, and fix errors",description:"",illustrations:[]},2:{id:2,name:"Deliver and present advertising and content",description:"",illustrations:[]}},features:{1:{id:1,name:"Match and combine data from other data sources",description:"",illustrations:[]},2:{id:2,name:"Link different devices",description:"",illustrations:[]},3:{id:3,name:"Identify devices based on information transmitted automatically",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Use precise geolocation data",description:"With your acceptance, your precise location...",illustrations:[]},2:{id:2,name:"Actively scan device characteristics for identification",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Test Vendor 1",purposes:[1,2,3,7],legIntPurposes:[8,9],specialPurposes:[1],features:[1],specialFeatures:[1],flexiblePurposes:[2],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[]},755:{id:755,name:"Google Advertising",purposes:[1,2,3,4,5,6,7,8,9,10,11],legIntPurposes:[],specialPurposes:[1,2],features:[1,2,3],specialFeatures:[1,2],flexiblePurposes:[2,7,9,10,11],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[]}},stacks:{1:{id:1,name:"Advertising measurement",description:"",purposes:[2,7],specialFeatures:[]},2:{id:2,name:"Content personalisation",description:"",purposes:[5,6,11],specialFeatures:[]}}};globalThis.fetch=n.fn(()=>Promise.resolve(new Response(JSON.stringify(p),{status:200,headers:{"Content-Type":"application/json"}})));let u={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};i("Purposes Tab - Consent",()=>{o(()=>{window.localStorage.clear(),n.clearAllMocks(),l(),delete window.__tcfapi}),a("Purpose 1 should be displayed",async()=>{r(t(c,{options:u,children:t(d,{open:!0})})),await n.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),a("should display multiple purposes",async()=>{r(t(c,{options:u,children:t(d,{open:!0})})),await n.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Purposes Tab - Legitimate Interest",()=>{o(()=>{window.localStorage.clear(),n.clearAllMocks(),l(),delete window.__tcfapi}),a("should display LI section for purposes with LI vendors",async()=>{r(t(c,{options:u,children:t(d,{open:!0})})),await n.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Purposes Tab - Special Purposes",()=>{o(()=>{window.localStorage.clear(),n.clearAllMocks(),l(),delete window.__tcfapi}),a("special purposes section should exist when expanded",async()=>{r(t(c,{options:u,children:t(d,{open:!0})})),await n.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Purposes Tab - Special Features",()=>{o(()=>{window.localStorage.clear(),n.clearAllMocks(),l(),delete window.__tcfapi}),a("should display special features section",async()=>{r(t(c,{options:u,children:t(d,{open:!0})})),await n.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})}),a("special feature toggles should exist",async()=>{r(t(c,{options:u,children:t(d,{open:!0})})),await n.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Purposes Tab - Stacks",()=>{o(()=>{window.localStorage.clear(),n.clearAllMocks(),l(),delete window.__tcfapi}),a("should group purposes into stacks from GVL",async()=>{r(t(c,{options:u,children:t(d,{open:!0})})),await n.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),consent_manager_provider_cjs_namespaceObject=require("../../../providers/consent-manager-provider.cjs"),external_iab_consent_dialog_cjs_namespaceObject=require("../iab-consent-dialog.cjs"),localStorageMock=(()=>{let e={};return{getItem:t=>e[t]||null,setItem:(t,a)=>{e[t]=a},removeItem:t=>{delete e[t]},clear:()=>{e={}}}})();Object.defineProperty(window,"localStorage",{value:localStorageMock});const mockGVL={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Security",description:"",illustrations:[]}},features:{1:{id:1,name:"Match data",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Geolocation",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Exponential Interactive",purposes:[1,2],legIntPurposes:[7,9,10],specialPurposes:[1],features:[1],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://vendor1.com/privacy"}]},10:{id:10,name:"Index Exchange",purposes:[1],legIntPurposes:[2,7,9,10],specialPurposes:[1],features:[],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://indexexchange.com/privacy"}]},755:{id:755,name:"Google Advertising Products",purposes:[1,2,7,9,10],legIntPurposes:[],specialPurposes:[1],features:[1],specialFeatures:[1],flexiblePurposes:[2,7,9,10],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://policies.google.com/privacy"}]}},stacks:{1:{id:1,name:"Advertising",description:"",purposes:[2,7],specialFeatures:[]}}};globalThis.fetch=external_vitest_namespaceObject.vi.fn(()=>Promise.resolve(new Response(JSON.stringify(mockGVL),{status:200,headers:{"Content-Type":"application/json"}})));const defaultIABOptions={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("Vendors Tab - Display",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("should display vendor list when vendors tab is selected",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()}),(0,external_vitest_namespaceObject.test)("should display all GVL vendors",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()}),(0,external_vitest_namespaceObject.test)("should show vendor count in tab",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Vendors Tab - Per-Vendor Consent",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("should display consent toggle for vendors",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()})}),(0,external_vitest_namespaceObject.describe)("Vendors Tab - Per-Vendor Legitimate Interest",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("vendors with LI purposes should have LI toggle option",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()})}),(0,external_vitest_namespaceObject.describe)("Vendors Tab - Vendor Details",()=>{(0,external_vitest_namespaceObject.beforeEach)(()=>{window.localStorage.clear(),external_vitest_namespaceObject.vi.clearAllMocks(),(0,consent_manager_provider_cjs_namespaceObject.clearConsentRuntimeCache)(),delete window.__tcfapi}),(0,external_vitest_namespaceObject.test)("vendor details should be expandable",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(consent_manager_provider_cjs_namespaceObject.ConsentManagerProvider,{options:defaultIABOptions,children:(0,jsx_runtime_namespaceObject.jsx)(external_iab_consent_dialog_cjs_namespaceObject.IABConsentDialog,{open:!0})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="iab-consent-dialog-root"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let e=Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"));(0,external_vitest_namespaceObject.expect)(e).toBeDefined()})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e;import{jsx as o}from"react/jsx-runtime";import{beforeEach as t,describe as i,expect as s,test as n,vi as a}from"vitest";import{render as r}from"vitest-browser-react";import{ConsentManagerProvider as d,clearConsentRuntimeCache as l}from"../../../providers/consent-manager-provider.js";import{IABConsentDialog as c}from"../iab-consent-dialog.js";Object.defineProperty(window,"localStorage",{value:(e={},{getItem:o=>e[o]||null,setItem:(o,t)=>{e[o]=t},removeItem:o=>{delete e[o]},clear:()=>{e={}}})});let u={gvlSpecificationVersion:3,vendorListVersion:142,tcfPolicyVersion:5,lastUpdated:"2024-01-15T16:00:23Z",purposes:{1:{id:1,name:"Store and/or access information on a device",description:"",illustrations:[]},2:{id:2,name:"Use limited data to select advertising",description:"",illustrations:[]},7:{id:7,name:"Measure advertising performance",description:"",illustrations:[]},9:{id:9,name:"Understand audiences through statistics",description:"",illustrations:[]},10:{id:10,name:"Develop and improve services",description:"",illustrations:[]}},specialPurposes:{1:{id:1,name:"Security",description:"",illustrations:[]}},features:{1:{id:1,name:"Match data",description:"",illustrations:[]}},specialFeatures:{1:{id:1,name:"Geolocation",description:"",illustrations:[]}},vendors:{1:{id:1,name:"Exponential Interactive",purposes:[1,2],legIntPurposes:[7,9,10],specialPurposes:[1],features:[1],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://vendor1.com/privacy"}]},10:{id:10,name:"Index Exchange",purposes:[1],legIntPurposes:[2,7,9,10],specialPurposes:[1],features:[],specialFeatures:[],flexiblePurposes:[],cookieMaxAgeSeconds:31536e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!1,urls:[{langId:"en",privacy:"https://indexexchange.com/privacy"}]},755:{id:755,name:"Google Advertising Products",purposes:[1,2,7,9,10],legIntPurposes:[],specialPurposes:[1],features:[1],specialFeatures:[1],flexiblePurposes:[2,7,9,10],cookieMaxAgeSeconds:63072e3,usesCookies:!0,cookieRefresh:!0,usesNonCookieAccess:!0,urls:[{langId:"en",privacy:"https://policies.google.com/privacy"}]}},stacks:{1:{id:1,name:"Advertising",description:"",purposes:[2,7],specialFeatures:[]}}};globalThis.fetch=a.fn(()=>Promise.resolve(new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})));let p={mode:"offline",iab:{enabled:!0,cmpId:160,cmpVersion:1}};i("Vendors Tab - Display",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),l(),delete window.__tcfapi}),n("should display vendor list when vendors tab is selected",async()=>{r(o(d,{options:p,children:o(c,{open:!0})})),await a.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),s(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()}),n("should display all GVL vendors",async()=>{r(o(d,{options:p,children:o(c,{open:!0})})),await a.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),s(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()}),n("should show vendor count in tab",async()=>{r(o(d,{options:p,children:o(c,{open:!0})})),await a.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3})})}),i("Vendors Tab - Per-Vendor Consent",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),l(),delete window.__tcfapi}),n("should display consent toggle for vendors",async()=>{r(o(d,{options:p,children:o(c,{open:!0})})),await a.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),s(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()})}),i("Vendors Tab - Per-Vendor Legitimate Interest",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),l(),delete window.__tcfapi}),n("vendors with LI purposes should have LI toggle option",async()=>{r(o(d,{options:p,children:o(c,{open:!0})})),await a.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),s(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()})}),i("Vendors Tab - Vendor Details",()=>{t(()=>{window.localStorage.clear(),a.clearAllMocks(),l(),delete window.__tcfapi}),n("vendor details should be expandable",async()=>{r(o(d,{options:p,children:o(c,{open:!0})})),await a.waitFor(()=>{s(document.querySelector('[data-testid="iab-consent-dialog-root"]')).toBeInTheDocument()},{timeout:3e3}),s(Array.from(document.querySelectorAll('[data-testid="iab-consent-dialog-root"] button')).find(e=>e.textContent?.toLowerCase().includes("vendor"))).toBeDefined()})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_exports__={};const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_vitest_namespaceObject=require("vitest"),browser_namespaceObject=require("vitest/browser"),external_vitest_browser_react_namespaceObject=require("vitest-browser-react"),theme_context_cjs_namespaceObject=require("../../../../context/theme-context.cjs"),accordion_cjs_namespaceObject=require("../accordion/accordion.cjs"),button_cjs_namespaceObject=require("../button/button.cjs"),switch_cjs_namespaceObject=require("../switch/switch.cjs"),ThemeWrapper=({children:e})=>(0,jsx_runtime_namespaceObject.jsx)(theme_context_cjs_namespaceObject.GlobalThemeContext.Provider,{value:{noStyle:!1},children:e});for(var __rspack_i in(0,external_vitest_namespaceObject.describe)("Button",()=>{(0,external_vitest_namespaceObject.describe)("Rendering",()=>{(0,external_vitest_namespaceObject.test)("should render a button element",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{children:"Click me"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.textContent).toBe("Click me")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should render with children",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{children:(0,jsx_runtime_namespaceObject.jsx)("span",{children:"Button Text"})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.querySelector("span")?.textContent).toBe("Button Text")},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Props",()=>{(0,external_vitest_namespaceObject.test)("should accept variant prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{variant:"primary",children:"Primary"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept mode prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{mode:"filled",children:"Filled"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept size prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{size:"large",children:"Large"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept className prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{className:"custom-class",children:"Custom"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.className).toContain("custom-class")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept noStyle prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{noStyle:!0,className:"only-this-class",children:"No Style"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.className).toBe("only-this-class")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept disabled prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{disabled:!0,children:"Disabled"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.disabled).toBe(!0)},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept onClick handler",async()=>{let e=external_vitest_namespaceObject.vi.fn();(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Root,{onClick:e,children:"Click"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let t=document.querySelector("button");await browser_namespaceObject.userEvent.click(t),(0,external_vitest_namespaceObject.expect)(e).toHaveBeenCalledTimes(1)})}),(0,external_vitest_namespaceObject.describe)("ButtonIcon",()=>{(0,external_vitest_namespaceObject.test)("should render icon component",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsxs)(button_cjs_namespaceObject.Root,{children:[(0,jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Icon,{as:()=>(0,jsx_runtime_namespaceObject.jsx)("svg",{"data-testid":"test-icon"})}),"With Icon"]})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-testid="test-icon"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})})}),(0,external_vitest_namespaceObject.describe)("Switch",()=>{(0,external_vitest_namespaceObject.describe)("Rendering",()=>{(0,external_vitest_namespaceObject.test)("should render a switch element",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should have unchecked state by default",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.getAttribute("aria-checked")).toBe("false")},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Props",()=>{(0,external_vitest_namespaceObject.test)("should accept checked prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{checked:!0})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.getAttribute("aria-checked")).toBe("true")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept defaultChecked prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{defaultChecked:!0})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.getAttribute("aria-checked")).toBe("true")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept disabled prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{disabled:!0})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.getAttribute("data-disabled")).toBe("")},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept size prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{size:"small"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept noStyle prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{noStyle:!0,className:"custom-switch"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(e?.className).toBe("custom-switch")},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Interactions",()=>{(0,external_vitest_namespaceObject.test)("should toggle on click",async()=>{let e=external_vitest_namespaceObject.vi.fn();(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{onCheckedChange:e})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let t=document.querySelector('[role="switch"]');await browser_namespaceObject.userEvent.click(t),(0,external_vitest_namespaceObject.expect)(e).toHaveBeenCalledWith(!0)}),(0,external_vitest_namespaceObject.test)("should call onCheckedChange with new value",async()=>{let e=external_vitest_namespaceObject.vi.fn();(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{defaultChecked:!0,onCheckedChange:e})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let t=document.querySelector('[role="switch"]');await browser_namespaceObject.userEvent.click(t),(0,external_vitest_namespaceObject.expect)(e).toHaveBeenCalledWith(!1)})}),(0,external_vitest_namespaceObject.describe)("Accessibility",()=>{(0,external_vitest_namespaceObject.test)('should have role="switch"',async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should have aria-checked attribute",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(switch_cjs_namespaceObject.Root,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[role="switch"]');(0,external_vitest_namespaceObject.expect)(e?.hasAttribute("aria-checked")).toBe(!0)},{timeout:3e3})})})}),(0,external_vitest_namespaceObject.describe)("Accordion",()=>{let e=({type:e="single",defaultValue:t})=>(0,jsx_runtime_namespaceObject.jsx)(ThemeWrapper,{children:(0,jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.Root,{type:e,defaultValue:t,children:[(0,jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.Item,{value:"item-1",children:[(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Trigger,{children:"Section 1"}),(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Content,{children:"Content 1"})]}),(0,jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.Item,{value:"item-2",children:[(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Trigger,{children:"Section 2"}),(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Content,{children:"Content 2"})]})]})});(0,external_vitest_namespaceObject.describe)("Rendering",()=>{(0,external_vitest_namespaceObject.test)("should render accordion items",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(e,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelectorAll("[data-radix-collection-item]");(0,external_vitest_namespaceObject.expect)(e.length).toBe(2)},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should render trigger text",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(e,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e?.textContent).toBe("Section 1")},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Interactions",()=>{(0,external_vitest_namespaceObject.test)("should expand item on trigger click",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(e,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let t=document.querySelector("button");await browser_namespaceObject.userEvent.click(t),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('[data-state="open"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should close first item when second item is clicked (single type)",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(e,{type:"single",defaultValue:"item-1"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('button[data-state="open"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3});let t=document.querySelectorAll("button");await browser_namespaceObject.userEvent.click(t[1]),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('button[data-state="closed"]'),t=document.querySelectorAll("button")[1];(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument(),(0,external_vitest_namespaceObject.expect)(t?.getAttribute("data-state")).toBe("open")},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Props",()=>{(0,external_vitest_namespaceObject.test)("should accept defaultValue prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(e,{defaultValue:"item-1"})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('button[data-state="open"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)('should accept type="multiple"',async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(ThemeWrapper,{children:(0,jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.Root,{type:"multiple",children:[(0,jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.Item,{value:"item-1",children:[(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Trigger,{children:"Section 1"}),(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Content,{children:"Content 1"})]}),(0,jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.Item,{value:"item-2",children:[(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Trigger,{children:"Section 2"}),(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Content,{children:"Content 2"})]})]})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelectorAll("button");(0,external_vitest_namespaceObject.expect)(e.length).toBe(2)},{timeout:3e3});let e=document.querySelectorAll("button");await browser_namespaceObject.userEvent.click(e[0]),await external_vitest_namespaceObject.vi.waitFor(()=>{(0,external_vitest_namespaceObject.expect)(document.querySelector('button[data-state="open"]')).toBeInTheDocument()},{timeout:3e3}),await browser_namespaceObject.userEvent.click(e[1]),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelectorAll('button[data-state="open"]');(0,external_vitest_namespaceObject.expect)(e.length).toBe(2)},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should accept noStyle prop",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(ThemeWrapper,{children:(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Root,{type:"single",noStyle:!0,className:"custom-accordion",children:(0,jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.Item,{value:"item-1",noStyle:!0,className:"custom-item",children:[(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Trigger,{noStyle:!0,className:"custom-trigger",children:"Section"}),(0,jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Content,{noStyle:!0,className:"custom-content",children:"Content"})]})})})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector(".custom-trigger");(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})}),(0,external_vitest_namespaceObject.describe)("Accessibility",()=>{(0,external_vitest_namespaceObject.test)("should have correct ARIA attributes on trigger",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(e,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e?.hasAttribute("aria-controls")).toBe(!0),(0,external_vitest_namespaceObject.expect)(e?.hasAttribute("aria-expanded")).toBe(!0)},{timeout:3e3})}),(0,external_vitest_namespaceObject.test)("should update aria-expanded on click",async()=>{(0,external_vitest_browser_react_namespaceObject.render)((0,jsx_runtime_namespaceObject.jsx)(e,{})),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector("button");(0,external_vitest_namespaceObject.expect)(e?.getAttribute("aria-expanded")).toBe("false")},{timeout:3e3});let t=document.querySelector('button[aria-expanded="false"]');await browser_namespaceObject.userEvent.click(t),await external_vitest_namespaceObject.vi.waitFor(()=>{let e=document.querySelector('button[aria-expanded="true"]');(0,external_vitest_namespaceObject.expect)(e).toBeInTheDocument()},{timeout:3e3})})})}),__webpack_exports__)exports[__rspack_i]=__webpack_exports__[__rspack_i];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{describe as o,expect as c,test as a,vi as n}from"vitest";import{userEvent as i}from"vitest/browser";import{render as r}from"vitest-browser-react";import{GlobalThemeContext as l}from"../../../../context/theme-context.js";import{Content as u,Item as d,Root as s,Trigger as m}from"../accordion/accordion.js";import{Icon as h,Root as w}from"../button/button.js";import{Root as y}from"../switch/switch.js";let p=({children:t})=>e(l.Provider,{value:{noStyle:!1},children:t});o("Button",()=>{o("Rendering",()=>{a("should render a button element",async()=>{r(e(w,{children:"Click me"})),await n.waitFor(()=>{let e=document.querySelector("button");c(e).toBeInTheDocument(),c(e?.textContent).toBe("Click me")},{timeout:3e3})}),a("should render with children",async()=>{r(e(w,{children:e("span",{children:"Button Text"})})),await n.waitFor(()=>{let e=document.querySelector("button");c(e).toBeInTheDocument(),c(e?.querySelector("span")?.textContent).toBe("Button Text")},{timeout:3e3})})}),o("Props",()=>{a("should accept variant prop",async()=>{r(e(w,{variant:"primary",children:"Primary"})),await n.waitFor(()=>{c(document.querySelector("button")).toBeInTheDocument()},{timeout:3e3})}),a("should accept mode prop",async()=>{r(e(w,{mode:"filled",children:"Filled"})),await n.waitFor(()=>{c(document.querySelector("button")).toBeInTheDocument()},{timeout:3e3})}),a("should accept size prop",async()=>{r(e(w,{size:"large",children:"Large"})),await n.waitFor(()=>{c(document.querySelector("button")).toBeInTheDocument()},{timeout:3e3})}),a("should accept className prop",async()=>{r(e(w,{className:"custom-class",children:"Custom"})),await n.waitFor(()=>{let e=document.querySelector("button");c(e).toBeInTheDocument(),c(e?.className).toContain("custom-class")},{timeout:3e3})}),a("should accept noStyle prop",async()=>{r(e(w,{noStyle:!0,className:"only-this-class",children:"No Style"})),await n.waitFor(()=>{let e=document.querySelector("button");c(e).toBeInTheDocument(),c(e?.className).toBe("only-this-class")},{timeout:3e3})}),a("should accept disabled prop",async()=>{r(e(w,{disabled:!0,children:"Disabled"})),await n.waitFor(()=>{let e=document.querySelector("button");c(e).toBeInTheDocument(),c(e?.disabled).toBe(!0)},{timeout:3e3})}),a("should accept onClick handler",async()=>{let t=n.fn();r(e(w,{onClick:t,children:"Click"})),await n.waitFor(()=>{c(document.querySelector("button")).toBeInTheDocument()},{timeout:3e3});let o=document.querySelector("button");await i.click(o),c(t).toHaveBeenCalledTimes(1)})}),o("ButtonIcon",()=>{a("should render icon component",async()=>{r(t(w,{children:[e(h,{as:()=>e("svg",{"data-testid":"test-icon"})}),"With Icon"]})),await n.waitFor(()=>{c(document.querySelector('[data-testid="test-icon"]')).toBeInTheDocument()},{timeout:3e3})})})}),o("Switch",()=>{o("Rendering",()=>{a("should render a switch element",async()=>{r(e(y,{})),await n.waitFor(()=>{c(document.querySelector('[role="switch"]')).toBeInTheDocument()},{timeout:3e3})}),a("should have unchecked state by default",async()=>{r(e(y,{})),await n.waitFor(()=>{let e=document.querySelector('[role="switch"]');c(e).toBeInTheDocument(),c(e?.getAttribute("aria-checked")).toBe("false")},{timeout:3e3})})}),o("Props",()=>{a("should accept checked prop",async()=>{r(e(y,{checked:!0})),await n.waitFor(()=>{let e=document.querySelector('[role="switch"]');c(e).toBeInTheDocument(),c(e?.getAttribute("aria-checked")).toBe("true")},{timeout:3e3})}),a("should accept defaultChecked prop",async()=>{r(e(y,{defaultChecked:!0})),await n.waitFor(()=>{let e=document.querySelector('[role="switch"]');c(e).toBeInTheDocument(),c(e?.getAttribute("aria-checked")).toBe("true")},{timeout:3e3})}),a("should accept disabled prop",async()=>{r(e(y,{disabled:!0})),await n.waitFor(()=>{let e=document.querySelector('[role="switch"]');c(e).toBeInTheDocument(),c(e?.getAttribute("data-disabled")).toBe("")},{timeout:3e3})}),a("should accept size prop",async()=>{r(e(y,{size:"small"})),await n.waitFor(()=>{c(document.querySelector('[role="switch"]')).toBeInTheDocument()},{timeout:3e3})}),a("should accept noStyle prop",async()=>{r(e(y,{noStyle:!0,className:"custom-switch"})),await n.waitFor(()=>{let e=document.querySelector('[role="switch"]');c(e).toBeInTheDocument(),c(e?.className).toBe("custom-switch")},{timeout:3e3})})}),o("Interactions",()=>{a("should toggle on click",async()=>{let t=n.fn();r(e(y,{onCheckedChange:t})),await n.waitFor(()=>{c(document.querySelector('[role="switch"]')).toBeInTheDocument()},{timeout:3e3});let o=document.querySelector('[role="switch"]');await i.click(o),c(t).toHaveBeenCalledWith(!0)}),a("should call onCheckedChange with new value",async()=>{let t=n.fn();r(e(y,{defaultChecked:!0,onCheckedChange:t})),await n.waitFor(()=>{c(document.querySelector('[role="switch"]')).toBeInTheDocument()},{timeout:3e3});let o=document.querySelector('[role="switch"]');await i.click(o),c(t).toHaveBeenCalledWith(!1)})}),o("Accessibility",()=>{a('should have role="switch"',async()=>{r(e(y,{})),await n.waitFor(()=>{c(document.querySelector('[role="switch"]')).toBeInTheDocument()},{timeout:3e3})}),a("should have aria-checked attribute",async()=>{r(e(y,{})),await n.waitFor(()=>{let e=document.querySelector('[role="switch"]');c(e?.hasAttribute("aria-checked")).toBe(!0)},{timeout:3e3})})})}),o("Accordion",()=>{let l=({type:o="single",defaultValue:c})=>e(p,{children:t(s,{type:o,defaultValue:c,children:[t(d,{value:"item-1",children:[e(m,{children:"Section 1"}),e(u,{children:"Content 1"})]}),t(d,{value:"item-2",children:[e(m,{children:"Section 2"}),e(u,{children:"Content 2"})]})]})});o("Rendering",()=>{a("should render accordion items",async()=>{r(e(l,{})),await n.waitFor(()=>{c(document.querySelectorAll("[data-radix-collection-item]").length).toBe(2)},{timeout:3e3})}),a("should render trigger text",async()=>{r(e(l,{})),await n.waitFor(()=>{let e=document.querySelector("button");c(e?.textContent).toBe("Section 1")},{timeout:3e3})})}),o("Interactions",()=>{a("should expand item on trigger click",async()=>{r(e(l,{})),await n.waitFor(()=>{c(document.querySelector("button")).toBeInTheDocument()},{timeout:3e3});let t=document.querySelector("button");await i.click(t),await n.waitFor(()=>{c(document.querySelector('[data-state="open"]')).toBeInTheDocument()},{timeout:3e3})}),a("should close first item when second item is clicked (single type)",async()=>{r(e(l,{type:"single",defaultValue:"item-1"})),await n.waitFor(()=>{c(document.querySelector('button[data-state="open"]')).toBeInTheDocument()},{timeout:3e3});let t=document.querySelectorAll("button");await i.click(t[1]),await n.waitFor(()=>{let e=document.querySelector('button[data-state="closed"]'),t=document.querySelectorAll("button")[1];c(e).toBeInTheDocument(),c(t?.getAttribute("data-state")).toBe("open")},{timeout:3e3})})}),o("Props",()=>{a("should accept defaultValue prop",async()=>{r(e(l,{defaultValue:"item-1"})),await n.waitFor(()=>{c(document.querySelector('button[data-state="open"]')).toBeInTheDocument()},{timeout:3e3})}),a('should accept type="multiple"',async()=>{r(e(p,{children:t(s,{type:"multiple",children:[t(d,{value:"item-1",children:[e(m,{children:"Section 1"}),e(u,{children:"Content 1"})]}),t(d,{value:"item-2",children:[e(m,{children:"Section 2"}),e(u,{children:"Content 2"})]})]})})),await n.waitFor(()=>{c(document.querySelectorAll("button").length).toBe(2)},{timeout:3e3});let o=document.querySelectorAll("button");await i.click(o[0]),await n.waitFor(()=>{c(document.querySelector('button[data-state="open"]')).toBeInTheDocument()},{timeout:3e3}),await i.click(o[1]),await n.waitFor(()=>{c(document.querySelectorAll('button[data-state="open"]').length).toBe(2)},{timeout:3e3})}),a("should accept noStyle prop",async()=>{r(e(p,{children:e(s,{type:"single",noStyle:!0,className:"custom-accordion",children:t(d,{value:"item-1",noStyle:!0,className:"custom-item",children:[e(m,{noStyle:!0,className:"custom-trigger",children:"Section"}),e(u,{noStyle:!0,className:"custom-content",children:"Content"})]})})})),await n.waitFor(()=>{c(document.querySelector(".custom-trigger")).toBeInTheDocument()},{timeout:3e3})})}),o("Accessibility",()=>{a("should have correct ARIA attributes on trigger",async()=>{r(e(l,{})),await n.waitFor(()=>{let e=document.querySelector("button");c(e?.hasAttribute("aria-controls")).toBe(!0),c(e?.hasAttribute("aria-expanded")).toBe(!0)},{timeout:3e3})}),a("should update aria-expanded on click",async()=>{r(e(l,{})),await n.waitFor(()=>{let e=document.querySelector("button");c(e?.getAttribute("aria-expanded")).toBe("false")},{timeout:3e3});let t=document.querySelector('button[aria-expanded="false"]');await i.click(t),await n.waitFor(()=>{c(document.querySelector('button[aria-expanded="true"]')).toBeInTheDocument()},{timeout:3e3})})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png"(e){e.exports=require("../../../../static/image/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.png"(e){e.exports=require("../../../../static/image/useColorScheme-handles-default-theme-based-on-document-class-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var s=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](s,s.exports,__webpack_require__),s.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useColorScheme-handles-default-theme-based-on-document-class-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.png"(e){e.exports=require("../../../../static/image/useColorScheme-responds-to-system-preference-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useColorScheme-responds-to-system-preference-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.png"(e){e.exports=require("../../../../static/image/useColorScheme-sets-dark-theme-correctly-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useColorScheme-sets-dark-theme-correctly-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.png"(e){e.exports=require("../../../../static/image/useColorScheme-updates-theme-when-default-theme-changes-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useColorScheme-updates-theme-when-default-theme-changes-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.png"(e){e.exports=require("../../../../static/image/useColorScheme-updates-theme-when-system-preference-changes-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useColorScheme-updates-theme-when-system-preference-changes-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.png"(e){e.exports=require("../../../../static/image/useConsentManager-provides-manager-object-when-configured-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useConsentManager-provides-manager-object-when-configured-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.png"(e){e.exports=require("../../../../static/image/useStyles-handles-string-className-correctly-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var s=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](s,s.exports,__webpack_require__),s.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useStyles-handles-string-className-correctly-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.png"(e){e.exports=require("../../../../static/image/useStyles-merges-theme-and-component-styles-correctly-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useStyles-merges-theme-and-component-styles-correctly-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png"(e){e.exports=require("../../../../static/image/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var s=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](s,s.exports,__webpack_require__),s.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png"(e){e.exports=require("../../../../static/image/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var s=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](s,s.exports,__webpack_require__),s.exports}var __webpack_exports__=__webpack_require__("./src/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png");for(var __rspack_i in exports.default=__webpack_exports__.default,__webpack_exports__)-1===["default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../../../../static/image/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png";export{e as default};
|