@pega/cosmos-react-test-utils 9.0.0-build.23.4 → 9.0.0-build.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/utils.d.ts.map +1 -1
- package/lib/utils/utils.js +2 -2
- package/lib/utils/utils.js.map +1 -1
- package/package.json +2 -2
package/lib/utils/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAW7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9E,KAAK,cAAc,GAAG,UAAU,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAmBjE,wBAAgB,MAAM,CACpB,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,GAAG,SAAS,CAAC,EAC1D,kBAAkB,CAAC,EAAE,cAAc,GAClC,YAAY,CAAC;AAEhB,wBAAgB,MAAM,CACpB,CAAC,SAAS,OAAO,GAAG,OAAO,OAAO,EAClC,SAAS,SAAS,OAAO,GAAG,gBAAgB,GAAG,WAAW,EAC1D,WAAW,SAAS,OAAO,GAAG,gBAAgB,GAAG,SAAS,EAE1D,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,SAAS,CAAC,EACxE,kBAAkB,CAAC,EAAE,cAAc,GAClC,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AAmB3C,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,SAIhD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,UAAU,WAAW,EAAE,eAAe,WAAW,SAK5E,CAAC;AAEF,eAAO,MAAM,kBAAkB,iDAE7B,CAAC"}
|
package/lib/utils/utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { fireEvent, render as rtlRender } from '@testing-library/react';
|
|
3
3
|
import userEvent, { PointerEventsCheckLevel } from '@testing-library/user-event';
|
|
4
|
-
import { Configuration, LiveLog, ModalManager, PopoverManager, Toaster } from '@pega/cosmos-react-core';
|
|
5
|
-
const Providers = (configurationProps) => ({ children }) => (_jsx(Configuration, { ...configurationProps, children: _jsx(LiveLog, { children: _jsx(PopoverManager, { children: _jsx(Toaster, { children: _jsx(ModalManager, { children: children }) }) }) }) }));
|
|
4
|
+
import { Configuration, LiveLog, ModalManager, PopoverManager, PreviewManager, Toaster } from '@pega/cosmos-react-core';
|
|
5
|
+
const Providers = (configurationProps) => ({ children }) => (_jsx(Configuration, { ...configurationProps, children: _jsx(LiveLog, { children: _jsx(PopoverManager, { children: _jsx(PreviewManager, { children: _jsx(Toaster, { children: _jsx(ModalManager, { children: children }) }) }) }) }) }));
|
|
6
6
|
export function render(content, options = {}, configurationProps) {
|
|
7
7
|
return rtlRender(content, {
|
|
8
8
|
...options,
|
package/lib/utils/utils.js.map
CHANGED
|
@@ -1 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AC,aAAa,CAAC,CAAC;IAClC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC,KAAK,CAAC;IAChD,kBAAkB,EAAE,uBAAuB,CAAC,KAAK;CAClD,CAAC,CAAC","sourcesContent":["import type { ReactElement } from 'react';\nimport { fireEvent, render as rtlRender } from '@testing-library/react';\nimport type { RenderOptions, RenderResult } from '@testing-library/react';\nimport type { queries, Queries } from '@testing-library/dom';\nimport userEvent, { PointerEventsCheckLevel } from '@testing-library/user-event';\n\nimport {\n Configuration,\n LiveLog,\n ModalManager,\n PopoverManager,\n Toaster\n} from '@pega/cosmos-react-core';\nimport type { ConfigurationProps, OmitStrict } from '@pega/cosmos-react-core';\n\ntype ProvidersProps = OmitStrict<ConfigurationProps, 'children'>;\n\nconst Providers =\n (configurationProps?: ProvidersProps) =>\n ({ children }: { children: ReactElement }) => (\n <Configuration {...configurationProps}>\n <LiveLog>\n <PopoverManager>\n <
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxE,OAAO,SAAS,EAAE,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEjF,OAAO,EACL,aAAa,EACb,OAAO,EACP,YAAY,EACZ,cAAc,EACd,cAAc,EACd,OAAO,EACR,MAAM,yBAAyB,CAAC;AAKjC,MAAM,SAAS,GACb,CAAC,kBAAmC,EAAE,EAAE,CACxC,CAAC,EAAE,QAAQ,EAA8B,EAAE,EAAE,CAAC,CAC5C,KAAC,aAAa,OAAK,kBAAkB,YACnC,KAAC,OAAO,cACN,KAAC,cAAc,cACb,KAAC,cAAc,cACb,KAAC,OAAO,cACN,KAAC,YAAY,cAAE,QAAQ,GAAgB,GAC/B,GACK,GACF,GACT,GACI,CACjB,CAAC;AAmBJ,MAAM,UAAU,MAAM,CAKpB,OAAqB,EACrB,UAEsE,EAAE,EACxE,kBAAmC;IAEnC,OAAO,SAAS,CAAC,OAAO,EAAE;QACxB,GAAG,OAAO;QACV,OAAO,EAAE,SAAS,CAAC,kBAAkB,CAAC;KACtB,CAA2D,CAAC;AAChF,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE;IACnD,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC;IACtB,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC;IACvB,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAqB,EAAE,aAA0B,EAAE,EAAE;IAC/E,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B,SAAS,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACnC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAClC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC,KAAK,CAAC;IAChD,kBAAkB,EAAE,uBAAuB,CAAC,KAAK;CAClD,CAAC,CAAC","sourcesContent":["import type { ReactElement } from 'react';\nimport { fireEvent, render as rtlRender } from '@testing-library/react';\nimport type { RenderOptions, RenderResult } from '@testing-library/react';\nimport type { queries, Queries } from '@testing-library/dom';\nimport userEvent, { PointerEventsCheckLevel } from '@testing-library/user-event';\n\nimport {\n Configuration,\n LiveLog,\n ModalManager,\n PopoverManager,\n PreviewManager,\n Toaster\n} from '@pega/cosmos-react-core';\nimport type { ConfigurationProps, OmitStrict } from '@pega/cosmos-react-core';\n\ntype ProvidersProps = OmitStrict<ConfigurationProps, 'children'>;\n\nconst Providers =\n (configurationProps?: ProvidersProps) =>\n ({ children }: { children: ReactElement }) => (\n <Configuration {...configurationProps}>\n <LiveLog>\n <PopoverManager>\n <PreviewManager>\n <Toaster>\n <ModalManager>{children}</ModalManager>\n </Toaster>\n </PreviewManager>\n </PopoverManager>\n </LiveLog>\n </Configuration>\n );\n\n// Overloads adapted from types for RTL render.\nexport function render(\n content: ReactElement,\n options?: OmitStrict<RenderOptions, 'wrapper' | 'queries'>,\n configurationProps?: ProvidersProps\n): RenderResult;\n\nexport function render<\n Q extends Queries = typeof queries,\n Container extends Element | DocumentFragment = HTMLElement,\n BaseElement extends Element | DocumentFragment = Container\n>(\n content: ReactElement,\n options: OmitStrict<RenderOptions<Q, Container, BaseElement>, 'wrapper'>,\n configurationProps?: ProvidersProps\n): RenderResult<Q, Container, BaseElement>;\n\nexport function render<\n Q extends Queries = typeof queries,\n Container extends Element | DocumentFragment = HTMLElement,\n BaseElement extends Element | DocumentFragment = Container\n>(\n content: ReactElement,\n options:\n | OmitStrict<RenderOptions, 'wrapper' | 'queries'>\n | OmitStrict<RenderOptions<Q, Container, BaseElement>, 'wrapper'> = {},\n configurationProps?: ProvidersProps\n) {\n return rtlRender(content, {\n ...options,\n wrapper: Providers(configurationProps)\n } as RenderOptions) as RenderResult | RenderResult<Q, Container, BaseElement>;\n}\n\nexport const resizeWindow = (x: number, y: number) => {\n window.innerWidth = x;\n window.innerHeight = y;\n window.dispatchEvent(new Event('resize'));\n};\n\nexport const dragElement = (originEl: HTMLElement, destinationEl: HTMLElement) => {\n fireEvent.dragStart(originEl);\n fireEvent.dragEnter(destinationEl);\n fireEvent.dragOver(destinationEl);\n fireEvent.drop(destinationEl);\n};\n\nexport const userEventNoPointer = userEvent.setup({\n pointerEventsCheck: PointerEventsCheckLevel.Never\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-test-utils",
|
|
3
|
-
"version": "9.0.0-build.
|
|
3
|
+
"version": "9.0.0-build.24.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"sideEffects": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "tsc -b tsconfig.build.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@pega/cosmos-react-core": "9.0.0-build.
|
|
20
|
+
"@pega/cosmos-react-core": "9.0.0-build.24.0",
|
|
21
21
|
"@testing-library/dom": "^10.3.0",
|
|
22
22
|
"@testing-library/react": "^16.0.0",
|
|
23
23
|
"@testing-library/user-event": "^14.6.1",
|