@shopgate/pwa-ui-ios 7.31.5 → 7.31.6

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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-ui-ios",
3
- "version": "7.31.5",
3
+ "version": "7.31.6",
4
4
  "description": "Shopgate's iOS UI components.",
5
5
  "main": "index.js",
6
6
  "license": "Apache-2.0",
7
7
  "devDependencies": {
8
- "@shopgate/pwa-common": "7.31.5",
8
+ "@shopgate/pwa-common": "7.31.6",
9
9
  "react": "^17.0.2"
10
10
  },
11
11
  "peerDependencies": {
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Button from '@shopgate/pwa-ui-shared/Button';
4
- import Buttons from "./index";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- const actions = [{
7
- label: 'action0',
8
- action: jest.fn()
9
- }, {
10
- label: 'action1',
11
- action: jest.fn()
12
- }, {
13
- label: 'action2',
14
- action: jest.fn()
15
- }];
16
- describe('<Buttons />', () => {
17
- it('should not render if no actions are passed', () => {
18
- const wrapper = shallow(/*#__PURE__*/_jsx(Buttons, {}));
19
- expect(wrapper).toMatchSnapshot();
20
- expect(wrapper.instance()).toEqual(null);
21
- });
22
- it('should render buttons', () => {
23
- const wrapper = shallow(/*#__PURE__*/_jsx(Buttons, {
24
- actions: actions
25
- }));
26
- expect(wrapper).toMatchSnapshot();
27
- expect(wrapper.find(Button).length).toBe(actions.length);
28
- });
29
- });
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Content from "./index";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- describe('<Content />', () => {
6
- it('should not render if no content is passed', () => {
7
- const wrapper = shallow(/*#__PURE__*/_jsx(Content, {}));
8
- expect(wrapper).toMatchSnapshot();
9
- expect(wrapper.instance()).toEqual(null);
10
- });
11
- it('should render content components', () => {
12
- const wrapper = shallow(/*#__PURE__*/_jsx(Content, {
13
- content: "Hello World"
14
- }));
15
- expect(wrapper).toMatchSnapshot();
16
- expect(wrapper.find('[id="basicDialogDesc"]').length).toBe(1);
17
- });
18
- });
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Title from "./index";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- describe('<Title />', () => {
6
- it('should not render without a title', () => {
7
- const wrapper = shallow(/*#__PURE__*/_jsx(Title, {}));
8
- expect(wrapper).toMatchSnapshot();
9
- expect(wrapper.instance()).toEqual(null);
10
- });
11
- it('should render with a title', () => {
12
- const wrapper = shallow(/*#__PURE__*/_jsx(Title, {
13
- title: "Some test title"
14
- }));
15
- expect(wrapper).toMatchSnapshot();
16
- expect(wrapper.find('[id="basicDialogTitle"]').length).toBe(1);
17
- });
18
- });
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Title from "./components/Title";
4
- import Content from "./components/Content";
5
- import Buttons from "./components/Buttons";
6
- import BasicDialog from "./index";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- const props = {
9
- title: 'Hello World',
10
- children: /*#__PURE__*/_jsx("div", {
11
- children: "Hello World"
12
- }),
13
- actions: [{
14
- label: 'action0',
15
- action: jest.fn()
16
- }, {
17
- label: 'action1',
18
- action: jest.fn()
19
- }, {
20
- label: 'action2',
21
- action: jest.fn()
22
- }]
23
- };
24
- jest.mock('@shopgate/engage/a11y/components');
25
- describe('<BasicDialog />', () => {
26
- it('should render with minimal props', () => {
27
- const wrapper = shallow(/*#__PURE__*/_jsx(BasicDialog, {
28
- actions: []
29
- }));
30
- expect(wrapper).toMatchSnapshot();
31
- });
32
- it('should render as expected', () => {
33
- const wrapper = shallow(/*#__PURE__*/_jsx(BasicDialog, {
34
- ...props
35
- }));
36
- expect(wrapper).toMatchSnapshot();
37
- expect(wrapper.find(Title).length).toBe(1);
38
- expect(wrapper.find(Title).props().title).toEqual(props.title);
39
- expect(wrapper.find(Content).length).toBe(1);
40
- expect(wrapper.find(Content).props().content).toEqual(props.children);
41
- expect(wrapper.find(Buttons).length).toBe(1);
42
- expect(wrapper.find(Buttons).props().actions).toEqual(props.actions);
43
- });
44
- });
@@ -1,16 +0,0 @@
1
- {
2
- "extends": "@shopgate/engage/tsconfig.build.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "."
6
- },
7
- "include": ["**/*.ts", "**/*.tsx"],
8
- "exclude": [
9
- "dist",
10
- "node_modules",
11
- "**/*.spec.*",
12
- "**/__tests__/**",
13
- "**/__snapshots__/**",
14
- "coverage"
15
- ]
16
- }
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@shopgate/engage/tsconfig.json",
3
- }