@shopgate/pwa-ui-material 6.22.0-beta.2 → 6.22.0-beta.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/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-ui-material",
3
- "version": "6.22.0-beta.2",
3
+ "version": "6.22.0-beta.4",
4
4
  "description": "Shopgate's material design UI components.",
5
5
  "main": "index.js",
6
6
  "license": "Apache-2.0",
7
7
  "devDependencies": {
8
- "@shopgate/pwa-common": "6.22.0-beta.2",
8
+ "@shopgate/pwa-common": "6.22.0-beta.4",
9
9
  "react": "~16.12.0",
10
10
  "react-dom": "~16.12.0",
11
11
  "redux": "^4.0.1"
@@ -1 +0,0 @@
1
- import React from'react';import{shallow}from'enzyme';import NavDrawerItem from"../Item";import NavDrawerDivider from"../Divider";import NavDrawerTitle from"../Title";import NavDrawerSection from"./index";describe('<NavDrawerSection />',function(){it('should render with a title and dividers',function(){var sectionTitle='Section title';var itemLabel='Item Label';var wrapper=shallow(/*#__PURE__*/React.createElement(NavDrawerSection,{title:sectionTitle,dividerTop:true,dividerBottom:true},/*#__PURE__*/React.createElement(NavDrawerItem,{label:itemLabel})));expect(wrapper).toMatchSnapshot();expect(wrapper.find(NavDrawerDivider)).toHaveLength(2);expect(wrapper.find(NavDrawerTitle).prop('text')).toBe(sectionTitle);expect(wrapper.find(NavDrawerItem).prop('label')).toBe(itemLabel);});it('should render without a title and one divider at the top',function(){var itemLabel='Item Label';var wrapper=shallow(/*#__PURE__*/React.createElement(NavDrawerSection,null,/*#__PURE__*/React.createElement(NavDrawerItem,{label:itemLabel})));expect(wrapper.find(NavDrawerDivider)).toHaveLength(1);expect(wrapper.find(NavDrawerTitle).prop('text')).toBe('');expect(wrapper.find(NavDrawerItem).prop('label')).toBe(itemLabel);});it('should render without a title and one divider at the top',function(){var itemLabel='Item Label';var wrapper=shallow(/*#__PURE__*/React.createElement(NavDrawerSection,{dividerTop:false,dividerBottom:true},/*#__PURE__*/React.createElement(NavDrawerItem,{label:itemLabel})));expect(wrapper.find(NavDrawerDivider)).toHaveLength(1);expect(wrapper.find(NavDrawerTitle).prop('text')).toBe('');expect(wrapper.find(NavDrawerItem).prop('label')).toBe(itemLabel);});it('should render without a title and dividers',function(){var itemLabel='Item Label';var wrapper=shallow(/*#__PURE__*/React.createElement(NavDrawerSection,{dividerTop:false},/*#__PURE__*/React.createElement(NavDrawerItem,{label:itemLabel})));expect(wrapper.find(NavDrawerDivider)).toHaveLength(0);expect(wrapper.find(NavDrawerTitle).prop('text')).toBe('');expect(wrapper.find(NavDrawerItem).prop('label')).toBe(itemLabel);});it('should not render without children',function(){var wrapper=shallow(/*#__PURE__*/React.createElement(NavDrawerSection,null));expect(wrapper.isEmptyRender()).toBe(true);});});
@@ -1 +0,0 @@
1
- import React from'react';import{mount}from'enzyme';import NavDrawerTitle from"./index";describe('<NavDrawerTitle />',function(){it('should render when a text is passed within the props',function(){var title='Title';var wrapper=mount(/*#__PURE__*/React.createElement(NavDrawerTitle,{text:title}));expect(wrapper).toMatchSnapshot();expect(wrapper.text()).toEqual(title);expect(wrapper.find('Translate').prop('string')).toEqual(title);});it('should not render when no text is passed within the props',function(){var wrapper=mount(/*#__PURE__*/React.createElement(NavDrawerTitle,null));expect(wrapper).toMatchSnapshot();expect(wrapper.isEmptyRender()).toBe(true);});});