diff --git a/package.json b/package.json
index 8a66d38a8a..b92d56b464 100644
--- a/package.json
+++ b/package.json
@@ -36,12 +36,12 @@
"devDependencies": {
"babel": "^6.23.0",
"babel-core": "^6.23.1",
- "babel-loader": "^6.3.2",
- "webpack": "^2.2.1",
"babel-eslint": "^7.1.1",
"babel-jest": "^19.0.0",
+ "babel-loader": "^6.3.2",
"babel-preset-react-native": "^1.9.1",
"enzyme": "^2.7.1",
+ "enzyme-to-json": "^1.5.0",
"eslint": "^3.17.1",
"eslint-plugin-react": "^6.10.0",
"eslint-plugin-react-native": "^2.3.1",
@@ -50,7 +50,8 @@
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"react-native": "^0.41.2",
- "react-native-vector-icons": "^4.0.0"
+ "react-native-vector-icons": "^4.0.0",
+ "webpack": "^2.2.1"
},
"jest": {
"preset": "react-native",
diff --git a/src/avatar/__tests__/Avatar.js b/src/avatar/__tests__/Avatar.js
index 47642c58df..288d6a0005 100644
--- a/src/avatar/__tests__/Avatar.js
+++ b/src/avatar/__tests__/Avatar.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Avatar from '../Avatar';
describe('Badge Component', () => {
@@ -7,7 +8,7 @@ describe('Badge Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render small avatar', () => {
@@ -20,7 +21,7 @@ describe('Badge Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render medium avatar', () => {
@@ -32,7 +33,7 @@ describe('Badge Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render large avatar', () => {
@@ -44,7 +45,7 @@ describe('Badge Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render xlarge avatar', () => {
@@ -56,7 +57,7 @@ describe('Badge Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render avatar without width', () => {
@@ -68,7 +69,7 @@ describe('Badge Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render avatar without height', () => {
@@ -79,6 +80,6 @@ describe('Badge Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/avatar/__tests__/__snapshots__/Avatar.js.snap b/src/avatar/__tests__/__snapshots__/Avatar.js.snap
index a2f42d3b54..101fca6491 100644
--- a/src/avatar/__tests__/__snapshots__/Avatar.js.snap
+++ b/src/avatar/__tests__/__snapshots__/Avatar.js.snap
@@ -1,2146 +1,394 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Badge Component should render avatar without height 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
- avatar title
-
-
-,
- "nodes": Array [
-
+
-
-
- avatar title
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 13,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "title": "avatar title",
- "titleStyle": Object {
- "color": "red",
+ Array [
+ Object {
+ "backgroundColor": "rgba(0,0,0,0)",
+ "color": "#ffffff",
+ "fontSize": 40,
+ "textAlign": "center",
},
- "width": 80,
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 7,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
- avatar title
-
-
-,
- "_debugID": 14,
- "_renderedOutput":
-
-
- avatar title
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ },
+ ]
+ }
+ >
+ avatar title
+
+
+
`;
exports[`Badge Component should render avatar without width 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
+
-
-
-,
- "nodes": Array [
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 11,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 0.7,
- "avatarStyle": Object {
- "backgroundColor": "peru",
- },
- "height": 90,
- "source": Object {
- "uri": "https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg",
+ style={
+ Array [
+ Object {
+ "height": 90,
+ "width": 90,
},
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 6,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-,
- "_debugID": 12,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ },
+ ]
+ }
+ />
+
+
`;
exports[`Badge Component should render large avatar 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-
-,
- "nodes": Array [
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 7,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 0.7,
- "icon": Object {
- "color": "blue",
- "name": "name",
- "size": 22,
- "type": "type",
- },
- "large": true,
- "rounded": true,
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-
-
-,
- "_debugID": 8,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ >
+
+
+
`;
exports[`Badge Component should render medium avatar 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
+
-
-
-,
- "nodes": Array [
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 0.7,
- "medium": true,
- "rounded": true,
- "source": Object {
- "uri": "https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg",
+ style={
+ Array [
+ Object {
+ "height": 50,
+ "width": 50,
},
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 3,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-,
- "_debugID": 6,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ Object {
+ "borderRadius": 25,
+ },
+ undefined,
+ ]
+ }
+ />
+
+
`;
exports[`Badge Component should render small avatar 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
+
-
-
-,
- "nodes": Array [
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 0.7,
- "avatarStyle": Object {
- "backgroundColor": "peru",
+ style={
+ Array [
+ Object {
+ "height": 34,
+ "width": 34,
},
- "rounded": true,
- "small": true,
- "source": Object {
- "uri": "https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg",
+ Object {
+ "borderRadius": 17,
},
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 2,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ },
+ ]
+ }
+ />
+
+
`;
exports[`Badge Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+
+
`;
exports[`Badge Component should render xlarge avatar 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
- avatar title
-
-
-,
- "nodes": Array [
-
+
-
-
- avatar title
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 9,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 0.7,
- "rounded": true,
- "title": "avatar title",
- "xlarge": true,
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 5,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
- avatar title
-
-
-,
- "_debugID": 10,
- "_renderedOutput":
-
-
- avatar title
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ >
+ avatar title
+
+
+
`;
diff --git a/src/badge/__tests__/__snapshots__/badge.js.snap b/src/badge/__tests__/__snapshots__/badge.js.snap
index ec603ba3f3..6d03d95089 100644
--- a/src/badge/__tests__/__snapshots__/badge.js.snap
+++ b/src/badge/__tests__/__snapshots__/badge.js.snap
@@ -1,310 +1,45 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Badge Component should render badge.element if included 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- }
- }
-/>,
- "_debugID": 4,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "badge": Object {
- "element": ,
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 3,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement": ,
- "_debugID": 5,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
- }
- }
-/>,
-}
+
`;
exports[`Badge Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "badge": Object {},
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+
+
`;
diff --git a/src/badge/__tests__/badge.js b/src/badge/__tests__/badge.js
index 9dca0cfaf4..4993179731 100644
--- a/src/badge/__tests__/badge.js
+++ b/src/badge/__tests__/badge.js
@@ -1,6 +1,7 @@
import React from 'react';
import { Text } from 'react-native';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Badge from '../badge';
describe('Badge Component', () => {
@@ -8,7 +9,7 @@ describe('Badge Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should throw Error is badge is not sent', () => {
@@ -22,7 +23,7 @@ describe('Badge Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
expect(component.props().title).toBe('foo');
});
});
diff --git a/src/buttons/__tests__/Button.js b/src/buttons/__tests__/Button.js
index 27964aaaad..5e909ed4c8 100644
--- a/src/buttons/__tests__/Button.js
+++ b/src/buttons/__tests__/Button.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Button from '../Button';
import colors from '../../config/colors';
@@ -8,7 +9,7 @@ describe('Button Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should show loading indicator', () => {
@@ -119,7 +120,7 @@ describe('Button Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with default icon', () => {
@@ -128,6 +129,6 @@ describe('Button Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/buttons/__tests__/ButtonGroup.js b/src/buttons/__tests__/ButtonGroup.js
index 4a2a37b640..ae4d203e8c 100644
--- a/src/buttons/__tests__/ButtonGroup.js
+++ b/src/buttons/__tests__/ButtonGroup.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import ButtonGroup from '../ButtonGroup';
const buttons = ['Button 1', 'Button 2', 'Button 3'];
@@ -10,7 +11,7 @@ describe('ButtonGroup Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have onPress event', () => {
@@ -23,7 +24,7 @@ describe('ButtonGroup Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render selectedIndex', () => {
@@ -35,7 +36,7 @@ describe('ButtonGroup Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with button.element', () => {
@@ -45,6 +46,6 @@ describe('ButtonGroup Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/buttons/__tests__/__snapshots__/Button.js.snap b/src/buttons/__tests__/__snapshots__/Button.js.snap
index f3d86da684..5682705150 100644
--- a/src/buttons/__tests__/__snapshots__/Button.js.snap
+++ b/src/buttons/__tests__/__snapshots__/Button.js.snap
@@ -1,1179 +1,205 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Button Component should render with default icon 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 25,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "icon": Object {
- "iconRight": true,
- "name": "wifi",
- "size": 22,
- "style": Object {
- "fontSize": 20,
- },
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+
-
-
-
-
-,
- "_debugID": 26,
- "_renderedOutput":
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ >
+
+
+
+
`;
exports[`Button Component should render with icon type 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 23,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "icon": Object {
- "name": "acrobat",
- "type": "zocial",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+
-
-
-
-
-,
- "_debugID": 24,
- "_renderedOutput":
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ >
+
+
+
+
`;
exports[`Button Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-
-,
- "nodes": Array [
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ Object {
+ "padding": 12,
+ },
+ undefined,
+ undefined,
+ undefined,
+ ]
+ }
+ >
+
+
+
`;
diff --git a/src/buttons/__tests__/__snapshots__/ButtonGroup.js.snap b/src/buttons/__tests__/__snapshots__/ButtonGroup.js.snap
index 3bf67bbf1e..089e7b0937 100644
--- a/src/buttons/__tests__/__snapshots__/ButtonGroup.js.snap
+++ b/src/buttons/__tests__/__snapshots__/ButtonGroup.js.snap
@@ -1,2826 +1,586 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ButtonGroup Component should have onPress event 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- "nodes": Array [
-
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "buttonStyle": Object {
- "backgroundColor": "blue",
- },
- "buttons": Array [
- "Button 1",
- "Button 2",
- "Button 3",
- ],
- "containerStyle": Object {
- "backgroundColor": "yellow",
- },
- "onPress": [Function],
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+ Button 1
+
+
+
+
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+
+
+ Button 2
+
+
+
+ ,
-}
-`;
-
-exports[`ButtonGroup Component should render selectedIndex 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- "nodes": Array [
-
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "buttons": Array [
- "Button 1",
- "Button 2",
- "Button 3",
- ],
- "selectedBackgroundColor": "red",
- "selectedIndex": 1,
- "selectedTextStyle": Object {
- "fontSize": 12,
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+ Button 3
+
+
+
+
+`;
+
+exports[`ButtonGroup Component should render selectedIndex 1`] = `
+
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- "_debugID": 6,
- "_renderedOutput":
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
-`;
-
-exports[`ButtonGroup Component should render with button.element 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
-
-
-
-
-
-
-
-
-
-
-,
- "nodes": Array [
+ >
+ Button 1
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 7,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "buttons": Array [
+ >
+
-
-
-
-
-
-
-
-
-
-
-,
- "_debugID": 8,
- "_renderedOutput":
-
-
-
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ Button 2
+
+
+
+
+
+
+ Button 3
+
+
+
+
+`;
+
+exports[`ButtonGroup Component should render with button.element 1`] = `
+
+
+
+
+
+
+ ,
-}
+ underlayColor="#ffffff"
+ >
+
+
+
+
+
`;
exports[`ButtonGroup Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- "nodes": Array [
+ >
+ Button 1
+
+
+
+
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+ ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "buttons": Array [
- "Button 1",
- "Button 2",
- "Button 3",
- ],
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+ >
+ Button 2
+
+
+
+
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
- Button 1
-
-
-
-
-
-
- Button 2
-
-
-
-
-
-
- Button 3
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+
+ ,
-}
+ }
+ >
+ Button 3
+
+
+
+
`;
diff --git a/src/checkbox/__tests__/CheckBox.js b/src/checkbox/__tests__/CheckBox.js
index 7f7fee7b10..5924ea400f 100644
--- a/src/checkbox/__tests__/CheckBox.js
+++ b/src/checkbox/__tests__/CheckBox.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import CheckBox from '../CheckBox';
describe('CheckBox Component', () => {
@@ -7,7 +8,7 @@ describe('CheckBox Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should use TouchableOpacity as default component', () => {
@@ -37,7 +38,7 @@ describe('CheckBox Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with icon and iconRight', () => {
@@ -50,6 +51,6 @@ describe('CheckBox Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/checkbox/__tests__/__snapshots__/CheckBox.js.snap b/src/checkbox/__tests__/__snapshots__/CheckBox.js.snap
index b7bf8628c0..392849961c 100644
--- a/src/checkbox/__tests__/__snapshots__/CheckBox.js.snap
+++ b/src/checkbox/__tests__/__snapshots__/CheckBox.js.snap
@@ -1,976 +1,173 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`CheckBox Component should render with icon and checked 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 9,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "center": false,
- "checked": false,
- "checkedColor": "red",
- "checkedIcon": "check-square-o",
- "containerStyle": Object {
- "backgroundColor": "red",
- },
- "iconRight": false,
- "iconType": "font-awesome",
- "right": false,
- "uncheckedColor": "#bfbfbf",
- "uncheckedIcon": "square-o",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-
-
-
-,
- "_debugID": 10,
- "_renderedOutput":
-
-
-
-
-,
+ Object {
+ "backgroundColor": "red",
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ ,
-}
+ >
+
+
+
+
`;
exports[`CheckBox Component should render with icon and iconRight 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
-
-
-,
- "nodes": Array [
-
+
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 11,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "center": true,
- "checked": false,
- "checkedColor": "green",
- "checkedIcon": "check-square-o",
- "iconRight": true,
- "iconType": "font-awesome",
- "right": false,
- "rigth": true,
- "uncheckedColor": "blue",
- "uncheckedIcon": "square-o",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 6,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-
-,
- "_debugID": 12,
- "_renderedOutput":
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
+
`;
exports[`CheckBox Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
-
-
-,
- "nodes": Array [
-
+
+
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "center": false,
- "checked": false,
- "checkedColor": "green",
- "checkedIcon": "check-square-o",
- "iconRight": false,
- "right": false,
- "uncheckedColor": "#bfbfbf",
- "uncheckedIcon": "square-o",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 1,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
`;
diff --git a/src/containers/__tests__/Card.js b/src/containers/__tests__/Card.js
index 53f7ea49d7..8934c7523e 100644
--- a/src/containers/__tests__/Card.js
+++ b/src/containers/__tests__/Card.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Card from '../Card';
describe('Card Component', () => {
@@ -7,7 +8,7 @@ describe('Card Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have Card title without image', () => {
@@ -20,7 +21,7 @@ describe('Card Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have Card title with image', () => {
@@ -33,7 +34,7 @@ describe('Card Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have Card with featured title', () => {
@@ -50,6 +51,6 @@ describe('Card Component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/containers/__tests__/__snapshots__/Card.js.snap b/src/containers/__tests__/__snapshots__/Card.js.snap
index fceffaeb3b..ec9d1c2faa 100644
--- a/src/containers/__tests__/__snapshots__/Card.js.snap
+++ b/src/containers/__tests__/__snapshots__/Card.js.snap
@@ -1,1937 +1,387 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Card Component should have Card title with image 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+
-
-
-
- HELLO WORLD
-
-
-
-
-
-
-
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
- HELLO WORLD
-
-
-
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+
+
+
+
+
+ ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "containerStyle": Object {
- "backgroundColor": "red",
- },
- "fontFamily": "arial",
- "image": Object {
- "uri": "https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg",
- },
- "title": "HELLO WORLD",
- "titleStyle": Object {
- "backgroundColor": "red",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+ />
+
+
+
+`;
+
+exports[`Card Component should have Card title without image 1`] = `
+
-
-
-
- HELLO WORLD
-
-
-
-
-
-
-
-
-
-
-
-,
- "_debugID": 6,
- "_renderedOutput":
-
-
-
- HELLO WORLD
-
-
-
-
-
-
-
-
-
-
-
-,
+ undefined,
+ Object {
+ "backgroundColor": "red",
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ ,
-}
-`;
-
-exports[`Card Component should have Card title without image 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
-
-
-
- Card Title
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
- Card Title
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+ ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "containerStyle": Object {
- "backgroundColor": "red",
- },
- "dividerStyle": Object {
- "backgroundColor": "red",
- },
- "flexDirection": "row",
- "fontFamily": "arial",
- "title": "Card Title",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+ />
+
+
+
+`;
+
+exports[`Card Component should have Card with featured title 1`] = `
+
-
-
-
- Card Title
-
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
-
- Card Title
-
-
-
-
-,
+ Object {
+ "padding": 0,
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ ,
-}
-`;
-
-exports[`Card Component should have Card with featured title 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+ }
+ >
+ foo title
+
+
+
+
+
-
-
- foo title
-
-
-
-
-
-
- featured title
-
-
- featured sub title
-
-
-
-
-
-
-,
- "nodes": Array [
-
-
+ featured title
+
+
-
-
- foo title
-
-
-
-
-
-
- featured title
-
-
- featured sub title
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 7,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "featuredSubtitle": "featured sub title",
- "featuredSubtitleStyle": Object {
- "backgroundColor": "red",
- },
- "featuredTitle": "featured title",
- "featuredTitleStyle": Object {
- "backgroundColor": "red",
- },
- "image": Object {
- "uri": "https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg",
- },
- "imageStyle": Object {
- "backgroundColor": "red",
- },
- "imageWrapperStyle": Object {
- "backgroundColor": "red",
- },
- "title": "foo title",
- "wrapperStyle": Object {
- "backgroundColor": "red",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 4,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
- foo title
-
-
-
-
-
-
- featured title
-
-
- featured sub title
-
-
-
-
-
-
-,
- "_debugID": 8,
- "_renderedOutput":
-
-
-
- foo title
-
-
-
-
-
-
- featured title
-
-
- featured sub title
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
-`;
-
-exports[`Card Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+
-
-
+ />
-,
- "nodes": Array [
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+
+
+`;
+
+exports[`Card Component should render without issues 1`] = `
+
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+
+
`;
diff --git a/src/divider/__tests__/Divider.js b/src/divider/__tests__/Divider.js
index 3861483bfb..bc94c5213a 100644
--- a/src/divider/__tests__/Divider.js
+++ b/src/divider/__tests__/Divider.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Divider from '../Divider';
describe('Divider Component', () => {
@@ -7,14 +8,14 @@ describe('Divider Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with style', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
expect(component.props().style.length).toBe(2);
expect(component.props().style[1].backgroundColor).toBe('blue');
});
diff --git a/src/divider/__tests__/__snapshots__/Divider.js.snap b/src/divider/__tests__/__snapshots__/Divider.js.snap
index fd5033f46a..5496ef4387 100644
--- a/src/divider/__tests__/__snapshots__/Divider.js.snap
+++ b/src/divider/__tests__/__snapshots__/Divider.js.snap
@@ -1,233 +1,31 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Divider Component should render with style 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "style": Object {
- "backgroundColor": "blue",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+,
- "_debugID": 4,
- "_renderedOutput": ,
+ Object {
+ "backgroundColor": "blue",
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ ]
+ }
+/>
`;
exports[`Divider Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+,
- "_debugID": 2,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ undefined,
+ ]
+ }
+/>
`;
diff --git a/src/form/__tests__/FormInput.js b/src/form/__tests__/FormInput.js
index 64dc3d343a..e11a1e81e7 100644
--- a/src/form/__tests__/FormInput.js
+++ b/src/form/__tests__/FormInput.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import FormInput from '../FormInput';
describe('FormInput Component', () => {
@@ -7,7 +8,7 @@ describe('FormInput Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have a TextInput component', () => {
diff --git a/src/form/__tests__/FormLabel.js b/src/form/__tests__/FormLabel.js
index 38abc78bcb..a5b015bb8b 100644
--- a/src/form/__tests__/FormLabel.js
+++ b/src/form/__tests__/FormLabel.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import FormLabel from '../FormLabel';
describe('FormLabel Component', () => {
@@ -7,7 +8,7 @@ describe('FormLabel Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should show text from the FormLabel children', () => {
diff --git a/src/form/__tests__/FormValidationMessage.js b/src/form/__tests__/FormValidationMessage.js
index 5973778dc5..108a27b47c 100644
--- a/src/form/__tests__/FormValidationMessage.js
+++ b/src/form/__tests__/FormValidationMessage.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import FormValidationMessage from '../FormValidationMessage';
describe('FormValidationMessage Component', () => {
@@ -7,7 +8,7 @@ describe('FormValidationMessage Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should show text from the FormValidationMessage children', () => {
diff --git a/src/form/__tests__/__snapshots__/FormInput.js.snap b/src/form/__tests__/__snapshots__/FormInput.js.snap
index 62317afd61..0021913440 100644
--- a/src/form/__tests__/__snapshots__/FormInput.js.snap
+++ b/src/form/__tests__/__snapshots__/FormInput.js.snap
@@ -1,317 +1,32 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FormInput Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 0,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": FormInput {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+
+
`;
diff --git a/src/form/__tests__/__snapshots__/FormLabel.js.snap b/src/form/__tests__/__snapshots__/FormLabel.js.snap
index 560daac4dd..97bc6eae10 100644
--- a/src/form/__tests__/__snapshots__/FormLabel.js.snap
+++ b/src/form/__tests__/__snapshots__/FormLabel.js.snap
@@ -1,165 +1,30 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FormLabel Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ undefined,
+ undefined,
+ ]
+ }
+ />
+
`;
diff --git a/src/form/__tests__/__snapshots__/FormValidationMessage.js.snap b/src/form/__tests__/__snapshots__/FormValidationMessage.js.snap
index ed733cd33b..00a482c903 100644
--- a/src/form/__tests__/__snapshots__/FormValidationMessage.js.snap
+++ b/src/form/__tests__/__snapshots__/FormValidationMessage.js.snap
@@ -1,161 +1,29 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FormValidationMessage Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ undefined,
+ undefined,
+ ]
+ }
+ />
+
`;
diff --git a/src/grid/__tests__/Col.js b/src/grid/__tests__/Col.js
index 537927898f..6ca9f6850d 100644
--- a/src/grid/__tests__/Col.js
+++ b/src/grid/__tests__/Col.js
@@ -1,6 +1,7 @@
import React from 'react';
import {Text} from 'react-native';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Col from '../Col';
describe('Col Component', () => {
@@ -8,7 +9,7 @@ describe('Col Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render children', () => {
diff --git a/src/grid/__tests__/Grid.js b/src/grid/__tests__/Grid.js
index 979460a25f..43cd2050e4 100644
--- a/src/grid/__tests__/Grid.js
+++ b/src/grid/__tests__/Grid.js
@@ -1,6 +1,7 @@
import React from 'react';
import {Text} from 'react-native';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Grid from '../Grid';
import Row from '../Row';
@@ -9,7 +10,7 @@ describe('Grid Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render children', () => {
diff --git a/src/grid/__tests__/Row.js b/src/grid/__tests__/Row.js
index 58ae6637dc..93178ac5dc 100644
--- a/src/grid/__tests__/Row.js
+++ b/src/grid/__tests__/Row.js
@@ -1,6 +1,7 @@
import React from 'react';
import {Text} from 'react-native';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Row from '../Row';
describe('Row Component', () => {
@@ -8,7 +9,7 @@ describe('Row Component', () => {
const component = shallow(
);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render children', () => {
diff --git a/src/grid/__tests__/__snapshots__/Col.js.snap b/src/grid/__tests__/__snapshots__/Col.js.snap
index 4b30e04f68..6ed441a6e1 100644
--- a/src/grid/__tests__/__snapshots__/Col.js.snap
+++ b/src/grid/__tests__/__snapshots__/Col.js.snap
@@ -1,115 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Col Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 1,
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+,
- "_debugID": 2,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ undefined,
+ ]
+ }
+/>
`;
diff --git a/src/grid/__tests__/__snapshots__/Grid.js.snap b/src/grid/__tests__/__snapshots__/Grid.js.snap
index 7ffe7bafa3..2a91d05786 100644
--- a/src/grid/__tests__/__snapshots__/Grid.js.snap
+++ b/src/grid/__tests__/__snapshots__/Grid.js.snap
@@ -1,121 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Grid Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 0,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": Grid {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 1,
- },
- "refs": Object {},
- "state": null,
- "styles": Object {
- "container": Object {
- "flex": 1,
- "flexDirection": "row",
- },
- },
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+,
- "_debugID": 2,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ undefined,
+ ]
+ }
+/>
`;
diff --git a/src/grid/__tests__/__snapshots__/Row.js.snap b/src/grid/__tests__/__snapshots__/Row.js.snap
index 5d399de8d9..f9a359ffca 100644
--- a/src/grid/__tests__/__snapshots__/Row.js.snap
+++ b/src/grid/__tests__/__snapshots__/Row.js.snap
@@ -1,115 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Row Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "activeOpacity": 1,
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+,
- "_debugID": 2,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
,
-}
+ undefined,
+ ]
+ }
+/>
`;
diff --git a/src/icons/__tests__/Icon.js b/src/icons/__tests__/Icon.js
index 30ccd7a30b..ff46355c8f 100644
--- a/src/icons/__tests__/Icon.js
+++ b/src/icons/__tests__/Icon.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Icon from '../Icon';
describe('Icon component', () => {
@@ -7,7 +8,7 @@ describe('Icon component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with icon type', () => {
@@ -20,7 +21,7 @@ describe('Icon component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have onPress event', () => {
diff --git a/src/icons/__tests__/__snapshots__/Icon.js.snap b/src/icons/__tests__/__snapshots__/Icon.js.snap
index 57ee3b0c1d..4dfcad9036 100644
--- a/src/icons/__tests__/__snapshots__/Icon.js.snap
+++ b/src/icons/__tests__/__snapshots__/Icon.js.snap
@@ -1,481 +1,77 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Icon component should render with icon type 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "color": "red",
- "iconStyle": Object {
- "backgroundColor": "peru",
- },
- "name": "alert",
- "raised": false,
- "reverse": true,
- "reverseColor": "white",
- "size": 24,
- "type": "octicon",
- "underlayColor": "white",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-,
+ Object {
+ "borderRadius": 28,
+ "height": 52,
+ "width": 52,
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ ,
-}
-`;
-
-exports[`Icon component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "color": "black",
- "name": "wifi",
- "raised": false,
- "reverse": false,
- "reverseColor": "white",
- "size": 24,
- "underlayColor": "white",
+ Array [
+ Object {
+ "backgroundColor": "transparent",
},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+ Object {
+ "backgroundColor": "peru",
},
+ ]
+ }
+ />
+
+`;
+
+exports[`Icon component should render without issues 1`] = `
+
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ style={
+ Array [
+ Object {
+ "backgroundColor": "transparent",
+ },
+ undefined,
+ ]
+ }
+ />
+
`;
diff --git a/src/input/__tests__/Search.js b/src/input/__tests__/Search.js
index 927de6519c..20320e9e86 100644
--- a/src/input/__tests__/Search.js
+++ b/src/input/__tests__/Search.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Search from '../Search';
describe('Search component', () => {
@@ -7,7 +8,7 @@ describe('Search component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with icons', () => {
@@ -26,7 +27,7 @@ describe('Search component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render without icon', () => {
@@ -37,6 +38,6 @@ describe('Search component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/input/__tests__/__snapshots__/Search.js.snap b/src/input/__tests__/__snapshots__/Search.js.snap
index f48c5b3b44..aa8432228b 100644
--- a/src/input/__tests__/__snapshots__/Search.js.snap
+++ b/src/input/__tests__/__snapshots__/Search.js.snap
@@ -1,1564 +1,213 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Search component should render with icons 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 0,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": Search {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "clearIcon": Object {
- "color": "red",
- "name": "3d-rotation",
- },
- "containerStyle": Object {
- "height": 70,
- },
- "icon": Object {},
- "lightTheme": true,
- "loadingIcon": Object {
- "style": Object {
- "flex": 1,
- },
- },
- "noIcon": false,
- "placeholderTextColor": "#86939e",
- "round": false,
- "showLoadingIcon": true,
- "style": Object {
- "containerLight": Object {
- "height": 70,
- },
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
-
-
-,
+ Object {
+ "backgroundColor": "#e1e8ee",
+ "borderBottomColor": "#e1e1e1",
+ "borderTopColor": "#e1e1e1",
+ },
+ Object {
+ "height": 70,
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+
+
+
+ ,
-}
+ />
+
`;
exports[`Search component should render without icon 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-,
- "nodes": Array [
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 0,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": Search {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "icon": Object {},
- "lightTheme": false,
- "loadingIcon": Object {},
- "noIcon": true,
- "placeholderTextColor": "#86939e",
- "round": true,
- "showLoadingIcon": false,
- "underlineColorAndroid": "red",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-,
- "_debugID": 6,
- "_renderedOutput":
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
`;
exports[`Search component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-,
- "nodes": Array [
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 0,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": Search {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "icon": Object {},
- "lightTheme": false,
- "loadingIcon": Object {},
- "noIcon": false,
- "placeholderTextColor": "#86939e",
- "round": false,
- "showLoadingIcon": false,
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ selectionColor="#86939e"
+ style={
+ Array [
+ Object {
+ "backgroundColor": "#303337",
+ "borderRadius": 3,
+ "color": "#86939e",
+ "fontSize": 17.5,
+ "height": 30,
+ "margin": 8,
+ "overflow": "hidden",
+ "paddingLeft": 26,
+ "paddingRight": 19,
+ },
+ false,
+ false,
+ false,
+ undefined,
+ ]
+ }
+ underlineColorAndroid="transparent"
+ />
+
+
`;
diff --git a/src/list/__tests__/List.js b/src/list/__tests__/List.js
index 132c35fbb4..e20ef076f3 100644
--- a/src/list/__tests__/List.js
+++ b/src/list/__tests__/List.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import List from '../List';
import ListItem from '../ListItem';
@@ -8,7 +9,7 @@ describe('List component', () => {
const component = shallow(
);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render children', () => {
diff --git a/src/list/__tests__/ListItem.js b/src/list/__tests__/ListItem.js
index 00d0a79f4d..e4fe7b4003 100644
--- a/src/list/__tests__/ListItem.js
+++ b/src/list/__tests__/ListItem.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import ListItem from '../ListItem';
describe('ListItem component', () => {
@@ -7,7 +8,7 @@ describe('ListItem component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with avatar', () => {
@@ -18,7 +19,7 @@ describe('ListItem component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with left icon', () => {
@@ -33,7 +34,7 @@ describe('ListItem component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with title and subtitle', () => {
@@ -48,7 +49,7 @@ describe('ListItem component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with textInput', () => {
@@ -60,6 +61,6 @@ describe('ListItem component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/list/__tests__/__snapshots__/List.js.snap b/src/list/__tests__/__snapshots__/List.js.snap
index e3a74db8a9..c18e3566b9 100644
--- a/src/list/__tests__/__snapshots__/List.js.snap
+++ b/src/list/__tests__/__snapshots__/List.js.snap
@@ -1,117 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`List component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+,
- "_debugID": 2,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
,
-}
+ undefined,
+ ]
+ }
+/>
`;
diff --git a/src/list/__tests__/__snapshots__/ListItem.js.snap b/src/list/__tests__/__snapshots__/ListItem.js.snap
index 3dc10cd30d..9bbe53e13a 100644
--- a/src/list/__tests__/__snapshots__/ListItem.js.snap
+++ b/src/list/__tests__/__snapshots__/ListItem.js.snap
@@ -1,2652 +1,476 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ListItem component should render with avatar 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+ >
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-,
- "nodes": Array [
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+ ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "avatar": "avatar_uri",
- "chevronColor": "#bdc6cf",
- "containerStyle": Object {
- "backgroundColor": "peru",
- },
- "hideChevron": false,
- "rightIcon": Object {
- "name": "chevron-right",
- },
- "roundAvatar": false,
- "switchButton": false,
- "textInputEditable": true,
- "underlayColor": "white",
- "wrapperStyle": Object {
- "backgroundColor": "peru",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+ />
+
+
+
+`;
+
+exports[`ListItem component should render with left icon 1`] = `
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
-`;
-
-exports[`ListItem component should render with left icon 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ name="wifi"
+ raised={false}
+ reverse={false}
+ reverseColor="white"
+ size={20}
+ type="font-awesome"
+ underlayColor="white"
+ />
-,
- "nodes": Array [
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ >
+
+
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+
+
+
+
+ ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "chevronColor": "#bdc6cf",
- "hideChevron": false,
- "leftIcon": Object {
- "color": "red",
- "name": "wifi",
- "size": 20,
- "type": "font-awesome",
- },
- "rightIcon": Object {
- "name": "chevron-right",
- },
- "roundAvatar": false,
- "switchButton": false,
- "textInputEditable": true,
- "underlayColor": "white",
- "wrapperStyle": Object {
- "backgroundColor": "peru",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+ />
+
+
+
+`;
+
+exports[`ListItem component should render with textInput 1`] = `
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- "_debugID": 6,
- "_renderedOutput":
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ ,
-}
-`;
-
-exports[`ListItem component should render with textInput 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ />
-,
- "nodes": Array [
+
+
+
+
+`;
+
+exports[`ListItem component should render with title and subtitle 1`] = `
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 9,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "chevronColor": "#bdc6cf",
- "fontFamily": "arial",
- "hideChevron": true,
- "rightIcon": Object {
- "name": "chevron-right",
- },
- "roundAvatar": false,
- "switchButton": true,
- "textInput": true,
- "textInputEditable": true,
- "underlayColor": "white",
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- "_debugID": 10,
- "_renderedOutput":
+ title test
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
-`;
-
-exports[`ListItem component should render with title and subtitle 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+ title test
+
+
+
+
+
-
-
-
-
- title test
-
-
-
-
- title test
-
-
-
-
-
- title
-
-
-
-
-
+ >
+ title
+
-,
- "nodes": Array [
-
-
-
-
- title test
-
-
-
-
- title test
-
-
-
-
-
- title
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+ ,
- "_debugID": 7,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "chevronColor": "#bdc6cf",
- "fontFamily": "arial",
- "hideChevron": false,
- "rightIcon": Object {
- "name": "chevron-right",
- },
- "rightTitle": "title",
- "roundAvatar": false,
- "subtitle": "title test",
- "subtitleStyle": Object {
- "backgroundColor": "peru",
- },
- "switchButton": false,
- "textInputEditable": true,
- "title": "title test",
- "titleStyle": Object {
- "backgroundColor": "peru",
- },
- "underlayColor": "white",
- "wrapperStyle": Object {
- "backgroundColor": "peru",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 4,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-
- title test
-
-
-
-
- title test
-
-
-
-
-
- title
-
-
-
-
-
-
-,
- "_debugID": 8,
- "_renderedOutput":
-
-
-
-
- title test
-
-
-
-
- title test
-
-
-
-
-
- title
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
+
`;
exports[`ListItem component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+ >
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-,
- "nodes": Array [
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+ ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "chevronColor": "#bdc6cf",
- "hideChevron": false,
- "rightIcon": Object {
- "name": "chevron-right",
- },
- "roundAvatar": false,
- "switchButton": false,
- "textInputEditable": true,
- "underlayColor": "white",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 1,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-
-
-
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
+
`;
diff --git a/src/pricing/__tests__/PricingCard.js b/src/pricing/__tests__/PricingCard.js
index 81ba4bb374..2446fd1f8f 100644
--- a/src/pricing/__tests__/PricingCard.js
+++ b/src/pricing/__tests__/PricingCard.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import PricingCard from '../PricingCard';
describe('PricingCard component', () => {
@@ -12,7 +13,7 @@ describe('PricingCard component', () => {
);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with props', () => {
@@ -32,6 +33,6 @@ describe('PricingCard component', () => {
);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/pricing/__tests__/__snapshots__/PricingCard.js.snap b/src/pricing/__tests__/__snapshots__/PricingCard.js.snap
index 9c55a7842f..ed80c7d11f 100644
--- a/src/pricing/__tests__/__snapshots__/PricingCard.js.snap
+++ b/src/pricing/__tests__/__snapshots__/PricingCard.js.snap
@@ -1,1399 +1,293 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`PricingCard component should render with props 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
+
-
- Free
-
-
- $0
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- "nodes": Array [
-
+
-
-
- Free
-
-
- $0
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "button": Object {
- "icon": "flight-takeoff",
- "title": "GET STARTED",
+ >
+ $0
+
+
+ 1 User
+
+
-
-
- Free
-
-
- $0
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
- Free
-
-
- $0
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ Basic Support
+
+
+ All Core Features
+
+ ,
-}
+ "name": "flight-takeoff",
+ }
+ }
+ title="GET STARTED"
+ />
+
+
`;
exports[`PricingCard component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
+
+
+
-
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- "nodes": Array [
-
+
-
-
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "button": Object {
- "icon": "flight-takeoff",
- "title": "GET STARTED",
+ >
+ Basic Support
+
+
-
-
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-
- 1 User
-
-
- Basic Support
-
-
- All Core Features
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ All Core Features
+
+ ,
-}
+ Object {
+ "marginBottom": 10,
+ "marginTop": 15,
+ },
+ undefined,
+ Object {
+ "backgroundColor": "#9E9E9E",
+ },
+ undefined,
+ ]
+ }
+ icon={
+ Object {
+ "name": "flight-takeoff",
+ }
+ }
+ title="GET STARTED"
+ />
+
+
`;
diff --git a/src/slider/__tests__/Slider.js b/src/slider/__tests__/Slider.js
index 0afa906f8a..c10effe5b9 100644
--- a/src/slider/__tests__/Slider.js
+++ b/src/slider/__tests__/Slider.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Slider from '../Slider';
describe('Slider component', () => {
@@ -7,7 +8,7 @@ describe('Slider component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with ThumbTouchRect', () => {
@@ -18,7 +19,7 @@ describe('Slider component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should call onValueChange', () => {
diff --git a/src/slider/__tests__/__snapshots__/Slider.js.snap b/src/slider/__tests__/__snapshots__/Slider.js.snap
index 6933f35d31..4e4fdf03a2 100644
--- a/src/slider/__tests__/__snapshots__/Slider.js.snap
+++ b/src/slider/__tests__/__snapshots__/Slider.js.snap
@@ -1,1225 +1,244 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Slider component should render with ThumbTouchRect 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 0,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": Slider {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "panResponder": Object {
- "getInteractionHandle": [Function],
- "panHandlers": Object {
- "onMoveShouldSetResponder": [Function],
- "onMoveShouldSetResponderCapture": [Function],
- "onResponderEnd": [Function],
- "onResponderGrant": [Function],
- "onResponderMove": [Function],
- "onResponderReject": [Function],
- "onResponderRelease": [Function],
- "onResponderStart": [Function],
- "onResponderTerminate": [Function],
- "onResponderTerminationRequest": [Function],
- "onStartShouldSetResponder": [Function],
- "onStartShouldSetResponderCapture": [Function],
- },
- },
- "props": Object {
- "animationType": "timing",
- "debugTouchArea": true,
- "maximumTrackTintColor": "#b3b3b3",
- "maximumValue": 100,
- "minimumTrackTintColor": "#3f3f3f",
- "minimumValue": 0,
- "step": 0,
- "thumbTintColor": "red",
- "thumbTouchSize": Object {
- "height": 40,
- "width": 40,
- },
- "value": 0,
+ "backgroundColor": "#b3b3b3",
},
- "refs": Object {},
- "state": Object {
- "allMeasured": false,
- "containerSize": Object {
- "height": 0,
- "width": 0,
- },
- "thumbSize": Object {
- "height": 0,
- "width": 0,
- },
- "trackSize": Object {
- "height": 0,
- "width": 0,
- },
- "value": 0,
+ Object {
+ "borderRadius": 2,
+ "height": 4,
},
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
+ undefined,
+ ]
+ }
+ />
+
-
-
-
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
-`;
-
-exports[`Slider component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
-
-
+ >
-
-,
- "nodes": Array [
-
+
+
+`;
+
+exports[`Slider component should render without issues 1`] = `
+
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 0,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": Slider {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "panResponder": Object {
- "getInteractionHandle": [Function],
- "panHandlers": Object {
- "onMoveShouldSetResponder": [Function],
- "onMoveShouldSetResponderCapture": [Function],
- "onResponderEnd": [Function],
- "onResponderGrant": [Function],
- "onResponderMove": [Function],
- "onResponderReject": [Function],
- "onResponderRelease": [Function],
- "onResponderStart": [Function],
- "onResponderTerminate": [Function],
- "onResponderTerminationRequest": [Function],
- "onStartShouldSetResponder": [Function],
- "onStartShouldSetResponderCapture": [Function],
- },
+
+
+
-
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+ ,
-}
+ />
+
`;
diff --git a/src/social/__tests__/SocialIcon.js b/src/social/__tests__/SocialIcon.js
index 435aa62111..f2215c60f2 100644
--- a/src/social/__tests__/SocialIcon.js
+++ b/src/social/__tests__/SocialIcon.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import SocialIcon from '../SocialIcon';
describe('SocialIcon component', () => {
@@ -7,7 +8,7 @@ describe('SocialIcon component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should show loading indicator', () => {
@@ -24,7 +25,7 @@ describe('SocialIcon component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render social icon button', () => {
@@ -35,7 +36,7 @@ describe('SocialIcon component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have onPress event', () => {
diff --git a/src/social/__tests__/__snapshots__/SocialIcon.js.snap b/src/social/__tests__/__snapshots__/SocialIcon.js.snap
index 08938a53ab..288ad314da 100644
--- a/src/social/__tests__/__snapshots__/SocialIcon.js.snap
+++ b/src/social/__tests__/__snapshots__/SocialIcon.js.snap
@@ -1,981 +1,195 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SocialIcon component should render light social icon 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
-
-,
- "nodes": Array [
-
+
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "button": false,
- "iconColor": "white",
- "iconSize": 24,
- "light": true,
- "raised": false,
- "type": "medium",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 3,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-,
- "_debugID": 6,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
`;
exports[`SocialIcon component should render social icon button 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
-
- Sign In With Facebook
-
-
-,
- "nodes": Array [
-
+
-
-
-
- Sign In With Facebook
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 7,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "button": true,
- "iconColor": "white",
- "iconSize": 24,
- "raised": true,
- "title": "Sign In With Facebook",
- "type": "facebook",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 4,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
- Sign In With Facebook
-
-
-,
- "_debugID": 8,
- "_renderedOutput":
-
-
-
- Sign In With Facebook
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+ Sign In With Facebook
+
+
+
`;
exports[`SocialIcon component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
-
-,
- "nodes": Array [
-
+
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "button": false,
- "iconColor": "white",
- "iconSize": 24,
- "raised": true,
- "type": "twitter",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 1,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
`;
diff --git a/src/text/__tests__/Text.js b/src/text/__tests__/Text.js
index b05f9f555d..b67e62f574 100644
--- a/src/text/__tests__/Text.js
+++ b/src/text/__tests__/Text.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Text from '../Text';
describe('Text Component', () => {
@@ -7,7 +8,7 @@ describe('Text Component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should have font size of 50 when h1', () => {
@@ -80,6 +81,6 @@ describe('Text Component', () => {
);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/text/__tests__/__snapshots__/Text.js.snap b/src/text/__tests__/__snapshots__/Text.js.snap
index 6121902a39..526780b466 100644
--- a/src/text/__tests__/__snapshots__/Text.js.snap
+++ b/src/text/__tests__/__snapshots__/Text.js.snap
@@ -1,329 +1,53 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Text Component should render fontFamily and style 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
- Children Text
-,
- "nodes": Array [
-
- Children Text
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
- Children Text
-,
- "_debugID": 13,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "children": "Children Text",
- "fontFamily": "comic-sans",
- "style": Object {
- "color": "red",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
- Children Text
-,
- "_debugID": 14,
- "_renderedOutput":
- Children Text
-,
+ Object {
+ "color": "red",
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
- Children Text
-,
-}
+ Children Text
+
`;
exports[`Text Component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {},
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 1,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement": ,
- "_debugID": 2,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+
`;
diff --git a/src/tile/__tests__/FeaturedTile.js b/src/tile/__tests__/FeaturedTile.js
index 20db2a1fcc..c15bd9a980 100644
--- a/src/tile/__tests__/FeaturedTile.js
+++ b/src/tile/__tests__/FeaturedTile.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import FeaturedTile from '../FeaturedTile';
describe('FeaturedTitle component', () => {
@@ -7,7 +8,7 @@ describe('FeaturedTitle component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with width and height', () => {
@@ -18,7 +19,7 @@ describe('FeaturedTitle component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render with Icon', () => {
@@ -34,6 +35,6 @@ describe('FeaturedTitle component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/tile/__tests__/Tile.js b/src/tile/__tests__/Tile.js
index e964e8b6af..e3b22eb731 100644
--- a/src/tile/__tests__/Tile.js
+++ b/src/tile/__tests__/Tile.js
@@ -1,5 +1,6 @@
import React from 'react';
import {shallow} from 'enzyme';
+import toJson from 'enzyme-to-json';
import Tile from '../Tile';
describe('FeaturedTitle component', () => {
@@ -7,7 +8,7 @@ describe('FeaturedTitle component', () => {
const component = shallow();
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render featured tile', () => {
@@ -19,7 +20,7 @@ describe('FeaturedTitle component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render featured tile with icon', () => {
@@ -30,7 +31,7 @@ describe('FeaturedTitle component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
it('should render tile with icon', () => {
@@ -46,6 +47,6 @@ describe('FeaturedTitle component', () => {
/>);
expect(component.length).toBe(1);
- expect(component).toMatchSnapshot();
+ expect(toJson(component)).toMatchSnapshot();
});
});
diff --git a/src/tile/__tests__/__snapshots__/FeaturedTile.js.snap b/src/tile/__tests__/__snapshots__/FeaturedTile.js.snap
index b48a245b0b..2c11474322 100644
--- a/src/tile/__tests__/__snapshots__/FeaturedTile.js.snap
+++ b/src/tile/__tests__/__snapshots__/FeaturedTile.js.snap
@@ -1,1609 +1,327 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FeaturedTitle component should render with Icon 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+
-
-
-
-
-
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+
+
+ ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "captionStyle": Object {
- "color": "blue",
- },
- "containerStyle": Object {
- "height": 70,
- },
- "icon": Object {
- "name": "play-circle",
- "type": "font-awesome",
- },
- "iconContainerStyle": Object {
- "height": 70,
- },
- "imageContainerStyle": Object {
- "height": 70,
- },
- "imageSrc": Object {
- "url": "http://google.com",
- },
- "overlayContainerStyle": Object {
- "height": 70,
- },
- "titleStyle": Object {
- "backgroundColor": "yellow",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+ />
+
+
+
+`;
+
+exports[`FeaturedTitle component should render with width and height 1`] = `
+
-
-
-
-
-
-
-
-
-
-,
- "_debugID": 6,
- "_renderedOutput":
-
-
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
-`;
-
-exports[`FeaturedTitle component should render with width and height 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
-
+
-
-
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+ ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "height": 20,
- "imageSrc": Object {
- "url": "http://google.com",
- },
- "width": 34,
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 2,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-
-
-
-
-,
- "_debugID": 4,
- "_renderedOutput":
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
+
`;
exports[`FeaturedTitle component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
+
+
-
+
-
-
-
-
-
-
-,
- "nodes": Array [
-
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement":
+ ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "imageSrc": Object {
- "url": "http://google.com",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 1,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+ />
+
+
+
`;
diff --git a/src/tile/__tests__/__snapshots__/Tile.js.snap b/src/tile/__tests__/__snapshots__/Tile.js.snap
index 0448c534ea..8f30a0817d 100644
--- a/src/tile/__tests__/__snapshots__/Tile.js.snap
+++ b/src/tile/__tests__/__snapshots__/Tile.js.snap
@@ -1,1265 +1,206 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`FeaturedTitle component should render featured tile 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 3,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "caption": "Some Caption Text",
- "featured": true,
- "imageSrc": Object {
- "url": "http://google.com",
- },
- "title": "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores dolore exercitationem",
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 2,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement": ,
- "_debugID": 4,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+
`;
exports[`FeaturedTitle component should render featured tile with icon 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node": ,
- "nodes": Array [
- ,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 5,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "featured": true,
- "icon": Object {
- "name": "play-circle",
- "type": "font-awesome",
- },
- "imageSrc": Object {
- "url": "http://google.com",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 3,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement": ,
- "_debugID": 6,
- "_renderedOutput": ,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered": ,
-}
+
`;
exports[`FeaturedTitle component should render tile with icon 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
-
-
-
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur
-
-
-,
- "nodes": Array [
-
-
-
-
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 7,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "containerStyle": Object {
- "height": 70,
- },
- "contentContainerStyle": Object {
- "height": 70,
- },
- "icon": Object {
- "name": "play-circle",
- "type": "font-awesome",
- },
- "iconContainerStyle": Object {
- "height": 70,
- },
- "imageContainerStyle": Object {
- "height": 70,
- },
- "imageSrc": Object {
- "url": "http://google.com",
- },
- "title": "Lorem ipsum dolor sit amet, consectetur",
- "titleStyle": Object {
- "backgroundColor": "yellow",
- },
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
+
-
-
-
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur
-
-
-,
- "_debugID": 8,
- "_renderedOutput":
-
-
-
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur
-
-
-,
+ Object {
+ "height": 70,
},
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+
+
+
+
+
+
+ ,
-}
+ },
+ ]
+ }
+ >
+ Lorem ipsum dolor sit amet, consectetur
+
+
+
`;
exports[`FeaturedTitle component should render without issues 1`] = `
-ShallowWrapper {
- "complexSelector": ComplexSelector {
- "buildPredicate": [Function],
- "childrenOfNode": [Function],
- "findWhereUnwrapped": [Function],
- },
- "length": 1,
- "node":
+
-
-
-
+ >
-
-
-,
- "nodes": Array [
-
-
-
-
-
-
-
-,
- ],
- "options": Object {},
- "renderer": ReactShallowRenderer {
- "_instance": ShallowComponentWrapper {
- "_calledComponentWillUnmount": false,
- "_compositeType": 2,
- "_context": Object {},
- "_currentElement": ,
- "_debugID": 1,
- "_hostContainerInfo": null,
- "_hostParent": null,
- "_instance": StatelessComponent {
- "_reactInternalInstance": [Circular],
- "context": Object {},
- "props": Object {
- "imageSrc": Object {
- "url": "http://google.com",
+ Array [
+ Object {
+ "alignItems": "center",
+ "alignSelf": "center",
+ "justifyContent": "center",
},
- },
- "refs": Object {},
- "state": null,
- "updater": Object {
- "enqueueCallback": [Function],
- "enqueueCallbackInternal": [Function],
- "enqueueElementInternal": [Function],
- "enqueueForceUpdate": [Function],
- "enqueueReplaceState": [Function],
- "enqueueSetState": [Function],
- "isMounted": [Function],
- "validateCallback": [Function],
- },
- },
- "_mountOrder": 1,
- "_pendingCallbacks": null,
- "_pendingElement": null,
- "_pendingForceUpdate": false,
- "_pendingReplaceState": false,
- "_pendingStateQueue": null,
- "_renderedComponent": NoopInternalComponent {
- "_currentElement":
-
-
-
-
-
-
-,
- "_debugID": 2,
- "_renderedOutput":
-
-
-
-
-
-
-,
- },
- "_renderedNodeType": 1,
- "_rootNodeID": 0,
- "_topLevelWrapper": null,
- "_updateBatchNumber": null,
- "_warnedAboutRefsInRender": false,
- },
- "getRenderOutput": [Function],
- "render": [Function],
- },
- "root": [Circular],
- "unrendered":
+
+ ,
-}
+ >
+
+
+
`;
diff --git a/yarn.lock b/yarn.lock
index b2251cece9..d40ef116e9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -236,10 +236,6 @@ async@^2.0.1, async@^2.1.2, async@^2.1.4:
dependencies:
lodash "^4.14.0"
-async@~0.2.6:
- version "0.2.10"
- resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
-
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -853,11 +849,11 @@ babel@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel/-/babel-6.23.0.tgz#d0d1e7d803e974765beea3232d4e153c0efb90f4"
-babylon@^6.11.0, babylon@^6.13.0, babylon@^6.14.1, babylon@^6.15.0:
+babylon@^6.11.0:
version "6.15.0"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e"
-babylon@^6.16.1:
+babylon@^6.13.0, babylon@^6.14.1, babylon@^6.15.0, babylon@^6.16.1:
version "6.16.1"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3"
@@ -1689,6 +1685,18 @@ entities@^1.1.1, entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
+enzyme-to-json@^1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/enzyme-to-json/-/enzyme-to-json-1.5.0.tgz#bb94f21346866d68378adc9b26856dd6e2bfa60b"
+ dependencies:
+ lodash.filter "^4.6.0"
+ lodash.isnil "^4.0.0"
+ lodash.isplainobject "^4.0.6"
+ lodash.omitby "^4.5.0"
+ lodash.range "^3.2.0"
+ object-values "^1.0.0"
+ object.entries "^1.0.3"
+
enzyme@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.7.1.tgz#76370e1d99e91f73091bb8c4314b7c128cc2d621"
@@ -3256,7 +3264,7 @@ lodash.escape@^3.0.0:
dependencies:
lodash._root "^3.0.0"
-lodash.filter@^4.4.0:
+lodash.filter@^4.4.0, lodash.filter@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace"
@@ -3276,6 +3284,14 @@ lodash.isarray@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
+lodash.isnil@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/lodash.isnil/-/lodash.isnil-4.0.0.tgz#49e28cd559013458c814c5479d3c663a21bfaa6c"
+
+lodash.isplainobject@^4.0.6:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
+
lodash.keys@^3.0.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
@@ -3292,6 +3308,10 @@ lodash.merge@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5"
+lodash.omitby@^4.5.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.omitby/-/lodash.omitby-4.6.0.tgz#5c15ff4754ad555016b53c041311e8f079204791"
+
lodash.pad@^4.1.0:
version "4.5.1"
resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70"
@@ -3308,6 +3328,10 @@ lodash.pick@^4.2.1:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
+lodash.range@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.range/-/lodash.range-3.2.0.tgz#f461e588f66683f7eadeade513e38a69a565a15d"
+
lodash.reduce@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"
@@ -3688,6 +3712,10 @@ object-keys@^1.0.10, object-keys@^1.0.8:
version "1.0.11"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
+object-values@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/object-values/-/object-values-1.0.0.tgz#72af839630119e5b98c3b02bb8c27e3237158105"
+
object.assign@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc"
@@ -4209,9 +4237,9 @@ read-pkg@^1.0.0:
normalize-package-data "^2.3.2"
path-type "^1.0.0"
-"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
+"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.6:
+ version "2.2.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0"
@@ -4221,9 +4249,9 @@ read-pkg@^1.0.0:
string_decoder "~0.10.x"
util-deprecate "~1.0.1"
-readable-stream@^2.1.4, readable-stream@^2.2.6:
- version "2.2.6"
- resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816"
+readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0"
@@ -4945,16 +4973,7 @@ ua-parser-js@^0.7.9:
version "0.7.12"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb"
-uglify-js@^2.6, uglify-js@^2.6.2:
- version "2.7.5"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
- dependencies:
- async "~0.2.6"
- source-map "~0.5.1"
- uglify-to-browserify "~1.0.0"
- yargs "~3.10.0"
-
-uglify-js@^2.8.5:
+uglify-js@^2.6, uglify-js@^2.6.2, uglify-js@^2.8.5:
version "2.8.21"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.21.tgz#1733f669ae6f82fc90c7b25ec0f5c783ee375314"
dependencies: