diff options
Diffstat (limited to 'webapp/tests/components/post_view/post_info')
-rw-r--r-- | webapp/tests/components/post_view/post_info/__snapshots__/post_info.test.jsx.snap | 515 | ||||
-rw-r--r-- | webapp/tests/components/post_view/post_info/post_info.test.jsx | 225 |
2 files changed, 0 insertions, 740 deletions
diff --git a/webapp/tests/components/post_view/post_info/__snapshots__/post_info.test.jsx.snap b/webapp/tests/components/post_view/post_info/__snapshots__/post_info.test.jsx.snap deleted file mode 100644 index d58df052d..000000000 --- a/webapp/tests/components/post_view/post_info/__snapshots__/post_info.test.jsx.snap +++ /dev/null @@ -1,515 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`components/post_view/PostInfo should match snapshot 1`] = ` -<div - className="post__header--info" -> - <div - className="col" - > - <PostTime - eventTime={1502715365009} - isPermalink={true} - postId="e584uzbwwpny9kengqayx5ayzw" - useMilitaryTime={false} - /> - <PostFlagIcon - idCount={-1} - idPrefix="centerPostFlag" - isEphemeral={false} - isFlagged={false} - postId="e584uzbwwpny9kengqayx5ayzw" - /> - </div> - <div - className="col col__reply" - > - <Connect(DotMenu) - commentCount={0} - handleCommentClick={[Function]} - handleDropdownOpened={[Function]} - idCount={-1} - idPrefix="center" - isFlagged={false} - post={ - Object { - "channel_id": "g6139tbospd18cmxroesdk3kkc", - "create_at": 1502715365009, - "delete_at": 0, - "edit_at": 1502715372443, - "hashtags": "", - "id": "e584uzbwwpny9kengqayx5ayzw", - "is_pinned": false, - "message": "post message", - "original_id": "", - "parent_id": "", - "pending_post_id": "", - "props": Object {}, - "root_id": "", - "type": "", - "update_at": 1502715372443, - "user_id": "b4pfxi8sn78y8yq7phzxxfor7h", - } - } - /> - <span> - <EmojiPickerOverlay - container={[Function]} - onEmojiClick={[Function]} - onHide={[Function]} - rightOffset={7} - show={false} - spaceRequiredAbove={422} - spaceRequiredBelow={436} - target={[Function]} - /> - <a - className="reacticon__container" - href="#" - onClick={[Function]} - > - <span - className="icon icon--emoji" - dangerouslySetInnerHTML={ - Object { - "__html": "<svg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'> <g stroke='none' stroke-width='1' fill='inherit' fill-rule='evenodd'> <g transform='translate(-1071.000000, -954.000000)' fill='inherit'> <g transform='translate(25.000000, 937.000000)'> <g transform='translate(1046.000000, 17.000000)'> <path d='M7.5,0.0852272727 C3.405,0.0852272727 0.0852272727,3.405 0.0852272727,7.5 C0.0852272727,11.595 3.405,14.9147727 7.5,14.9147727 C11.595,14.9147727 14.9147727,11.595 14.9147727,7.5 C14.9147727,3.405 11.595,0.0852272727 7.5,0.0852272727 Z M7.5,14.0663436 C3.87926951,14.0663436 0.933656417,11.1207305 0.933656417,7.5 C0.933656417,3.87926951 3.87926951,0.933656417 7.5,0.933656417 C11.1207305,0.933656417 14.0663436,3.87926951 14.0663436,7.5 C14.0663436,11.1207305 11.1207305,14.0663436 7.5,14.0663436 Z'></path> <path d='M11.7732955,8.95397727 C12.0119318,8.90488636 12.2159659,9.11778409 12.1684091,9.35676136 C11.8063636,11.1790909 9.85346591,12.5710227 7.49846591,12.5710227 C5.15096591,12.5710227 3.20284091,11.1877841 2.83193182,9.37397727 C2.78181818,9.129375 2.99267045,8.911875 3.23744318,8.96198864 C4.85369318,9.29232955 10.1786932,9.28142045 11.7732955,8.95397727 Z'></path> <ellipse cx='4.94318182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> <ellipse cx='10.0568182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> </g> </g> </g> </g> </svg>", - } - } - /> - </a> - </span> - <CommentIcon - commentCount={0} - handleCommentClick={[Function]} - id="g6139tbospd18cmxroesdk3kkc_e584uzbwwpny9kengqayx5ayzw" - idCount={-1} - idPrefix="commentIcon" - searchStyle="" - /> - </div> -</div> -`; - -exports[`components/post_view/PostInfo should match snapshot, compact display 1`] = ` -<div - className="post__header--info" -> - <div - className="col" - > - <PostTime - eventTime={1502715365009} - isPermalink={true} - postId="e584uzbwwpny9kengqayx5ayzw" - useMilitaryTime={false} - /> - <PostFlagIcon - idCount={-1} - idPrefix="centerPostFlag" - isEphemeral={false} - isFlagged={false} - postId="e584uzbwwpny9kengqayx5ayzw" - /> - </div> - <div - className="col col__reply" - > - <Connect(DotMenu) - commentCount={0} - handleCommentClick={[Function]} - handleDropdownOpened={[Function]} - idCount={-1} - idPrefix="center" - isFlagged={false} - post={ - Object { - "channel_id": "g6139tbospd18cmxroesdk3kkc", - "create_at": 1502715365009, - "delete_at": 0, - "edit_at": 1502715372443, - "hashtags": "", - "id": "e584uzbwwpny9kengqayx5ayzw", - "is_pinned": false, - "message": "post message", - "original_id": "", - "parent_id": "", - "pending_post_id": "", - "props": Object {}, - "root_id": "", - "type": "", - "update_at": 1502715372443, - "user_id": "b4pfxi8sn78y8yq7phzxxfor7h", - } - } - /> - <span> - <EmojiPickerOverlay - container={[Function]} - onEmojiClick={[Function]} - onHide={[Function]} - rightOffset={7} - show={false} - spaceRequiredAbove={422} - spaceRequiredBelow={436} - target={[Function]} - /> - <a - className="reacticon__container" - href="#" - onClick={[Function]} - > - <span - className="icon icon--emoji" - dangerouslySetInnerHTML={ - Object { - "__html": "<svg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'> <g stroke='none' stroke-width='1' fill='inherit' fill-rule='evenodd'> <g transform='translate(-1071.000000, -954.000000)' fill='inherit'> <g transform='translate(25.000000, 937.000000)'> <g transform='translate(1046.000000, 17.000000)'> <path d='M7.5,0.0852272727 C3.405,0.0852272727 0.0852272727,3.405 0.0852272727,7.5 C0.0852272727,11.595 3.405,14.9147727 7.5,14.9147727 C11.595,14.9147727 14.9147727,11.595 14.9147727,7.5 C14.9147727,3.405 11.595,0.0852272727 7.5,0.0852272727 Z M7.5,14.0663436 C3.87926951,14.0663436 0.933656417,11.1207305 0.933656417,7.5 C0.933656417,3.87926951 3.87926951,0.933656417 7.5,0.933656417 C11.1207305,0.933656417 14.0663436,3.87926951 14.0663436,7.5 C14.0663436,11.1207305 11.1207305,14.0663436 7.5,14.0663436 Z'></path> <path d='M11.7732955,8.95397727 C12.0119318,8.90488636 12.2159659,9.11778409 12.1684091,9.35676136 C11.8063636,11.1790909 9.85346591,12.5710227 7.49846591,12.5710227 C5.15096591,12.5710227 3.20284091,11.1877841 2.83193182,9.37397727 C2.78181818,9.129375 2.99267045,8.911875 3.23744318,8.96198864 C4.85369318,9.29232955 10.1786932,9.28142045 11.7732955,8.95397727 Z'></path> <ellipse cx='4.94318182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> <ellipse cx='10.0568182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> </g> </g> </g> </g> </svg>", - } - } - /> - </a> - </span> - <CommentIcon - commentCount={0} - handleCommentClick={[Function]} - id="g6139tbospd18cmxroesdk3kkc_e584uzbwwpny9kengqayx5ayzw" - idCount={-1} - idPrefix="commentIcon" - searchStyle="" - /> - </div> -</div> -`; - -exports[`components/post_view/PostInfo should match snapshot, ephemeral deleted post 1`] = ` -<div - className="post__header--info" -> - <div - className="col" - > - <PostTime - eventTime={1502715365009} - isPermalink={false} - postId="e584uzbwwpny9kengqayx5ayzw" - useMilitaryTime={false} - /> - <PostFlagIcon - idCount={-1} - idPrefix="centerPostFlag" - isEphemeral={true} - isFlagged={true} - postId="e584uzbwwpny9kengqayx5ayzw" - /> - </div> - <div - className="col col__remove" - > - <a - className="post__remove theme" - href="#" - onClick={[Function]} - type="button" - > - × - </a> - </div> -</div> -`; - -exports[`components/post_view/PostInfo should match snapshot, ephemeral post 1`] = ` -<div - className="post__header--info" -> - <div - className="col" - > - <PostTime - eventTime={1502715365009} - isPermalink={false} - postId="e584uzbwwpny9kengqayx5ayzw" - useMilitaryTime={false} - /> - <PostFlagIcon - idCount={-1} - idPrefix="centerPostFlag" - isEphemeral={true} - isFlagged={true} - postId="e584uzbwwpny9kengqayx5ayzw" - /> - <span - className="post__visibility" - > - <FormattedMessage - defaultMessage="(Only visible to you)" - id="post_info.message.visible" - values={Object {}} - /> - </span> - </div> - <div - className="col col__remove" - > - <a - className="post__remove theme" - href="#" - onClick={[Function]} - type="button" - > - × - </a> - </div> -</div> -`; - -exports[`components/post_view/PostInfo should match snapshot, flagged post 1`] = ` -<div - className="post__header--info" -> - <div - className="col" - > - <PostTime - eventTime={1502715365009} - isPermalink={true} - postId="e584uzbwwpny9kengqayx5ayzw" - useMilitaryTime={false} - /> - <PostFlagIcon - idCount={-1} - idPrefix="centerPostFlag" - isEphemeral={false} - isFlagged={true} - postId="e584uzbwwpny9kengqayx5ayzw" - /> - </div> - <div - className="col col__reply" - > - <Connect(DotMenu) - commentCount={0} - handleCommentClick={[Function]} - handleDropdownOpened={[Function]} - idCount={-1} - idPrefix="center" - isFlagged={true} - post={ - Object { - "channel_id": "g6139tbospd18cmxroesdk3kkc", - "create_at": 1502715365009, - "delete_at": 0, - "edit_at": 1502715372443, - "hashtags": "", - "id": "e584uzbwwpny9kengqayx5ayzw", - "is_pinned": false, - "message": "post message", - "original_id": "", - "parent_id": "", - "pending_post_id": "", - "props": Object {}, - "root_id": "", - "type": "", - "update_at": 1502715372443, - "user_id": "b4pfxi8sn78y8yq7phzxxfor7h", - } - } - /> - <span> - <EmojiPickerOverlay - container={[Function]} - onEmojiClick={[Function]} - onHide={[Function]} - rightOffset={7} - show={false} - spaceRequiredAbove={422} - spaceRequiredBelow={436} - target={[Function]} - /> - <a - className="reacticon__container" - href="#" - onClick={[Function]} - > - <span - className="icon icon--emoji" - dangerouslySetInnerHTML={ - Object { - "__html": "<svg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'> <g stroke='none' stroke-width='1' fill='inherit' fill-rule='evenodd'> <g transform='translate(-1071.000000, -954.000000)' fill='inherit'> <g transform='translate(25.000000, 937.000000)'> <g transform='translate(1046.000000, 17.000000)'> <path d='M7.5,0.0852272727 C3.405,0.0852272727 0.0852272727,3.405 0.0852272727,7.5 C0.0852272727,11.595 3.405,14.9147727 7.5,14.9147727 C11.595,14.9147727 14.9147727,11.595 14.9147727,7.5 C14.9147727,3.405 11.595,0.0852272727 7.5,0.0852272727 Z M7.5,14.0663436 C3.87926951,14.0663436 0.933656417,11.1207305 0.933656417,7.5 C0.933656417,3.87926951 3.87926951,0.933656417 7.5,0.933656417 C11.1207305,0.933656417 14.0663436,3.87926951 14.0663436,7.5 C14.0663436,11.1207305 11.1207305,14.0663436 7.5,14.0663436 Z'></path> <path d='M11.7732955,8.95397727 C12.0119318,8.90488636 12.2159659,9.11778409 12.1684091,9.35676136 C11.8063636,11.1790909 9.85346591,12.5710227 7.49846591,12.5710227 C5.15096591,12.5710227 3.20284091,11.1877841 2.83193182,9.37397727 C2.78181818,9.129375 2.99267045,8.911875 3.23744318,8.96198864 C4.85369318,9.29232955 10.1786932,9.28142045 11.7732955,8.95397727 Z'></path> <ellipse cx='4.94318182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> <ellipse cx='10.0568182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> </g> </g> </g> </g> </svg>", - } - } - /> - </a> - </span> - <CommentIcon - commentCount={0} - handleCommentClick={[Function]} - id="g6139tbospd18cmxroesdk3kkc_e584uzbwwpny9kengqayx5ayzw" - idCount={-1} - idPrefix="commentIcon" - searchStyle="" - /> - </div> -</div> -`; - -exports[`components/post_view/PostInfo should match snapshot, military time 1`] = ` -<div - className="post__header--info" -> - <div - className="col" - > - <PostTime - eventTime={1502715365009} - isPermalink={true} - postId="e584uzbwwpny9kengqayx5ayzw" - useMilitaryTime={true} - /> - <PostFlagIcon - idCount={-1} - idPrefix="centerPostFlag" - isEphemeral={false} - isFlagged={false} - postId="e584uzbwwpny9kengqayx5ayzw" - /> - </div> - <div - className="col col__reply" - > - <Connect(DotMenu) - commentCount={0} - handleCommentClick={[Function]} - handleDropdownOpened={[Function]} - idCount={-1} - idPrefix="center" - isFlagged={false} - post={ - Object { - "channel_id": "g6139tbospd18cmxroesdk3kkc", - "create_at": 1502715365009, - "delete_at": 0, - "edit_at": 1502715372443, - "hashtags": "", - "id": "e584uzbwwpny9kengqayx5ayzw", - "is_pinned": false, - "message": "post message", - "original_id": "", - "parent_id": "", - "pending_post_id": "", - "props": Object {}, - "root_id": "", - "type": "", - "update_at": 1502715372443, - "user_id": "b4pfxi8sn78y8yq7phzxxfor7h", - } - } - /> - <CommentIcon - commentCount={0} - handleCommentClick={[Function]} - id="g6139tbospd18cmxroesdk3kkc_e584uzbwwpny9kengqayx5ayzw" - idCount={-1} - idPrefix="commentIcon" - searchStyle="" - /> - </div> -</div> -`; - -exports[`components/post_view/PostInfo should match snapshot, pinned post 1`] = ` -<div - className="post__header--info" -> - <div - className="col" - > - <PostTime - eventTime={1502715365009} - isPermalink={true} - postId="e584uzbwwpny9kengqayx5ayzw" - useMilitaryTime={false} - /> - <span - className="post__pinned-badge" - > - <FormattedMessage - defaultMessage="Pinned" - id="post_info.pinned" - values={Object {}} - /> - </span> - <PostFlagIcon - idCount={-1} - idPrefix="centerPostFlag" - isEphemeral={false} - isFlagged={true} - postId="e584uzbwwpny9kengqayx5ayzw" - /> - </div> - <div - className="col col__reply" - > - <Connect(DotMenu) - commentCount={0} - handleCommentClick={[Function]} - handleDropdownOpened={[Function]} - idCount={-1} - idPrefix="center" - isFlagged={true} - post={ - Object { - "channel_id": "g6139tbospd18cmxroesdk3kkc", - "create_at": 1502715365009, - "delete_at": 0, - "edit_at": 1502715372443, - "hashtags": "", - "id": "e584uzbwwpny9kengqayx5ayzw", - "is_pinned": true, - "message": "post message", - "original_id": "", - "parent_id": "", - "pending_post_id": "", - "props": Object {}, - "root_id": "", - "type": "", - "update_at": 1502715372443, - "user_id": "b4pfxi8sn78y8yq7phzxxfor7h", - } - } - /> - <span> - <EmojiPickerOverlay - container={[Function]} - onEmojiClick={[Function]} - onHide={[Function]} - rightOffset={7} - show={false} - spaceRequiredAbove={422} - spaceRequiredBelow={436} - target={[Function]} - /> - <a - className="reacticon__container" - href="#" - onClick={[Function]} - > - <span - className="icon icon--emoji" - dangerouslySetInnerHTML={ - Object { - "__html": "<svg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'> <g stroke='none' stroke-width='1' fill='inherit' fill-rule='evenodd'> <g transform='translate(-1071.000000, -954.000000)' fill='inherit'> <g transform='translate(25.000000, 937.000000)'> <g transform='translate(1046.000000, 17.000000)'> <path d='M7.5,0.0852272727 C3.405,0.0852272727 0.0852272727,3.405 0.0852272727,7.5 C0.0852272727,11.595 3.405,14.9147727 7.5,14.9147727 C11.595,14.9147727 14.9147727,11.595 14.9147727,7.5 C14.9147727,3.405 11.595,0.0852272727 7.5,0.0852272727 Z M7.5,14.0663436 C3.87926951,14.0663436 0.933656417,11.1207305 0.933656417,7.5 C0.933656417,3.87926951 3.87926951,0.933656417 7.5,0.933656417 C11.1207305,0.933656417 14.0663436,3.87926951 14.0663436,7.5 C14.0663436,11.1207305 11.1207305,14.0663436 7.5,14.0663436 Z'></path> <path d='M11.7732955,8.95397727 C12.0119318,8.90488636 12.2159659,9.11778409 12.1684091,9.35676136 C11.8063636,11.1790909 9.85346591,12.5710227 7.49846591,12.5710227 C5.15096591,12.5710227 3.20284091,11.1877841 2.83193182,9.37397727 C2.78181818,9.129375 2.99267045,8.911875 3.23744318,8.96198864 C4.85369318,9.29232955 10.1786932,9.28142045 11.7732955,8.95397727 Z'></path> <ellipse cx='4.94318182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> <ellipse cx='10.0568182' cy='5.50431818' rx='1' ry='1.06534091'></ellipse> </g> </g> </g> </g> </svg>", - } - } - /> - </a> - </span> - <CommentIcon - commentCount={0} - handleCommentClick={[Function]} - id="g6139tbospd18cmxroesdk3kkc_e584uzbwwpny9kengqayx5ayzw" - idCount={-1} - idPrefix="commentIcon" - searchStyle="" - /> - </div> -</div> -`; diff --git a/webapp/tests/components/post_view/post_info/post_info.test.jsx b/webapp/tests/components/post_view/post_info/post_info.test.jsx deleted file mode 100644 index d254226eb..000000000 --- a/webapp/tests/components/post_view/post_info/post_info.test.jsx +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import React from 'react'; -import {shallow} from 'enzyme'; - -import Constants from 'utils/constants.jsx'; -import PostInfo from 'components/post_view/post_info/post_info.jsx'; -import {Posts} from 'mattermost-redux/constants'; - -const post = { - channel_id: 'g6139tbospd18cmxroesdk3kkc', - create_at: 1502715365009, - delete_at: 0, - edit_at: 1502715372443, - hashtags: '', - id: 'e584uzbwwpny9kengqayx5ayzw', - is_pinned: false, - message: 'post message', - original_id: '', - parent_id: '', - pending_post_id: '', - props: {}, - root_id: '', - type: '', - update_at: 1502715372443, - user_id: 'b4pfxi8sn78y8yq7phzxxfor7h' -}; - -describe('components/post_view/PostInfo', () => { - afterEach(() => { - global.window.mm_config = null; - global.window.EnableEmojiPicker = null; - }); - - test('should match snapshot', () => { - function emptyFunction() {} //eslint-disable-line no-empty-function - - global.window.mm_config = {}; - global.window.mm_config.EnableEmojiPicker = 'true'; - - const wrapper = shallow( - <PostInfo - post={post} - handleCommentClick={emptyFunction} - handleDropdownOpened={emptyFunction} - compactDisplay={false} - lastPostCount={0} - replyCount={0} - getPostList={emptyFunction} - useMilitaryTime={false} - isFlagged={false} - actions={{ - removePost: emptyFunction, - addReaction: emptyFunction - }} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); - - test('should match snapshot, compact display', () => { - function emptyFunction() {} //eslint-disable-line no-empty-function - - global.window.mm_config = {}; - global.window.mm_config.EnableEmojiPicker = 'true'; - - const wrapper = shallow( - <PostInfo - post={post} - handleCommentClick={emptyFunction} - handleDropdownOpened={emptyFunction} - compactDisplay={false} - lastPostCount={0} - replyCount={0} - getPostList={emptyFunction} - useMilitaryTime={false} - isFlagged={false} - actions={{ - removePost: emptyFunction, - addReaction: emptyFunction - }} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); - - test('should match snapshot, military time', () => { - function emptyFunction() {} //eslint-disable-line no-empty-function - - global.window.mm_config = {}; - global.window.mm_config.EnableEmojiPicker = 'false'; - - const wrapper = shallow( - <PostInfo - post={post} - handleCommentClick={emptyFunction} - handleDropdownOpened={emptyFunction} - compactDisplay={false} - lastPostCount={0} - replyCount={0} - getPostList={emptyFunction} - useMilitaryTime={true} - isFlagged={false} - actions={{ - removePost: emptyFunction, - addReaction: emptyFunction - }} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); - - test('should match snapshot, flagged post', () => { - function emptyFunction() {} //eslint-disable-line no-empty-function - - global.window.mm_config = {}; - global.window.mm_config.EnableEmojiPicker = 'true'; - - const wrapper = shallow( - <PostInfo - post={post} - handleCommentClick={emptyFunction} - handleDropdownOpened={emptyFunction} - compactDisplay={false} - lastPostCount={0} - replyCount={0} - getPostList={emptyFunction} - useMilitaryTime={false} - isFlagged={true} - actions={{ - removePost: emptyFunction, - addReaction: emptyFunction - }} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); - - test('should match snapshot, pinned post', () => { - function emptyFunction() {} //eslint-disable-line no-empty-function - - global.window.mm_config = {}; - global.window.mm_config.EnableEmojiPicker = 'true'; - - post.is_pinned = true; - - const wrapper = shallow( - <PostInfo - post={post} - handleCommentClick={emptyFunction} - handleDropdownOpened={emptyFunction} - compactDisplay={false} - lastPostCount={0} - replyCount={0} - getPostList={emptyFunction} - useMilitaryTime={false} - isFlagged={true} - actions={{ - removePost: emptyFunction, - addReaction: emptyFunction - }} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); - - test('should match snapshot, ephemeral post', () => { - function emptyFunction() {} //eslint-disable-line no-empty-function - - global.window.mm_config = {}; - global.window.mm_config.EnableEmojiPicker = 'true'; - - post.is_pinned = false; - post.type = Constants.PostTypes.EPHEMERAL; - - const wrapper = shallow( - <PostInfo - post={post} - handleCommentClick={emptyFunction} - handleDropdownOpened={emptyFunction} - compactDisplay={false} - lastPostCount={0} - replyCount={0} - getPostList={emptyFunction} - useMilitaryTime={false} - isFlagged={true} - actions={{ - removePost: emptyFunction, - addReaction: emptyFunction - }} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); - - test('should match snapshot, ephemeral deleted post', () => { - function emptyFunction() {} //eslint-disable-line no-empty-function - - global.window.mm_config = {}; - global.window.mm_config.EnableEmojiPicker = 'true'; - - post.type = Constants.PostTypes.EPHEMERAL; - post.state = Posts.POST_DELETED; - - const wrapper = shallow( - <PostInfo - post={post} - handleCommentClick={emptyFunction} - handleDropdownOpened={emptyFunction} - compactDisplay={false} - lastPostCount={0} - replyCount={0} - getPostList={emptyFunction} - useMilitaryTime={false} - isFlagged={true} - actions={{ - removePost: emptyFunction, - addReaction: emptyFunction - }} - /> - ); - expect(wrapper).toMatchSnapshot(); - }); -});
\ No newline at end of file |