@pega/cosmos-react-test-utils 5.0.0-dev.5.0 → 5.0.0-dev.6.1

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.
@@ -1,6 +1,6 @@
1
- import { ReactElement } from 'react';
2
- import { type RenderOptions as RTLRenderOptions } from '@testing-library/react';
3
- import { ConfigurationProps, OmitStrict } from '@pega/cosmos-react-core';
1
+ import type { ReactElement } from 'react';
2
+ import type { RenderOptions as RTLRenderOptions } from '@testing-library/react';
3
+ import type { ConfigurationProps, OmitStrict } from '@pega/cosmos-react-core';
4
4
  interface RenderOptions {
5
5
  rtlRenderOptions?: RTLRenderOptions;
6
6
  configurationProps?: OmitStrict<ConfigurationProps, 'children'>;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAEL,KAAK,aAAa,IAAI,gBAAgB,EACvC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,kBAAkB,EAElB,UAAU,EAGX,MAAM,yBAAyB,CAAC;AAEjC,UAAU,aAAa;IACrB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,kBAAkB,CAAC,EAAE,UAAU,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;CACjE;AAED,eAAO,MAAM,MAAM,YAAa,YAAY,YAAW,aAAa,iIAWnE,CAAC;AAEF,eAAO,MAAM,YAAY,MAAO,MAAM,KAAK,MAAM,SAIhD,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,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE9E,UAAU,aAAa;IACrB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,kBAAkB,CAAC,EAAE,UAAU,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;CACjE;AAED,eAAO,MAAM,MAAM,YAAa,YAAY,YAAW,aAAa,iIAWnE,CAAC;AAEF,eAAO,MAAM,YAAY,MAAO,MAAM,KAAK,MAAM,SAIhD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,MAAM,IAAI,SAAS,EAEpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,aAAa,EAEb,YAAY,EAEZ,cAAc,EACd,OAAO,EACR,MAAM,yBAAyB,CAAC;AAOjC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAqB,EAAE,UAAyB,EAAE,EAAE,EAAE;IAC3E,OAAO,SAAS,CACd,KAAC,aAAa,OAAK,OAAO,CAAC,kBAAkB,YAC3C,KAAC,cAAc,cACb,KAAC,OAAO,IAAC,YAAY,EAAE,IAAI,YACzB,KAAC,YAAY,cAAE,OAAO,GAAgB,GAC9B,GACK,GACH,EAChB,OAAO,CAAC,gBAAgB,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,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","sourcesContent":["import { ReactElement } from 'react';\nimport {\n render as rtlRender,\n type RenderOptions as RTLRenderOptions\n} from '@testing-library/react';\n\nimport {\n Configuration,\n ConfigurationProps,\n ModalManager,\n OmitStrict,\n PopoverManager,\n Toaster\n} from '@pega/cosmos-react-core';\n\ninterface RenderOptions {\n rtlRenderOptions?: RTLRenderOptions;\n configurationProps?: OmitStrict<ConfigurationProps, 'children'>;\n}\n\nexport const render = (content: ReactElement, options: RenderOptions = {}) => {\n return rtlRender(\n <Configuration {...options.configurationProps}>\n <PopoverManager>\n <Toaster dismissAfter={5000}>\n <ModalManager>{content}</ModalManager>\n </Toaster>\n </PopoverManager>\n </Configuration>,\n options.rtlRenderOptions\n );\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"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAQ/F,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAqB,EAAE,UAAyB,EAAE,EAAE,EAAE;IAC3E,OAAO,SAAS,CACd,KAAC,aAAa,OAAK,OAAO,CAAC,kBAAkB,YAC3C,KAAC,cAAc,cACb,KAAC,OAAO,IAAC,YAAY,EAAE,IAAI,YACzB,KAAC,YAAY,cAAE,OAAO,GAAgB,GAC9B,GACK,GACH,EAChB,OAAO,CAAC,gBAAgB,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,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","sourcesContent":["import type { ReactElement } from 'react';\nimport { render as rtlRender } from '@testing-library/react';\nimport type { RenderOptions as RTLRenderOptions } from '@testing-library/react';\n\nimport { Configuration, ModalManager, PopoverManager, Toaster } from '@pega/cosmos-react-core';\nimport type { ConfigurationProps, OmitStrict } from '@pega/cosmos-react-core';\n\ninterface RenderOptions {\n rtlRenderOptions?: RTLRenderOptions;\n configurationProps?: OmitStrict<ConfigurationProps, 'children'>;\n}\n\nexport const render = (content: ReactElement, options: RenderOptions = {}) => {\n return rtlRender(\n <Configuration {...options.configurationProps}>\n <PopoverManager>\n <Toaster dismissAfter={5000}>\n <ModalManager>{content}</ModalManager>\n </Toaster>\n </PopoverManager>\n </Configuration>,\n options.rtlRenderOptions\n );\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-test-utils",
3
- "version": "5.0.0-dev.5.0",
3
+ "version": "5.0.0-dev.6.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/pegasystems/cosmos-react.git",
@@ -22,7 +22,7 @@
22
22
  "build": "tsc -b"
23
23
  },
24
24
  "dependencies": {
25
- "@pega/cosmos-react-core": "5.0.0-dev.5.0",
25
+ "@pega/cosmos-react-core": "5.0.0-dev.6.1",
26
26
  "@testing-library/react": "^12.1.3",
27
27
  "@types/jest": "^29.5.1",
28
28
  "@types/react": "^17.0.62",