Loading __tests__/notifications/notification/view/ReferralCompleteView.js 0 → 100644 +23 −0 Original line number Original line Diff line number Diff line import 'react-native'; import React from 'react'; import { Text, TouchableOpacity } from "react-native"; import { shallow } from 'enzyme'; import ReferralCompleteView from '../../../../src/notifications/notification/view/ReferralCompleteView'; import styles from '../../../../src/notifications/notification/style'; // fake data generation import boostNotificationFactory from '../../../../__mocks__/fake/notifications/BoostNotificationFactory'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const entity = boostNotificationFactory('referral_complete'); const notification = renderer.create( <ReferralCompleteView styles={styles} entity={entity}/> ).toJSON(); expect(notification).toMatchSnapshot(); }); No newline at end of file __tests__/notifications/notification/view/ReferralPEndingView.js 0 → 100644 +23 −0 Original line number Original line Diff line number Diff line import 'react-native'; import React from 'react'; import { Text, TouchableOpacity } from "react-native"; import { shallow } from 'enzyme'; import ReferralPendingView from '../../../../src/notifications/notification/view/ReferralPendingView'; import styles from '../../../../src/notifications/notification/style'; // fake data generation import boostNotificationFactory from '../../../../__mocks__/fake/notifications/BoostNotificationFactory'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const entity = boostNotificationFactory('referral_pending'); const notification = renderer.create( <ReferralPendingView styles={styles} entity={entity}/> ).toJSON(); expect(notification).toMatchSnapshot(); }); No newline at end of file __tests__/notifications/notification/view/ReferralPingView.js 0 → 100644 +23 −0 Original line number Original line Diff line number Diff line import 'react-native'; import React from 'react'; import { Text, TouchableOpacity } from "react-native"; import { shallow } from 'enzyme'; import ReferralPingView from '../../../../src/notifications/notification/view/ReferralPingView'; import styles from '../../../../src/notifications/notification/style'; // fake data generation import boostNotificationFactory from '../../../../__mocks__/fake/notifications/BoostNotificationFactory'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const entity = boostNotificationFactory('referral_ping'); const notification = renderer.create( <ReferralPingView styles={styles} entity={entity}/> ).toJSON(); expect(notification).toMatchSnapshot(); }); No newline at end of file __tests__/notifications/notification/view/__snapshots__/ReferralCompleteView.js.snap 0 → 100644 +29 −0 Original line number Original line Diff line number Diff line // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` <View style={ Object { "flexDirection": "row", "flexWrap": "wrap", } } > <Text onPress={[Function]} > You've earned tokens for the completed referral of <Text style={ Object { "color": "#444", "fontWeight": "bold", } } > someUser </Text> </Text> </View> `; __tests__/notifications/notification/view/__snapshots__/ReferralPEndingView.js.snap 0 → 100644 +29 −0 Original line number Original line Diff line number Diff line // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` <View style={ Object { "flexDirection": "row", "flexWrap": "wrap", } } > <Text onPress={[Function]} > You have a pending referral! <Text style={ Object { "color": "#444", "fontWeight": "bold", } } > someUser </Text> used your referral link when they signed up for Minds. You'll get tokens once they join the rewards program and set up their wallet </Text> </View> `; Loading
__tests__/notifications/notification/view/ReferralCompleteView.js 0 → 100644 +23 −0 Original line number Original line Diff line number Diff line import 'react-native'; import React from 'react'; import { Text, TouchableOpacity } from "react-native"; import { shallow } from 'enzyme'; import ReferralCompleteView from '../../../../src/notifications/notification/view/ReferralCompleteView'; import styles from '../../../../src/notifications/notification/style'; // fake data generation import boostNotificationFactory from '../../../../__mocks__/fake/notifications/BoostNotificationFactory'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const entity = boostNotificationFactory('referral_complete'); const notification = renderer.create( <ReferralCompleteView styles={styles} entity={entity}/> ).toJSON(); expect(notification).toMatchSnapshot(); }); No newline at end of file
__tests__/notifications/notification/view/ReferralPEndingView.js 0 → 100644 +23 −0 Original line number Original line Diff line number Diff line import 'react-native'; import React from 'react'; import { Text, TouchableOpacity } from "react-native"; import { shallow } from 'enzyme'; import ReferralPendingView from '../../../../src/notifications/notification/view/ReferralPendingView'; import styles from '../../../../src/notifications/notification/style'; // fake data generation import boostNotificationFactory from '../../../../__mocks__/fake/notifications/BoostNotificationFactory'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const entity = boostNotificationFactory('referral_pending'); const notification = renderer.create( <ReferralPendingView styles={styles} entity={entity}/> ).toJSON(); expect(notification).toMatchSnapshot(); }); No newline at end of file
__tests__/notifications/notification/view/ReferralPingView.js 0 → 100644 +23 −0 Original line number Original line Diff line number Diff line import 'react-native'; import React from 'react'; import { Text, TouchableOpacity } from "react-native"; import { shallow } from 'enzyme'; import ReferralPingView from '../../../../src/notifications/notification/view/ReferralPingView'; import styles from '../../../../src/notifications/notification/style'; // fake data generation import boostNotificationFactory from '../../../../__mocks__/fake/notifications/BoostNotificationFactory'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const entity = boostNotificationFactory('referral_ping'); const notification = renderer.create( <ReferralPingView styles={styles} entity={entity}/> ).toJSON(); expect(notification).toMatchSnapshot(); }); No newline at end of file
__tests__/notifications/notification/view/__snapshots__/ReferralCompleteView.js.snap 0 → 100644 +29 −0 Original line number Original line Diff line number Diff line // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` <View style={ Object { "flexDirection": "row", "flexWrap": "wrap", } } > <Text onPress={[Function]} > You've earned tokens for the completed referral of <Text style={ Object { "color": "#444", "fontWeight": "bold", } } > someUser </Text> </Text> </View> `;
__tests__/notifications/notification/view/__snapshots__/ReferralPEndingView.js.snap 0 → 100644 +29 −0 Original line number Original line Diff line number Diff line // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` <View style={ Object { "flexDirection": "row", "flexWrap": "wrap", } } > <Text onPress={[Function]} > You have a pending referral! <Text style={ Object { "color": "#444", "fontWeight": "bold", } } > someUser </Text> used your referral link when they signed up for Minds. You'll get tokens once they join the rewards program and set up their wallet </Text> </View> `;