Skip to content

Commit

Permalink
Merge pull request #497 from Bit-Nation/release/1.2.0
Browse files Browse the repository at this point in the history
Release/1.2.0
  • Loading branch information
albertoestarrona committed Sep 3, 2018
2 parents 0a864b4 + c724d18 commit 42fa009
Show file tree
Hide file tree
Showing 151 changed files with 5,526 additions and 5,888 deletions.
248 changes: 239 additions & 9 deletions __tests__/src/components/WalletCard/__snapshots__/WalletCard.js.snap

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions __tests__/src/components/common/ChatListItem.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
// @flow

import React from 'react';
import { shallow } from 'enzyme';

import ChatListItem from '../../../../src/components/common/ChatListItem';
import AssetsImages from '../../../../src/global/AssetsImages';

describe('ChatListItem tests', () => {
describe('Rendering', () => {
test('With text', () => {
const wrapper = shallow(<ChatListItem text='Test list item' />);
expect(wrapper).toMatchSnapshot();
});

test('With different texts and icon', () => {
const wrapper = shallow(<ChatListItem
text='Test chat list item'
participants='Text'
itemIcon={AssetsImages.ChatUI.signal0}
id='1'
name='Test list item'
lastMessage='Some message'
unreadMessages={false}
onPress={jest.fn()}
/>);
expect(wrapper).toMatchSnapshot();
});
Expand All @@ -25,7 +23,12 @@ describe('ChatListItem tests', () => {
test('Press', () => {
const mockFunc = jest.fn();
const id = 'Test id';
const wrapper = shallow(<ChatListItem text='Test list item' onPress={mockFunc} id={id} />);
const wrapper = shallow(<ChatListItem
unreadMessages={false}
name='Test list item'
onPress={mockFunc}
id={id}
/>);
expect(wrapper).toMatchSnapshot();
const render = wrapper.dive();
const touchables = render.find('[testID="Touchable"]');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import renderer from 'react-test-renderer';

import NationListHeader from '../../../../src/components/common/NationListHeader';
import NationListHeader from '../../../../src/components/common/ItemsListHeader';

test('NationListHeader renders correctly', () => {
test('ItemsListHeader renders correctly', () => {
const tree = renderer
.create(<NationListHeader title='Test header title' />)
.toJSON();
Expand Down

0 comments on commit 42fa009

Please sign in to comment.