@messenger-box/platform-browser 10.0.3-alpha.17 → 10.0.3-alpha.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/InboxMessage/InboxDetails/index.d.ts +6 -1
- package/lib/components/InboxMessage/InboxDetails/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/InboxDetails/index.js +10 -11
- package/lib/components/InboxMessage/InboxDetails/index.js.map +1 -1
- package/lib/components/InboxMessage/InboxSidebar/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/InboxSidebar/index.js +23 -32
- package/lib/components/InboxMessage/InboxSidebar/index.js.map +1 -1
- package/lib/components/InboxMessage/Messages/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/Messages/index.js +42 -81
- package/lib/components/InboxMessage/Messages/index.js.map +1 -1
- package/lib/components/InboxMessage/MessagesList/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/MessagesList/index.js +53 -74
- package/lib/components/InboxMessage/MessagesList/index.js.map +1 -1
- package/lib/components/InboxMessage/Popover/index.d.ts +5 -1
- package/lib/components/InboxMessage/Popover/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/Popover/index.js +8 -35
- package/lib/components/InboxMessage/Popover/index.js.map +1 -1
- package/lib/components/InboxMessage/UserModalContent/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/UserModalContent/index.js +50 -47
- package/lib/components/InboxMessage/UserModalContent/index.js.map +1 -1
- package/lib/components/InboxMessage/index.d.ts.map +1 -1
- package/lib/components/InboxMessage/index.js +38 -70
- package/lib/components/InboxMessage/index.js.map +1 -1
- package/lib/components/channel_view/DirectChannelView.js.map +1 -1
- package/lib/components/channel_view/PublicChannelView.js.map +1 -1
- package/lib/components/dashboard/menu_header.d.ts.map +1 -1
- package/lib/components/dashboard/menu_header.js +38 -24
- package/lib/components/dashboard/menu_header.js.map +1 -1
- package/lib/components/dashboard/modals/direct_modal.d.ts +10 -8
- package/lib/components/dashboard/modals/direct_modal.d.ts.map +1 -1
- package/lib/components/dashboard/modals/direct_modal.js +59 -39
- package/lib/components/dashboard/modals/direct_modal.js.map +1 -1
- package/lib/components/dashboard/modals.d.ts +18 -6
- package/lib/components/dashboard/modals.d.ts.map +1 -1
- package/lib/components/dashboard/modals.js +60 -101
- package/lib/components/dashboard/modals.js.map +1 -1
- package/lib/components/messenger/avatar/index.d.ts.map +1 -1
- package/lib/components/messenger/index.d.ts.map +1 -1
- package/lib/components/messenger/index.js +45 -82
- package/lib/components/messenger/index.js.map +1 -1
- package/lib/components/messenger/messagesList/index.d.ts.map +1 -1
- package/lib/components/messenger/messagesList/index.js +174 -454
- package/lib/components/messenger/messagesList/index.js.map +1 -1
- package/lib/components/messenger/messagesList/messageBox.d.ts +0 -1
- package/lib/components/messenger/messagesList/messageBox.d.ts.map +1 -1
- package/lib/components/messenger/more_action/index.d.ts.map +1 -1
- package/lib/components/messenger/postMessage/postMessage.d.ts +7 -2
- package/lib/components/messenger/postMessage/postMessage.d.ts.map +1 -1
- package/lib/components/messenger/sidebarThreadList/index.d.ts.map +1 -1
- package/lib/components/messenger/threadSidebar/index.d.ts.map +1 -1
- package/lib/components/messenger/types/message.d.ts +11 -11
- package/lib/components/messenger/types/message.d.ts.map +1 -1
- package/lib/components/post/channel_intro_message/channel_intro_message.d.ts.map +1 -1
- package/lib/components/post/channel_layout/channel_identifier_router/channel_identifier_router.d.ts.map +1 -1
- package/lib/components/post/channel_view/channel_view.d.ts.map +1 -1
- package/lib/components/post/create_post/create_post.d.ts +10 -1
- package/lib/components/post/create_post/create_post.d.ts.map +1 -1
- package/lib/components/post/failed_post_options/failed_post_options.d.ts.map +1 -1
- package/lib/components/post/index.d.ts +5 -3
- package/lib/components/post/index.d.ts.map +1 -1
- package/lib/components/post/index.js +63 -97
- package/lib/components/post/index.js.map +1 -1
- package/lib/components/post/markdown/markdown.d.ts.map +1 -1
- package/lib/components/post/post/post.d.ts.map +1 -1
- package/lib/components/post/post_body/post_body.d.ts.map +1 -1
- package/lib/components/post/post_body_additional_content/post_body_additional_content.d.ts.map +1 -1
- package/lib/components/post/post_header/post_header.d.ts.map +1 -1
- package/lib/components/post/post_header/post_header_custom_status.d.ts.map +1 -1
- package/lib/components/post/post_info/post_info.d.ts.map +1 -1
- package/lib/components/post/post_list/post_list.d.ts.map +1 -1
- package/lib/components/post/post_list_row/post_list_row.d.ts.map +1 -1
- package/lib/components/post/post_list_virtualized/post_list_virtualized.d.ts.map +1 -1
- package/lib/components/post/post_markdown/post_markdown.d.ts.map +1 -1
- package/lib/components/post/post_message_view/post_message_view.d.ts.map +1 -1
- package/lib/components/post/post_pre_header/post_pre_header.d.ts.map +1 -1
- package/lib/components/post/post_profile_picture/post_profile_picture.d.ts.map +1 -1
- package/lib/components/post/profile_picture/profile_picture.d.ts.map +1 -1
- package/lib/components/post/show_more/show_more.d.ts.map +1 -1
- package/lib/components/post/suggestion/suggestion_box.d.ts.map +1 -1
- package/lib/components/post/textbox/textbox.d.ts.map +1 -1
- package/lib/components/post/threading/channel_threads/thread_footer/thread_footer.d.ts.map +1 -1
- package/lib/components/post/tutorial/menu_tutorial_tip.d.ts.map +1 -1
- package/lib/components/post/tutorial/tutorial_tip/tutorial_tip.d.ts.map +1 -1
- package/lib/components/post_view/post_attachment_container/post_attachment_container.d.ts.map +1 -1
- package/lib/components/status_icon.d.ts.map +1 -1
- package/lib/compute.js.map +1 -1
- package/lib/containers/Dashboard.d.ts.map +1 -1
- package/lib/containers/Dashboard.js +110 -124
- package/lib/containers/Dashboard.js.map +1 -1
- package/lib/containers/DashboardWithLoader.d.ts.map +1 -1
- package/lib/containers/DashboardWithLoader.js +14 -5
- package/lib/containers/DashboardWithLoader.js.map +1 -1
- package/lib/containers/Inbox.js.map +1 -1
- package/lib/containers/Messenger.js.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/widgets/simple_tooltip/simple_tooltip.d.ts.map +1 -1
- package/package.json +5 -5
- package/CHANGELOG.md +0 -135
- package/jest.config.js +0 -24
- package/lib/components/InboxMessage/InboxDetails/style.d.ts +0 -2
- package/lib/components/InboxMessage/InboxDetails/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/InboxDetails/style.js +0 -27
- package/lib/components/InboxMessage/InboxDetails/style.js.map +0 -1
- package/lib/components/InboxMessage/InboxSidebar/styles.d.ts +0 -2
- package/lib/components/InboxMessage/InboxSidebar/styles.d.ts.map +0 -1
- package/lib/components/InboxMessage/InboxSidebar/styles.js +0 -57
- package/lib/components/InboxMessage/InboxSidebar/styles.js.map +0 -1
- package/lib/components/InboxMessage/Messages/styles.d.ts +0 -81
- package/lib/components/InboxMessage/Messages/styles.d.ts.map +0 -1
- package/lib/components/InboxMessage/Messages/styles.js +0 -85
- package/lib/components/InboxMessage/Messages/styles.js.map +0 -1
- package/lib/components/InboxMessage/Popover/style.d.ts +0 -28
- package/lib/components/InboxMessage/Popover/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/Popover/style.js +0 -27
- package/lib/components/InboxMessage/Popover/style.js.map +0 -1
- package/lib/components/InboxMessage/UserModalContent/style.d.ts +0 -2
- package/lib/components/InboxMessage/UserModalContent/style.d.ts.map +0 -1
- package/lib/components/InboxMessage/UserModalContent/style.js +0 -98
- package/lib/components/InboxMessage/UserModalContent/style.js.map +0 -1
- package/lib/components/InboxMessage/style.js +0 -189
- package/lib/components/InboxMessage/style.js.map +0 -1
- package/lib/components/messenger/avatar/style.d.ts +0 -2
- package/lib/components/messenger/avatar/style.d.ts.map +0 -1
- package/lib/components/messenger/messagesList/style.js +0 -446
- package/lib/components/messenger/messagesList/style.js.map +0 -1
- package/lib/components/messenger/more_action/index.js +0 -48
- package/lib/components/messenger/more_action/index.js.map +0 -1
- package/lib/components/messenger/more_action/style.d.ts +0 -2
- package/lib/components/messenger/more_action/style.d.ts.map +0 -1
- package/lib/components/messenger/more_action/style.js +0 -45
- package/lib/components/messenger/more_action/style.js.map +0 -1
- package/lib/components/post/style.js +0 -20101
- package/lib/components/post/style.js.map +0 -1
- package/lib/style.js +0 -400
- package/lib/style.js.map +0 -1
- package/rollup.config.mjs +0 -35
- package/src/cdm-locales/en/translations.json +0 -95
- package/src/cdm-locales/es/translations.json +0 -95
- package/src/components/InboxMessage/InboxDetails/index.tsx +0 -25
- package/src/components/InboxMessage/InboxDetails/style.ts +0 -27
- package/src/components/InboxMessage/InboxSidebar/index.tsx +0 -89
- package/src/components/InboxMessage/InboxSidebar/styles.ts +0 -57
- package/src/components/InboxMessage/Messages/index.tsx +0 -161
- package/src/components/InboxMessage/Messages/styles.ts +0 -85
- package/src/components/InboxMessage/MessagesList/index.tsx +0 -93
- package/src/components/InboxMessage/Popover/index.tsx +0 -60
- package/src/components/InboxMessage/Popover/style.ts +0 -27
- package/src/components/InboxMessage/UserModalContent/index.tsx +0 -63
- package/src/components/InboxMessage/UserModalContent/style.ts +0 -98
- package/src/components/InboxMessage/index.tsx +0 -289
- package/src/components/InboxMessage/mock.ts +0 -53
- package/src/components/InboxMessage/style.ts +0 -189
- package/src/components/NavBar.tsx +0 -10
- package/src/components/channel_view/DirectChannelView.tsx +0 -25
- package/src/components/channel_view/PublicChannelView.tsx +0 -25
- package/src/components/dashboard/menu_header.tsx +0 -62
- package/src/components/dashboard/modals/direct_modal.tsx +0 -54
- package/src/components/dashboard/modals.tsx +0 -121
- package/src/components/messenger/avatar/index.tsx +0 -39
- package/src/components/messenger/avatar/style.ts +0 -86
- package/src/components/messenger/index.tsx +0 -382
- package/src/components/messenger/messagesList/index.tsx +0 -764
- package/src/components/messenger/messagesList/messageBox.tsx +0 -66
- package/src/components/messenger/messagesList/style.ts +0 -448
- package/src/components/messenger/mock.ts +0 -77
- package/src/components/messenger/more_action/index.tsx +0 -79
- package/src/components/messenger/more_action/style.ts +0 -45
- package/src/components/messenger/postMessage/postMessage.tsx +0 -28
- package/src/components/messenger/postMessage/style.ts +0 -24
- package/src/components/messenger/sidebarThreadList/index.tsx +0 -201
- package/src/components/messenger/style.ts +0 -40
- package/src/components/messenger/threadSidebar/index.tsx +0 -129
- package/src/components/messenger/threadSidebar/style.ts +0 -65
- package/src/components/messenger/types/message.ts +0 -16
- package/src/components/messenger/utils/utils.ts +0 -5
- package/src/components/overlay_trigger.tsx +0 -59
- package/src/components/post/channel_intro_message/add_members_button.tsx +0 -152
- package/src/components/post/channel_intro_message/channel_intro_message.tsx +0 -53
- package/src/components/post/channel_intro_message/index.ts +0 -1
- package/src/components/post/channel_layout/center_channel/center_channel.test.tsx +0 -50
- package/src/components/post/channel_layout/center_channel/center_channel.tsx +0 -125
- package/src/components/post/channel_layout/center_channel/index.ts +0 -69
- package/src/components/post/channel_layout/channel_controller.test.tsx +0 -76
- package/src/components/post/channel_layout/channel_controller.tsx +0 -85
- package/src/components/post/channel_layout/channel_identifier_router/actions.test.ts +0 -243
- package/src/components/post/channel_layout/channel_identifier_router/actions.ts +0 -353
- package/src/components/post/channel_layout/channel_identifier_router/channel_identifier_router.test.tsx +0 -101
- package/src/components/post/channel_layout/channel_identifier_router/channel_identifier_router.tsx +0 -6
- package/src/components/post/channel_layout/channel_identifier_router/index.ts +0 -1
- package/src/components/post/channel_view/channel_view.test.tsx +0 -68
- package/src/components/post/channel_view/channel_view.tsx +0 -92
- package/src/components/post/channel_view/index.ts +0 -1
- package/src/components/post/create_post/create_post.test.jsx +0 -1335
- package/src/components/post/create_post/create_post.tsx +0 -225
- package/src/components/post/create_post/index.ts +0 -1
- package/src/components/post/failed_post_options/failed_post_options.tsx +0 -32
- package/src/components/post/failed_post_options/index.ts +0 -4
- package/src/components/post/index.tsx +0 -131
- package/src/components/post/markdown/index.ts +0 -1
- package/src/components/post/markdown/markdown.test.tsx +0 -62
- package/src/components/post/markdown/markdown.tsx +0 -38
- package/src/components/post/post/defaultpost.ts +0 -25
- package/src/components/post/post/post.tsx +0 -270
- package/src/components/post/post/style.ts +0 -0
- package/src/components/post/post_aria_label_div.tsx +0 -43
- package/src/components/post/post_body/post_body.tsx +0 -80
- package/src/components/post/post_body_additional_content/post_body_additional_content.tsx +0 -6
- package/src/components/post/post_context.tsx +0 -10
- package/src/components/post/post_header/index.ts +0 -38
- package/src/components/post/post_header/post_header.scss +0 -53
- package/src/components/post/post_header/post_header.tsx +0 -98
- package/src/components/post/post_header/post_header_custom_status.tsx +0 -49
- package/src/components/post/post_header/style.ts +0 -54
- package/src/components/post/post_info/post_info.tsx +0 -195
- package/src/components/post/post_list/index.tsx +0 -10
- package/src/components/post/post_list/post_list.tsx +0 -27
- package/src/components/post/post_list_row/index.ts +0 -42
- package/src/components/post/post_list_row/post_list_row.test.tsx +0 -176
- package/src/components/post/post_list_row/post_list_row.tsx +0 -130
- package/src/components/post/post_list_virtualized/latest_post_reader.tsx +0 -9
- package/src/components/post/post_list_virtualized/post_list_virtualized.tsx +0 -269
- package/src/components/post/post_markdown/index.test.js +0 -119
- package/src/components/post/post_markdown/index.ts +0 -1
- package/src/components/post/post_markdown/post_markdown.test.tsx +0 -178
- package/src/components/post/post_markdown/post_markdown.tsx +0 -58
- package/src/components/post/post_markdown/system_message_helpers.tsx +0 -420
- package/src/components/post/post_message_view/index.ts +0 -4
- package/src/components/post/post_message_view/post_message_view.test.tsx +0 -89
- package/src/components/post/post_message_view/post_message_view.tsx +0 -71
- package/src/components/post/post_pre_header/post_pre_header.tsx +0 -141
- package/src/components/post/post_profile_picture/post_profile_picture.tsx +0 -95
- package/src/components/post/post_view.tsx +0 -10
- package/src/components/post/profile_picture/profile_picture.tsx +0 -21
- package/src/components/post/show_more/index.ts +0 -1
- package/src/components/post/show_more/show_more.test.tsx +0 -102
- package/src/components/post/show_more/show_more.tsx +0 -97
- package/src/components/post/style.ts +0 -20101
- package/src/components/post/suggestion/suggestion_box.tsx +0 -5
- package/src/components/post/textbox/index.ts +0 -1
- package/src/components/post/textbox/textbox.tsx +0 -80
- package/src/components/post/textbox/textbox_links/index.ts +0 -24
- package/src/components/post/textbox/textbox_links/textbox_links.tsx +0 -143
- package/src/components/post/threading/channel_threads/thread_footer/index.ts +0 -4
- package/src/components/post/threading/channel_threads/thread_footer/thread_footer.scss +0 -72
- package/src/components/post/threading/channel_threads/thread_footer/thread_footer.tsx +0 -206
- package/src/components/post/threading/common/button/__snapshots__/button.test.tsx.snap +0 -68
- package/src/components/post/threading/common/button/button.scss +0 -148
- package/src/components/post/threading/common/button/button.test.tsx +0 -75
- package/src/components/post/threading/common/button/button.tsx +0 -51
- package/src/components/post/threading/common/button/index.ts +0 -4
- package/src/components/post/threading/common/follow_button/__snapshots__/follow_button.test.tsx.snap +0 -50
- package/src/components/post/threading/common/follow_button/follow_button.test.tsx +0 -56
- package/src/components/post/threading/common/follow_button/follow_button.tsx +0 -39
- package/src/components/post/threading/common/follow_button/index.ts +0 -4
- package/src/components/post/timestamp/__snapshots__/semantic_time.test.tsx.snap +0 -13
- package/src/components/post/timestamp/__snapshots__/timestamp.test.tsx.snap +0 -13
- package/src/components/post/timestamp/index.ts +0 -50
- package/src/components/post/timestamp/relative_ranges.tsx +0 -58
- package/src/components/post/timestamp/semantic_time.test.tsx +0 -47
- package/src/components/post/timestamp/semantic_time.tsx +0 -28
- package/src/components/post/timestamp/timestamp.stories.tsx +0 -190
- package/src/components/post/timestamp/timestamp.test.tsx +0 -309
- package/src/components/post/timestamp/timestamp.tsx +0 -441
- package/src/components/post/tutorial/menu_tutorial_tip.tsx +0 -63
- package/src/components/post/tutorial/tutorial_tip/index.ts +0 -0
- package/src/components/post/tutorial/tutorial_tip/tutorial_tip.test.tsx +0 -111
- package/src/components/post/tutorial/tutorial_tip/tutorial_tip.tsx +0 -224
- package/src/components/post/user_profile/index.tsx +0 -6
- package/src/components/post/user_profile/user_profile.tsx +0 -114
- package/src/components/post_view/__snapshots__/post_view.test.js.snap +0 -25
- package/src/components/post_view/channel_intro_message/add_members_button.scss +0 -72
- package/src/components/post_view/channel_intro_message/add_members_button.tsx +0 -152
- package/src/components/post_view/channel_intro_message/channel_intro_message.tsx +0 -549
- package/src/components/post_view/channel_intro_message/index.ts +0 -67
- package/src/components/post_view/combined_system_message/__snapshots__/combined_system_message.test.tsx.snap +0 -238
- package/src/components/post_view/combined_system_message/__snapshots__/last_users.test.tsx.snap +0 -74
- package/src/components/post_view/combined_system_message/combined_system_message.test.tsx +0 -167
- package/src/components/post_view/combined_system_message/combined_system_message.tsx +0 -380
- package/src/components/post_view/combined_system_message/index.ts +0 -46
- package/src/components/post_view/combined_system_message/last_users.test.tsx +0 -56
- package/src/components/post_view/combined_system_message/last_users.tsx +0 -135
- package/src/components/post_view/combined_user_activity_post/index.ts +0 -28
- package/src/components/post_view/comment_icon/index.ts +0 -31
- package/src/components/post_view/commented_on/__snapshots__/commented_on.test.tsx.snap +0 -276
- package/src/components/post_view/commented_on/commented_on.test.tsx +0 -184
- package/src/components/post_view/commented_on/commented_on.tsx +0 -92
- package/src/components/post_view/commented_on/index.ts +0 -37
- package/src/components/post_view/commented_on_files_message/__snapshots__/commented_on_files_message.test.jsx.snap +0 -24
- package/src/components/post_view/commented_on_files_message/commented_on_files_message.jsx +0 -47
- package/src/components/post_view/commented_on_files_message/commented_on_files_message.test.jsx +0 -53
- package/src/components/post_view/commented_on_files_message/index.js +0 -25
- package/src/components/post_view/date_separator/__snapshots__/date_separator.test.tsx.snap +0 -35
- package/src/components/post_view/date_separator/date_separator.test.tsx +0 -26
- package/src/components/post_view/date_separator/date_separator.tsx +0 -40
- package/src/components/post_view/date_separator/index.ts +0 -4
- package/src/components/post_view/embedded_bindings/button_binding/__snapshots__/button_binding.test.tsx.snap +0 -23
- package/src/components/post_view/embedded_bindings/button_binding/button_binding.test.tsx +0 -124
- package/src/components/post_view/embedded_bindings/button_binding/button_binding.tsx +0 -141
- package/src/components/post_view/embedded_bindings/button_binding/index.ts +0 -34
- package/src/components/post_view/embedded_bindings/embedded_binding/__snapshots__/embedded_binding.test.tsx.snap +0 -249
- package/src/components/post_view/embedded_bindings/embedded_binding/embedded_binding.test.tsx +0 -76
- package/src/components/post_view/embedded_bindings/embedded_binding/embedded_binding.tsx +0 -205
- package/src/components/post_view/embedded_bindings/embedded_binding/index.ts +0 -17
- package/src/components/post_view/embedded_bindings/embedded_bindings.tsx +0 -59
- package/src/components/post_view/embedded_bindings/select_binding/index.ts +0 -33
- package/src/components/post_view/embedded_bindings/select_binding/select_binding.test.tsx +0 -170
- package/src/components/post_view/embedded_bindings/select_binding/select_binding.tsx +0 -188
- package/src/components/post_view/failed_post_options/__snapshots__/failed_post_options.test.tsx.snap +0 -29
- package/src/components/post_view/failed_post_options/failed_post_options.test.tsx +0 -59
- package/src/components/post_view/failed_post_options/failed_post_options.tsx +0 -67
- package/src/components/post_view/failed_post_options/index.ts +0 -23
- package/src/components/post_view/floating_timestamp/__snapshots__/floating_timestamp.test.tsx.snap +0 -41
- package/src/components/post_view/floating_timestamp/floating_timestamp.test.tsx +0 -23
- package/src/components/post_view/floating_timestamp/floating_timestamp.tsx +0 -52
- package/src/components/post_view/floating_timestamp/index.ts +0 -35
- package/src/components/post_view/index.js +0 -61
- package/src/components/post_view/index.test.js +0 -37
- package/src/components/post_view/message_attachments/action_button/__snapshots__/action_button.test.tsx.snap +0 -26
- package/src/components/post_view/message_attachments/action_button/action_button.test.tsx +0 -113
- package/src/components/post_view/message_attachments/action_button/action_button.tsx +0 -80
- package/src/components/post_view/message_attachments/action_button/index.ts +0 -17
- package/src/components/post_view/message_attachments/action_menu/action_menu.test.tsx +0 -61
- package/src/components/post_view/message_attachments/action_menu/action_menu.tsx +0 -156
- package/src/components/post_view/message_attachments/action_menu/index.ts +0 -41
- package/src/components/post_view/message_attachments/message_attachment/__snapshots__/message_attachment.test.tsx.snap +0 -726
- package/src/components/post_view/message_attachments/message_attachment/index.ts +0 -32
- package/src/components/post_view/message_attachments/message_attachment/message_attachment.test.tsx +0 -234
- package/src/components/post_view/message_attachments/message_attachment/message_attachment.tsx +0 -544
- package/src/components/post_view/message_attachments/message_attachment_list.tsx +0 -64
- package/src/components/post_view/new_message_separator/__snapshots__/new_message_separator.test.tsx.snap +0 -16
- package/src/components/post_view/new_message_separator/new_message_separator.test.tsx +0 -16
- package/src/components/post_view/new_message_separator/new_message_separator.tsx +0 -31
- package/src/components/post_view/post/__snapshots__/post.test.js.snap +0 -337
- package/src/components/post_view/post/index.test.js +0 -61
- package/src/components/post_view/post/index.ts +0 -96
- package/src/components/post_view/post/post.jsx +0 -446
- package/src/components/post_view/post/post.test.js +0 -222
- package/src/components/post_view/post_add_channel_member/__snapshots__/post_add_channel_member.test.tsx.snap +0 -226
- package/src/components/post_view/post_add_channel_member/index.ts +0 -47
- package/src/components/post_view/post_add_channel_member/post_add_channel_member.test.tsx +0 -140
- package/src/components/post_view/post_add_channel_member/post_add_channel_member.tsx +0 -231
- package/src/components/post_view/post_aria_label_div.test.jsx +0 -106
- package/src/components/post_view/post_aria_label_div.tsx +0 -48
- package/src/components/post_view/post_attachment_container/__snapshots__/post_attachment_container.test.tsx.snap +0 -25
- package/src/components/post_view/post_attachment_container/post_attachment_container.test.tsx +0 -21
- package/src/components/post_view/post_attachment_container/post_attachment_container.tsx +0 -40
- package/src/components/post_view/post_attachment_opengraph/get_nearest_point.test.ts +0 -55
- package/src/components/post_view/post_attachment_opengraph/get_nearest_point.ts +0 -31
- package/src/components/post_view/post_attachment_opengraph/index.ts +0 -48
- package/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.test.tsx +0 -264
- package/src/components/post_view/post_attachment_opengraph/post_attachment_opengraph.tsx +0 -262
- package/src/components/post_view/post_body/index.js +0 -36
- package/src/components/post_view/post_body/post_body.jsx +0 -235
- package/src/components/post_view/post_body_additional_content/__snapshots__/post_body_additional_content.test.tsx.snap +0 -295
- package/src/components/post_view/post_body_additional_content/index.ts +0 -36
- package/src/components/post_view/post_body_additional_content/post_body_additional_content.test.tsx +0 -425
- package/src/components/post_view/post_body_additional_content/post_body_additional_content.tsx +0 -194
- package/src/components/post_view/post_context.js +0 -14
- package/src/components/post_view/post_flag_icon/__snapshots__/post_flag_icon.test.js.snap +0 -81
- package/src/components/post_view/post_flag_icon/index.js +0 -20
- package/src/components/post_view/post_flag_icon/post_flag_icon.js +0 -125
- package/src/components/post_view/post_flag_icon/post_flag_icon.test.js +0 -39
- package/src/components/post_view/post_header/__snapshots__/post_header.test.tsx.snap +0 -196
- package/src/components/post_view/post_header/index.ts +0 -38
- package/src/components/post_view/post_header/post_header.scss +0 -53
- package/src/components/post_view/post_header/post_header.test.tsx +0 -68
- package/src/components/post_view/post_header/post_header.tsx +0 -202
- package/src/components/post_view/post_header/post_header_custom_status.tsx +0 -73
- package/src/components/post_view/post_image/index.js +0 -6
- package/src/components/post_view/post_image/post_image.jsx +0 -69
- package/src/components/post_view/post_info/__snapshots__/post_info.test.tsx.snap +0 -322
- package/src/components/post_view/post_info/index.ts +0 -66
- package/src/components/post_view/post_info/post_info.test.tsx +0 -170
- package/src/components/post_view/post_info/post_info.tsx +0 -403
- package/src/components/post_view/post_list/__snapshots__/post_list.test.jsx.snap +0 -71
- package/src/components/post_view/post_list/index.js +0 -105
- package/src/components/post_view/post_list/post_list.jsx +0 -324
- package/src/components/post_view/post_list/post_list.test.jsx +0 -274
- package/src/components/post_view/post_list_row/__snapshots__/post_list_row.test.tsx.snap +0 -108
- package/src/components/post_view/post_list_row/index.ts +0 -42
- package/src/components/post_view/post_list_row/post_list_row.test.tsx +0 -176
- package/src/components/post_view/post_list_row/post_list_row.tsx +0 -165
- package/src/components/post_view/post_list_virtualized/latest_post_reader.test.jsx +0 -80
- package/src/components/post_view/post_list_virtualized/latest_post_reader.tsx +0 -46
- package/src/components/post_view/post_list_virtualized/post_list_virtualized.jsx +0 -626
- package/src/components/post_view/post_list_virtualized/post_list_virtualized.test.jsx +0 -623
- package/src/components/post_view/post_message_preview/__snapshots__/post_message_preview.test.tsx.snap +0 -88
- package/src/components/post_view/post_message_preview/index.ts +0 -35
- package/src/components/post_view/post_message_preview/post_message_preview.test.tsx +0 -50
- package/src/components/post_view/post_message_preview/post_message_preview.tsx +0 -92
- package/src/components/post_view/post_message_view/__snapshots__/post_message_view.test.tsx.snap +0 -242
- package/src/components/post_view/post_message_view/index.ts +0 -27
- package/src/components/post_view/post_message_view/post_message_view.test.tsx +0 -89
- package/src/components/post_view/post_message_view/post_message_view.tsx +0 -192
- package/src/components/post_view/post_pre_header/__snapshots__/post_pre_header.test.tsx.snap +0 -209
- package/src/components/post_view/post_pre_header/index.js +0 -18
- package/src/components/post_view/post_pre_header/post_pre_header.test.tsx +0 -188
- package/src/components/post_view/post_pre_header/post_pre_header.tsx +0 -148
- package/src/components/post_view/post_reaction/__snapshots__/post_reaction.test.tsx.snap +0 -63
- package/src/components/post_view/post_reaction/index.ts +0 -21
- package/src/components/post_view/post_reaction/post_reaction.test.tsx +0 -39
- package/src/components/post_view/post_reaction/post_reaction.tsx +0 -124
- package/src/components/post_view/post_time/index.ts +0 -18
- package/src/components/post_view/post_time/post_time.tsx +0 -113
- package/src/components/post_view/post_view.jsx +0 -83
- package/src/components/post_view/post_view.test.js +0 -53
- package/src/components/post_view/reaction/__snapshots__/reaction.test.jsx.snap +0 -339
- package/src/components/post_view/reaction/index.ts +0 -120
- package/src/components/post_view/reaction/reaction.scss +0 -157
- package/src/components/post_view/reaction/reaction.test.jsx +0 -80
- package/src/components/post_view/reaction/reaction.tsx +0 -263
- package/src/components/post_view/reaction/reaction_tooltip/index.test.js +0 -56
- package/src/components/post_view/reaction/reaction_tooltip/index.ts +0 -67
- package/src/components/post_view/reaction/reaction_tooltip/reaction_tooltip.tsx +0 -140
- package/src/components/post_view/reaction_list/__snapshots__/reactions_list.test.jsx.snap +0 -95
- package/src/components/post_view/reaction_list/index.ts +0 -52
- package/src/components/post_view/reaction_list/reaction_list.tsx +0 -201
- package/src/components/post_view/reaction_list/reactions_list.test.jsx +0 -57
- package/src/components/post_view/scroll_to_bottom_arrows.jsx +0 -37
- package/src/components/post_view/show_more/__snapshots__/show_more.test.tsx.snap +0 -237
- package/src/components/post_view/show_more/index.ts +0 -23
- package/src/components/post_view/show_more/show_more.test.tsx +0 -102
- package/src/components/post_view/show_more/show_more.tsx +0 -196
- package/src/components/status_icon.tsx +0 -49
- package/src/components/status_icon_new.tsx +0 -35
- package/src/compute.ts +0 -74
- package/src/containers/Dashboard.tsx +0 -527
- package/src/containers/DashboardWithLoader.tsx +0 -38
- package/src/containers/Inbox.tsx +0 -13
- package/src/containers/Loading.tsx +0 -12
- package/src/containers/Messenger.tsx +0 -18
- package/src/containers/__tests__/ApolloProvider.test.tsx +0 -48
- package/src/containers/__tests__/Counter.test.tsx +0 -49
- package/src/containers/__tests__/PersonList.test.tsx +0 -43
- package/src/containers/__tests__/__snapshots__/Counter.test.tsx.snap +0 -299
- package/src/containers/__tests__/__snapshots__/PersonList.test.tsx.snap +0 -230
- package/src/containers/__tests__/redux.test.tsx +0 -86
- package/src/containers/__tests__/setup.ts +0 -18
- package/src/containers/__tests__/utils.ts +0 -5
- package/src/containers/index.ts +0 -4
- package/src/index.ts +0 -5
- package/src/inversify-containers/index.ts +0 -1
- package/src/inversify-containers/module.ts +0 -4
- package/src/module.ts +0 -21
- package/src/packages/constants/constants.ts +0 -1831
- package/src/packages/types/channels.ts +0 -194
- package/src/packages/types/emojis.ts +0 -41
- package/src/packages/types/files.ts +0 -43
- package/src/packages/types/posts.ts +0 -155
- package/src/packages/types/reactions.ts +0 -8
- package/src/packages/types/teams.ts +0 -105
- package/src/packages/types/utilities.ts +0 -30
- package/src/services/index.ts +0 -0
- package/src/style.ts +0 -401
- package/src/utils/constants.tsx +0 -1120
- package/src/utils/i18n.tsx +0 -15
- package/src/utils/index.ts +0 -34
- package/src/utils/post_list.ts +0 -54
- package/src/utils/post_utils.ts +0 -33
- package/src/utils/user_agent.tsx +0 -153
- package/src/utils/utils.tsx +0 -54
- package/src/widgets/badges/badge.scss +0 -21
- package/src/widgets/badges/badge.tsx +0 -30
- package/src/widgets/badges/bot_badge.tsx +0 -31
- package/src/widgets/badges/guest_badge.tsx +0 -31
- package/src/widgets/badges/style.ts +0 -24
- package/src/widgets/icons/accordion_toggle_icon.tsx +0 -59
- package/src/widgets/icons/add_reaction_icon.tsx +0 -23
- package/src/widgets/icons/admin_eye_icon.tsx +0 -30
- package/src/widgets/icons/alert_icon.tsx +0 -22
- package/src/widgets/icons/archive_icon.tsx +0 -23
- package/src/widgets/icons/arrow_right_icon.tsx +0 -23
- package/src/widgets/icons/at_icon.tsx +0 -22
- package/src/widgets/icons/attachment_icon.tsx +0 -38
- package/src/widgets/icons/back_icon.tsx +0 -22
- package/src/widgets/icons/bot_icon.tsx +0 -23
- package/src/widgets/icons/camera_icon.tsx +0 -41
- package/src/widgets/icons/checkbox_checked_icon.tsx +0 -62
- package/src/widgets/icons/checkbox_partial_icon.tsx +0 -62
- package/src/widgets/icons/close_circle_icon.tsx +0 -25
- package/src/widgets/icons/close_circle_solid_icon.tsx +0 -25
- package/src/widgets/icons/close_icon.tsx +0 -27
- package/src/widgets/icons/dots_horizontal.tsx +0 -22
- package/src/widgets/icons/download_icon.tsx +0 -46
- package/src/widgets/icons/draft_icon.tsx +0 -32
- package/src/widgets/icons/ellipsis_h_icon.tsx +0 -23
- package/src/widgets/icons/email_icon.tsx +0 -23
- package/src/widgets/icons/emoji_icon.tsx +0 -22
- package/src/widgets/icons/fa_add_icon.tsx +0 -15
- package/src/widgets/icons/fa_back_icon.tsx +0 -16
- package/src/widgets/icons/fa_dropdown_icon.tsx +0 -15
- package/src/widgets/icons/fa_edit_icon.tsx +0 -16
- package/src/widgets/icons/fa_logout_icon.tsx +0 -15
- package/src/widgets/icons/fa_next_icon.tsx +0 -28
- package/src/widgets/icons/fa_previous_icon.tsx +0 -28
- package/src/widgets/icons/fa_reload_icon.tsx +0 -16
- package/src/widgets/icons/fa_remove_icon.tsx +0 -16
- package/src/widgets/icons/fa_search_icon.tsx +0 -16
- package/src/widgets/icons/fa_select_icon.tsx +0 -16
- package/src/widgets/icons/fa_success_icon.tsx +0 -16
- package/src/widgets/icons/fa_warning_icon.tsx +0 -28
- package/src/widgets/icons/flag_icon.tsx +0 -22
- package/src/widgets/icons/flag_icon_filled.tsx +0 -41
- package/src/widgets/icons/gfycat_icon.tsx +0 -38
- package/src/widgets/icons/gif_reactions_icon.tsx +0 -52
- package/src/widgets/icons/gif_search_clear_icon.tsx +0 -27
- package/src/widgets/icons/gif_search_icon.tsx +0 -29
- package/src/widgets/icons/gif_trending_icon.tsx +0 -49
- package/src/widgets/icons/globe_icon.tsx +0 -22
- package/src/widgets/icons/icons.stories.js +0 -110
- package/src/widgets/icons/info_icon.tsx +0 -40
- package/src/widgets/icons/info_small_icon.tsx +0 -35
- package/src/widgets/icons/invite_icon.tsx +0 -22
- package/src/widgets/icons/invite_members_icon.tsx +0 -22
- package/src/widgets/icons/leave_team_icon.tsx +0 -30
- package/src/widgets/icons/link_icon.tsx +0 -23
- package/src/widgets/icons/lock_icon.tsx +0 -41
- package/src/widgets/icons/mail_icon.tsx +0 -22
- package/src/widgets/icons/mail_plus_icon.tsx +0 -22
- package/src/widgets/icons/mattermost_logo.tsx +0 -40
- package/src/widgets/icons/member_icon.tsx +0 -22
- package/src/widgets/icons/mentions_icon.tsx +0 -24
- package/src/widgets/icons/menu_icon.tsx +0 -42
- package/src/widgets/icons/message_icon.tsx +0 -42
- package/src/widgets/icons/pin_icon.tsx +0 -23
- package/src/widgets/icons/plugin_channel_header_icon.tsx +0 -23
- package/src/widgets/icons/plugin_icon.tsx +0 -44
- package/src/widgets/icons/reply_icon.tsx +0 -23
- package/src/widgets/icons/scroll_to_bottom_icon.tsx +0 -23
- package/src/widgets/icons/search_icon.tsx +0 -22
- package/src/widgets/icons/shield_outline_icon.tsx +0 -23
- package/src/widgets/icons/status_away_avatar_icon.tsx +0 -33
- package/src/widgets/icons/status_away_icon.tsx +0 -33
- package/src/widgets/icons/status_dnd_avatar_icon.tsx +0 -41
- package/src/widgets/icons/status_dnd_icon.tsx +0 -33
- package/src/widgets/icons/status_offline_avatar_icon.tsx +0 -45
- package/src/widgets/icons/status_offline_icon.tsx +0 -31
- package/src/widgets/icons/status_online_avatar_icon.tsx +0 -49
- package/src/widgets/icons/status_online_icon.tsx +0 -33
- package/src/widgets/icons/team_info_icon.tsx +0 -32
- package/src/widgets/icons/unarchive_icon.tsx +0 -22
- package/src/widgets/icons/unread_below_icon.tsx +0 -23
- package/src/widgets/icons/user_guide_icon.tsx +0 -26
- package/src/widgets/overlay_trigger.tsx +0 -59
- package/src/widgets/shared_user_indicator.tsx +0 -37
- package/src/widgets/simple_tooltip/index.ts +0 -7
- package/src/widgets/simple_tooltip/simple_tooltip.tsx +0 -63
- package/src/widgets/users/avatar/avatar.test.tsx +0 -34
- package/src/widgets/users/avatar/avatar.tsx +0 -38
- package/src/widgets/users/avatar/index.ts +0 -4
- package/src/widgets/users/avatar/style.ts +0 -79
- package/src/widgets/users/avatars/__snapshots__/avatars.test.tsx.snap +0 -1585
- package/src/widgets/users/avatars/avatars.scss +0 -64
- package/src/widgets/users/avatars/avatars.test.tsx +0 -184
- package/src/widgets/users/avatars/avatars.tsx +0 -146
- package/src/widgets/users/avatars/index.ts +0 -4
- package/src/widgets/users/users.stories.tsx +0 -37
- package/tsconfig.json +0 -14
- package/webpack.config.js +0 -58
|
@@ -1,623 +0,0 @@
|
|
|
1
|
-
// // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
|
-
// // See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
// import * as React from 'react';
|
|
5
|
-
// import {shallow} from 'enzyme';
|
|
6
|
-
|
|
7
|
-
// import {DATE_LINE} from 'mattermost-redux/utils/post_list';
|
|
8
|
-
|
|
9
|
-
// import {PostListRowListIds, PostRequestTypes} from 'utils/constants';
|
|
10
|
-
|
|
11
|
-
// import PostListRow from 'components/post_view/post_list_row';
|
|
12
|
-
|
|
13
|
-
// import PostList from './post_list_virtualized';
|
|
14
|
-
|
|
15
|
-
// describe('PostList', () => {
|
|
16
|
-
// const baseActions = {
|
|
17
|
-
// checkAndSetMobileView: jest.fn(),
|
|
18
|
-
// loadOlderPosts: jest.fn(),
|
|
19
|
-
// loadNewerPosts: jest.fn(),
|
|
20
|
-
// canLoadMorePosts: jest.fn(),
|
|
21
|
-
// changeUnreadChunkTimeStamp: jest.fn(),
|
|
22
|
-
// updateNewMessagesAtInChannel: jest.fn(),
|
|
23
|
-
// };
|
|
24
|
-
|
|
25
|
-
// const baseProps = {
|
|
26
|
-
// channelId: 'channel',
|
|
27
|
-
// focusedPostId: '',
|
|
28
|
-
// postListIds: [
|
|
29
|
-
// 'post1',
|
|
30
|
-
// 'post2',
|
|
31
|
-
// 'post3',
|
|
32
|
-
// DATE_LINE + 1551711600000,
|
|
33
|
-
// ],
|
|
34
|
-
// latestPostTimeStamp: 12345,
|
|
35
|
-
// loadingNewerPosts: false,
|
|
36
|
-
// loadingOlderPosts: false,
|
|
37
|
-
// atOldestPost: false,
|
|
38
|
-
// atLatestPost: false,
|
|
39
|
-
// actions: baseActions,
|
|
40
|
-
// };
|
|
41
|
-
|
|
42
|
-
// const postListIdsForClassNames = [
|
|
43
|
-
// 'post1',
|
|
44
|
-
// 'post2',
|
|
45
|
-
// 'post3',
|
|
46
|
-
// DATE_LINE + 1551711600000,
|
|
47
|
-
// 'post4',
|
|
48
|
-
// PostListRowListIds.START_OF_NEW_MESSAGES,
|
|
49
|
-
// 'post5',
|
|
50
|
-
// ];
|
|
51
|
-
|
|
52
|
-
// describe('renderRow', () => {
|
|
53
|
-
// const postListIds = ['a', 'b', 'c', 'd'];
|
|
54
|
-
|
|
55
|
-
// test('should get previous item ID correctly for oldest row', () => {
|
|
56
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
57
|
-
// const row = shallow(wrapper.instance().renderRow({
|
|
58
|
-
// data: postListIds,
|
|
59
|
-
// itemId: 'd',
|
|
60
|
-
// }));
|
|
61
|
-
|
|
62
|
-
// expect(row.find(PostListRow).prop('previousListId')).toEqual('');
|
|
63
|
-
// });
|
|
64
|
-
|
|
65
|
-
// test('should get previous item ID correctly for other rows', () => {
|
|
66
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
67
|
-
// const row = shallow(wrapper.instance().renderRow({
|
|
68
|
-
// data: postListIds,
|
|
69
|
-
// itemId: 'b',
|
|
70
|
-
// }));
|
|
71
|
-
|
|
72
|
-
// expect(row.find(PostListRow).prop('previousListId')).toEqual('c');
|
|
73
|
-
// });
|
|
74
|
-
|
|
75
|
-
// test('should highlight the focused post', () => {
|
|
76
|
-
// const props = {
|
|
77
|
-
// ...baseProps,
|
|
78
|
-
// focusedPostId: 'b',
|
|
79
|
-
// };
|
|
80
|
-
|
|
81
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
82
|
-
|
|
83
|
-
// let row = shallow(wrapper.instance().renderRow({
|
|
84
|
-
// data: postListIds,
|
|
85
|
-
// itemId: 'c',
|
|
86
|
-
// }));
|
|
87
|
-
// expect(row.find(PostListRow).prop('shouldHighlight')).toEqual(false);
|
|
88
|
-
|
|
89
|
-
// row = shallow(wrapper.instance().renderRow({
|
|
90
|
-
// data: postListIds,
|
|
91
|
-
// itemId: 'b',
|
|
92
|
-
// }));
|
|
93
|
-
// expect(row.find(PostListRow).prop('shouldHighlight')).toEqual(true);
|
|
94
|
-
// });
|
|
95
|
-
// });
|
|
96
|
-
|
|
97
|
-
// describe('onScroll', () => {
|
|
98
|
-
// test('should call checkBottom', () => {
|
|
99
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
100
|
-
// wrapper.instance().checkBottom = jest.fn();
|
|
101
|
-
|
|
102
|
-
// const scrollOffset = 1234;
|
|
103
|
-
// const scrollHeight = 1000;
|
|
104
|
-
// const clientHeight = 500;
|
|
105
|
-
|
|
106
|
-
// wrapper.instance().onScroll({
|
|
107
|
-
// scrollDirection: 'forward',
|
|
108
|
-
// scrollOffset,
|
|
109
|
-
// scrollUpdateWasRequested: false,
|
|
110
|
-
// scrollHeight,
|
|
111
|
-
// clientHeight,
|
|
112
|
-
// });
|
|
113
|
-
|
|
114
|
-
// expect(wrapper.instance().checkBottom).toHaveBeenCalledWith(scrollOffset, scrollHeight, clientHeight);
|
|
115
|
-
// });
|
|
116
|
-
|
|
117
|
-
// test('should call canLoadMorePosts with AFTER_ID if loader is visible', () => {
|
|
118
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
119
|
-
// const instance = wrapper.instance();
|
|
120
|
-
|
|
121
|
-
// const scrollOffset = 1234;
|
|
122
|
-
// const scrollHeight = 1000;
|
|
123
|
-
// const clientHeight = 500;
|
|
124
|
-
|
|
125
|
-
// instance.listRef = {current: {_getRangeToRender: () => [0, 70, 12, 1]}};
|
|
126
|
-
// instance.onScroll({
|
|
127
|
-
// scrollDirection: 'forward',
|
|
128
|
-
// scrollOffset,
|
|
129
|
-
// scrollUpdateWasRequested: true,
|
|
130
|
-
// scrollHeight,
|
|
131
|
-
// clientHeight,
|
|
132
|
-
// });
|
|
133
|
-
|
|
134
|
-
// expect(baseProps.actions.canLoadMorePosts).toHaveBeenCalledWith(PostRequestTypes.AFTER_ID);
|
|
135
|
-
// });
|
|
136
|
-
|
|
137
|
-
// test('should not call canLoadMorePosts with AFTER_ID if loader is below the fold by couple of messages', () => {
|
|
138
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
139
|
-
// const instance = wrapper.instance();
|
|
140
|
-
|
|
141
|
-
// const scrollOffset = 1234;
|
|
142
|
-
// const scrollHeight = 1000;
|
|
143
|
-
// const clientHeight = 500;
|
|
144
|
-
|
|
145
|
-
// instance.listRef = {current: {_getRangeToRender: () => [0, 70, 12, 2]}};
|
|
146
|
-
// instance.onScroll({
|
|
147
|
-
// scrollDirection: 'forward',
|
|
148
|
-
// scrollOffset,
|
|
149
|
-
// scrollUpdateWasRequested: true,
|
|
150
|
-
// scrollHeight,
|
|
151
|
-
// clientHeight,
|
|
152
|
-
// });
|
|
153
|
-
|
|
154
|
-
// expect(baseProps.actions.canLoadMorePosts).not.toHaveBeenCalled();
|
|
155
|
-
// });
|
|
156
|
-
|
|
157
|
-
// test('should show search channel hint if user scrolled too far away from the bottom of the list', () => {
|
|
158
|
-
// const screenHeightSpy = jest.spyOn(window.screen, 'height', 'get').mockImplementation(() => 500);
|
|
159
|
-
|
|
160
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
161
|
-
// const instance = wrapper.instance();
|
|
162
|
-
|
|
163
|
-
// const scrollHeight = 3000;
|
|
164
|
-
// const clientHeight = 500;
|
|
165
|
-
// const scrollOffset = 500;
|
|
166
|
-
|
|
167
|
-
// instance.onScroll({
|
|
168
|
-
// scrollDirection: 'forward',
|
|
169
|
-
// scrollOffset,
|
|
170
|
-
// scrollUpdateWasRequested: false,
|
|
171
|
-
// scrollHeight,
|
|
172
|
-
// clientHeight,
|
|
173
|
-
// });
|
|
174
|
-
|
|
175
|
-
// expect(wrapper.state('showSearchHint')).toBe(true);
|
|
176
|
-
|
|
177
|
-
// screenHeightSpy.mockRestore();
|
|
178
|
-
// });
|
|
179
|
-
|
|
180
|
-
// test('should not show search channel hint if user scrolls not that far away', () => {
|
|
181
|
-
// const screenHeightSpy = jest.spyOn(window.screen, 'height', 'get').mockImplementation(() => 500);
|
|
182
|
-
|
|
183
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
184
|
-
// const instance = wrapper.instance();
|
|
185
|
-
|
|
186
|
-
// const scrollHeight = 3000;
|
|
187
|
-
// const clientHeight = 500;
|
|
188
|
-
// const scrollOffset = 2500;
|
|
189
|
-
|
|
190
|
-
// instance.onScroll({
|
|
191
|
-
// scrollDirection: 'forward',
|
|
192
|
-
// scrollOffset,
|
|
193
|
-
// scrollUpdateWasRequested: false,
|
|
194
|
-
// scrollHeight,
|
|
195
|
-
// clientHeight,
|
|
196
|
-
// });
|
|
197
|
-
|
|
198
|
-
// expect(wrapper.state('showSearchHint')).toBe(false);
|
|
199
|
-
|
|
200
|
-
// screenHeightSpy.mockRestore();
|
|
201
|
-
// });
|
|
202
|
-
|
|
203
|
-
// test('should hide search channel hint in case of dismiss', () => {
|
|
204
|
-
// const screenHeightSpy = jest.spyOn(window.screen, 'height', 'get').mockImplementation(() => 500);
|
|
205
|
-
|
|
206
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
207
|
-
// const instance = wrapper.instance();
|
|
208
|
-
|
|
209
|
-
// const scrollHeight = 3000;
|
|
210
|
-
// const clientHeight = 500;
|
|
211
|
-
// const scrollOffset = 500;
|
|
212
|
-
|
|
213
|
-
// instance.onScroll({
|
|
214
|
-
// scrollDirection: 'forward',
|
|
215
|
-
// scrollOffset,
|
|
216
|
-
// scrollUpdateWasRequested: false,
|
|
217
|
-
// scrollHeight,
|
|
218
|
-
// clientHeight,
|
|
219
|
-
// });
|
|
220
|
-
// instance.handleSearchHintDismiss();
|
|
221
|
-
|
|
222
|
-
// expect(wrapper.state('showSearchHint')).toBe(false);
|
|
223
|
-
|
|
224
|
-
// screenHeightSpy.mockRestore();
|
|
225
|
-
// });
|
|
226
|
-
|
|
227
|
-
// test('should not show search channel hint on mobile', () => {
|
|
228
|
-
// const screenHeightSpy = jest.spyOn(window.screen, 'height', 'get').mockImplementation(() => 500);
|
|
229
|
-
|
|
230
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
231
|
-
// wrapper.setState({isMobile: true});
|
|
232
|
-
// const instance = wrapper.instance();
|
|
233
|
-
|
|
234
|
-
// const scrollHeight = 3000;
|
|
235
|
-
// const clientHeight = 500;
|
|
236
|
-
// const scrollOffset = 500;
|
|
237
|
-
|
|
238
|
-
// instance.onScroll({
|
|
239
|
-
// scrollDirection: 'forward',
|
|
240
|
-
// scrollOffset,
|
|
241
|
-
// scrollUpdateWasRequested: false,
|
|
242
|
-
// scrollHeight,
|
|
243
|
-
// clientHeight,
|
|
244
|
-
// });
|
|
245
|
-
|
|
246
|
-
// expect(wrapper.state('showSearchHint')).toBe(false);
|
|
247
|
-
|
|
248
|
-
// screenHeightSpy.mockRestore();
|
|
249
|
-
// });
|
|
250
|
-
|
|
251
|
-
// test('should not show search channel hint if it has already been dismissed', () => {
|
|
252
|
-
// const screenHeightSpy = jest.spyOn(window.screen, 'height', 'get').mockImplementation(() => 500);
|
|
253
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
254
|
-
// const instance = wrapper.instance();
|
|
255
|
-
|
|
256
|
-
// const scrollHeight = 3000;
|
|
257
|
-
// const clientHeight = 500;
|
|
258
|
-
// const scrollOffset = 500;
|
|
259
|
-
|
|
260
|
-
// instance.handleSearchHintDismiss();
|
|
261
|
-
// instance.onScroll({
|
|
262
|
-
// scrollDirection: 'forward',
|
|
263
|
-
// scrollOffset,
|
|
264
|
-
// scrollUpdateWasRequested: false,
|
|
265
|
-
// scrollHeight,
|
|
266
|
-
// clientHeight,
|
|
267
|
-
// });
|
|
268
|
-
|
|
269
|
-
// expect(wrapper.state('showSearchHint')).toBe(false);
|
|
270
|
-
|
|
271
|
-
// screenHeightSpy.mockRestore();
|
|
272
|
-
// });
|
|
273
|
-
|
|
274
|
-
// test('should hide search channel hint in case of resize to mobile', () => {
|
|
275
|
-
// const screenHeightSpy = jest.spyOn(window.screen, 'height', 'get').mockImplementation(() => 500);
|
|
276
|
-
|
|
277
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
278
|
-
// const instance = wrapper.instance();
|
|
279
|
-
|
|
280
|
-
// const scrollHeight = 3000;
|
|
281
|
-
// const clientHeight = 500;
|
|
282
|
-
// const scrollOffset = 500;
|
|
283
|
-
|
|
284
|
-
// instance.onScroll({
|
|
285
|
-
// scrollDirection: 'forward',
|
|
286
|
-
// scrollOffset,
|
|
287
|
-
// scrollUpdateWasRequested: false,
|
|
288
|
-
// scrollHeight,
|
|
289
|
-
// clientHeight,
|
|
290
|
-
// });
|
|
291
|
-
|
|
292
|
-
// expect(wrapper.state('showSearchHint')).toBe(true);
|
|
293
|
-
|
|
294
|
-
// wrapper.setState({isMobile: true});
|
|
295
|
-
// instance.onScroll({
|
|
296
|
-
// scrollDirection: 'forward',
|
|
297
|
-
// scrollOffset,
|
|
298
|
-
// scrollUpdateWasRequested: false,
|
|
299
|
-
// scrollHeight,
|
|
300
|
-
// clientHeight,
|
|
301
|
-
// });
|
|
302
|
-
|
|
303
|
-
// expect(wrapper.state('showSearchHint')).toBe(false);
|
|
304
|
-
|
|
305
|
-
// screenHeightSpy.mockRestore();
|
|
306
|
-
// });
|
|
307
|
-
// });
|
|
308
|
-
|
|
309
|
-
// describe('isAtBottom', () => {
|
|
310
|
-
// const scrollHeight = 1000;
|
|
311
|
-
// const clientHeight = 500;
|
|
312
|
-
|
|
313
|
-
// for (const testCase of [
|
|
314
|
-
// {
|
|
315
|
-
// name: 'when viewing the top of the post list',
|
|
316
|
-
// scrollOffset: 0,
|
|
317
|
-
// expected: false,
|
|
318
|
-
// },
|
|
319
|
-
// {
|
|
320
|
-
// name: 'when 11 pixel from the bottom',
|
|
321
|
-
// scrollOffset: 489,
|
|
322
|
-
// expected: false,
|
|
323
|
-
// },
|
|
324
|
-
// {
|
|
325
|
-
// name: 'when 9 pixel from the bottom also considered to be bottom',
|
|
326
|
-
// scrollOffset: 490,
|
|
327
|
-
// expected: true,
|
|
328
|
-
// },
|
|
329
|
-
// {
|
|
330
|
-
// name: 'when clientHeight is less than scrollHeight', // scrollHeight is a state value in virt list and can be one cycle off when compared to actual value
|
|
331
|
-
// scrollOffset: 501,
|
|
332
|
-
// expected: true,
|
|
333
|
-
// },
|
|
334
|
-
// ]) {
|
|
335
|
-
// test(testCase.name, () => {
|
|
336
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
337
|
-
// expect(wrapper.instance().isAtBottom(testCase.scrollOffset, scrollHeight, clientHeight)).toBe(testCase.expected);
|
|
338
|
-
// });
|
|
339
|
-
// }
|
|
340
|
-
// });
|
|
341
|
-
|
|
342
|
-
// describe('updateAtBottom', () => {
|
|
343
|
-
// test('should update atBottom and lastViewedBottom when atBottom changes', () => {
|
|
344
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
345
|
-
// wrapper.setState({lastViewedBottom: 1234, atBottom: false});
|
|
346
|
-
|
|
347
|
-
// wrapper.instance().updateAtBottom(true);
|
|
348
|
-
|
|
349
|
-
// expect(wrapper.state('atBottom')).toBe(true);
|
|
350
|
-
// expect(wrapper.state('lastViewedBottom')).not.toBe(1234);
|
|
351
|
-
// });
|
|
352
|
-
|
|
353
|
-
// test('should not update lastViewedBottom when atBottom does not change', () => {
|
|
354
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
355
|
-
// wrapper.setState({lastViewedBottom: 1234, atBottom: false});
|
|
356
|
-
|
|
357
|
-
// wrapper.instance().updateAtBottom(false);
|
|
358
|
-
|
|
359
|
-
// expect(wrapper.state('lastViewedBottom')).toBe(1234);
|
|
360
|
-
// });
|
|
361
|
-
|
|
362
|
-
// test('should update lastViewedBottom with latestPostTimeStamp as that is greater than Date.now()', () => {
|
|
363
|
-
// Date.now = jest.fn().mockReturnValue(12344);
|
|
364
|
-
|
|
365
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
366
|
-
// wrapper.setState({lastViewedBottom: 1234, atBottom: false});
|
|
367
|
-
|
|
368
|
-
// wrapper.instance().updateAtBottom(true);
|
|
369
|
-
|
|
370
|
-
// expect(wrapper.state('lastViewedBottom')).toBe(12345);
|
|
371
|
-
// });
|
|
372
|
-
|
|
373
|
-
// test('should update lastViewedBottom with Date.now() as it is greater than latestPostTimeStamp', () => {
|
|
374
|
-
// Date.now = jest.fn().mockReturnValue(12346);
|
|
375
|
-
|
|
376
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
377
|
-
// wrapper.setState({lastViewedBottom: 1234, atBottom: false});
|
|
378
|
-
|
|
379
|
-
// wrapper.instance().updateAtBottom(true);
|
|
380
|
-
|
|
381
|
-
// expect(wrapper.state('lastViewedBottom')).toBe(12346);
|
|
382
|
-
// });
|
|
383
|
-
// });
|
|
384
|
-
|
|
385
|
-
// describe('Scroll correction logic on mount of posts at the top', () => {
|
|
386
|
-
// test('should return previous scroll position from getSnapshotBeforeUpdate', () => {
|
|
387
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
388
|
-
// const instance = wrapper.instance();
|
|
389
|
-
// instance.componentDidUpdate = jest.fn();
|
|
390
|
-
|
|
391
|
-
// instance.postListRef = {current: {scrollHeight: 100, parentElement: {scrollTop: 10}}};
|
|
392
|
-
|
|
393
|
-
// wrapper.setState({atBottom: false});
|
|
394
|
-
// wrapper.setProps({atOldestPost: true});
|
|
395
|
-
// expect(instance.componentDidUpdate).toHaveBeenCalledTimes(2);
|
|
396
|
-
// expect(instance.componentDidUpdate.mock.calls[1][2]).toEqual({previousScrollTop: 10, previousScrollHeight: 100});
|
|
397
|
-
|
|
398
|
-
// instance.postListRef = {current: {scrollHeight: 200, parentElement: {scrollTop: 30}}};
|
|
399
|
-
// wrapper.setProps({postListIds: [
|
|
400
|
-
// 'post1',
|
|
401
|
-
// 'post2',
|
|
402
|
-
// 'post3',
|
|
403
|
-
// DATE_LINE + 1551711600000,
|
|
404
|
-
// 'post4',
|
|
405
|
-
// ]});
|
|
406
|
-
|
|
407
|
-
// expect(instance.componentDidUpdate).toHaveBeenCalledTimes(3);
|
|
408
|
-
// expect(instance.componentDidUpdate.mock.calls[2][2]).toEqual({previousScrollTop: 30, previousScrollHeight: 200});
|
|
409
|
-
// });
|
|
410
|
-
|
|
411
|
-
// test('should not return previous scroll position from getSnapshotBeforeUpdate as list is at bottom', () => {
|
|
412
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
413
|
-
// const instance = wrapper.instance();
|
|
414
|
-
// instance.componentDidUpdate = jest.fn();
|
|
415
|
-
|
|
416
|
-
// instance.postListRef = {current: {scrollHeight: 100, parentElement: {scrollTop: 10}}};
|
|
417
|
-
// wrapper.setProps({atOldestPost: true});
|
|
418
|
-
// wrapper.setState({atBottom: true});
|
|
419
|
-
// expect(instance.componentDidUpdate.mock.calls[1][2]).toEqual(null);
|
|
420
|
-
// });
|
|
421
|
-
// });
|
|
422
|
-
|
|
423
|
-
// describe('initRangeToRender', () => {
|
|
424
|
-
// test('should return 0 to 50 for channel with more than 100 messages', () => {
|
|
425
|
-
// const postListIds = [];
|
|
426
|
-
// for (let i = 0; i < 110; i++) {
|
|
427
|
-
// postListIds.push(`post${i}`);
|
|
428
|
-
// }
|
|
429
|
-
|
|
430
|
-
// const props = {
|
|
431
|
-
// ...baseProps,
|
|
432
|
-
// postListIds,
|
|
433
|
-
// };
|
|
434
|
-
|
|
435
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
436
|
-
// const instance = wrapper.instance();
|
|
437
|
-
// expect(instance.initRangeToRender).toEqual([0, 50]);
|
|
438
|
-
// });
|
|
439
|
-
|
|
440
|
-
// test('should return range if new messages are present', () => {
|
|
441
|
-
// const postListIds = [];
|
|
442
|
-
// for (let i = 0; i < 120; i++) {
|
|
443
|
-
// postListIds.push(`post${i}`);
|
|
444
|
-
// }
|
|
445
|
-
// postListIds[65] = PostListRowListIds.START_OF_NEW_MESSAGES;
|
|
446
|
-
|
|
447
|
-
// const props = {
|
|
448
|
-
// ...baseProps,
|
|
449
|
-
// postListIds,
|
|
450
|
-
// };
|
|
451
|
-
|
|
452
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
453
|
-
// const instance = wrapper.instance();
|
|
454
|
-
// expect(instance.initRangeToRender).toEqual([35, 95]);
|
|
455
|
-
// });
|
|
456
|
-
// });
|
|
457
|
-
|
|
458
|
-
// describe('renderRow', () => {
|
|
459
|
-
// test('should have appropriate classNames for rows with START_OF_NEW_MESSAGES and DATE_LINE', () => {
|
|
460
|
-
// const props = {
|
|
461
|
-
// ...baseProps,
|
|
462
|
-
// postListIds: postListIdsForClassNames,
|
|
463
|
-
// };
|
|
464
|
-
|
|
465
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
466
|
-
// const instance = wrapper.instance();
|
|
467
|
-
// const post3Row = shallow(instance.renderRow({
|
|
468
|
-
// data: postListIdsForClassNames,
|
|
469
|
-
// itemId: 'post3',
|
|
470
|
-
// }));
|
|
471
|
-
|
|
472
|
-
// const post5Row = shallow(instance.renderRow({
|
|
473
|
-
// data: postListIdsForClassNames,
|
|
474
|
-
// itemId: 'post5',
|
|
475
|
-
// }));
|
|
476
|
-
|
|
477
|
-
// expect(post3Row.prop('className')).toEqual('post-row__padding top');
|
|
478
|
-
// expect(post5Row.prop('className')).toEqual('post-row__padding bottom');
|
|
479
|
-
// });
|
|
480
|
-
|
|
481
|
-
// test('should have both top and bottom classNames as post is in between DATE_LINE and START_OF_NEW_MESSAGES', () => {
|
|
482
|
-
// const props = {
|
|
483
|
-
// ...baseProps,
|
|
484
|
-
// postListIds: [
|
|
485
|
-
// 'post1',
|
|
486
|
-
// 'post2',
|
|
487
|
-
// 'post3',
|
|
488
|
-
// DATE_LINE + 1551711600000,
|
|
489
|
-
// 'post4',
|
|
490
|
-
// PostListRowListIds.START_OF_NEW_MESSAGES,
|
|
491
|
-
// 'post5',
|
|
492
|
-
// ],
|
|
493
|
-
// };
|
|
494
|
-
|
|
495
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
496
|
-
|
|
497
|
-
// const row = shallow(wrapper.instance().renderRow({
|
|
498
|
-
// data: props.postListIds,
|
|
499
|
-
// itemId: 'post4',
|
|
500
|
-
// }));
|
|
501
|
-
|
|
502
|
-
// expect(row.prop('className')).toEqual('post-row__padding bottom top');
|
|
503
|
-
// });
|
|
504
|
-
|
|
505
|
-
// test('should have empty string as className when both previousItemId and nextItemId are posts', () => {
|
|
506
|
-
// const props = {
|
|
507
|
-
// ...baseProps,
|
|
508
|
-
// postListIds: [
|
|
509
|
-
// 'post1',
|
|
510
|
-
// 'post2',
|
|
511
|
-
// 'post3',
|
|
512
|
-
// DATE_LINE + 1551711600000,
|
|
513
|
-
// 'post4',
|
|
514
|
-
// PostListRowListIds.START_OF_NEW_MESSAGES,
|
|
515
|
-
// 'post5',
|
|
516
|
-
// ],
|
|
517
|
-
// };
|
|
518
|
-
|
|
519
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
520
|
-
|
|
521
|
-
// const row = shallow(wrapper.instance().renderRow({
|
|
522
|
-
// data: props.postListIds,
|
|
523
|
-
// itemId: 'post2',
|
|
524
|
-
// }));
|
|
525
|
-
|
|
526
|
-
// expect(row.prop('className')).toEqual('');
|
|
527
|
-
// });
|
|
528
|
-
// });
|
|
529
|
-
|
|
530
|
-
// describe('updateFloatingTimestamp', () => {
|
|
531
|
-
// test('should not update topPostId as is it not mobile view', () => {
|
|
532
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
533
|
-
// const instance = wrapper.instance();
|
|
534
|
-
// wrapper.setState({isMobile: false});
|
|
535
|
-
// instance.onItemsRendered({visibleStartIndex: 0});
|
|
536
|
-
// expect(wrapper.state('topPostId')).toBe('');
|
|
537
|
-
// });
|
|
538
|
-
|
|
539
|
-
// test('should update topPostId with latest visible postId', () => {
|
|
540
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
541
|
-
// const instance = wrapper.instance();
|
|
542
|
-
// wrapper.setState({isMobile: true});
|
|
543
|
-
// instance.onItemsRendered({visibleStartIndex: 1});
|
|
544
|
-
// expect(wrapper.state('topPostId')).toBe('post2');
|
|
545
|
-
|
|
546
|
-
// instance.onItemsRendered({visibleStartIndex: 2});
|
|
547
|
-
// expect(wrapper.state('topPostId')).toBe('post3');
|
|
548
|
-
// });
|
|
549
|
-
// });
|
|
550
|
-
|
|
551
|
-
// describe('scrollToLatestMessages', () => {
|
|
552
|
-
// test('should call scrollToBottom', () => {
|
|
553
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
554
|
-
// wrapper.setProps({atLatestPost: true});
|
|
555
|
-
// const instance = wrapper.instance();
|
|
556
|
-
// instance.scrollToBottom = jest.fn();
|
|
557
|
-
// instance.scrollToLatestMessages();
|
|
558
|
-
// expect(instance.scrollToBottom).toHaveBeenCalled();
|
|
559
|
-
// });
|
|
560
|
-
|
|
561
|
-
// test('should call changeUnreadChunkTimeStamp', () => {
|
|
562
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
563
|
-
// const instance = wrapper.instance();
|
|
564
|
-
// instance.scrollToLatestMessages();
|
|
565
|
-
// expect(baseActions.changeUnreadChunkTimeStamp).toHaveBeenCalledWith('');
|
|
566
|
-
// });
|
|
567
|
-
// });
|
|
568
|
-
|
|
569
|
-
// describe('postIds state', () => {
|
|
570
|
-
// test('should have LOAD_NEWER_MESSAGES_TRIGGER and LOAD_OLDER_MESSAGES_TRIGGER', () => {
|
|
571
|
-
// const wrapper = shallow(<PostList {...baseProps}/>);
|
|
572
|
-
// wrapper.setProps({autoRetryEnable: false});
|
|
573
|
-
// const postListIdsState = wrapper.state('postListIds');
|
|
574
|
-
// expect(postListIdsState[0]).toBe(PostListRowListIds.LOAD_NEWER_MESSAGES_TRIGGER);
|
|
575
|
-
// expect(postListIdsState[postListIdsState.length - 1]).toBe(PostListRowListIds.LOAD_OLDER_MESSAGES_TRIGGER);
|
|
576
|
-
// });
|
|
577
|
-
// });
|
|
578
|
-
|
|
579
|
-
// describe('initScrollToIndex', () => {
|
|
580
|
-
// test('return date index if it is just above new message line', () => {
|
|
581
|
-
// const postListIds = [
|
|
582
|
-
// 'post1',
|
|
583
|
-
// 'post2',
|
|
584
|
-
// 'post3',
|
|
585
|
-
// 'post4',
|
|
586
|
-
// PostListRowListIds.START_OF_NEW_MESSAGES,
|
|
587
|
-
// DATE_LINE + 1551711600000,
|
|
588
|
-
// 'post5',
|
|
589
|
-
// ];
|
|
590
|
-
|
|
591
|
-
// const props = {
|
|
592
|
-
// ...baseProps,
|
|
593
|
-
// postListIds,
|
|
594
|
-
// };
|
|
595
|
-
|
|
596
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
597
|
-
// const instance = wrapper.instance();
|
|
598
|
-
// const initScrollToIndex = instance.initScrollToIndex();
|
|
599
|
-
// expect(initScrollToIndex).toEqual({index: 6, position: 'start', offset: -50});
|
|
600
|
-
// });
|
|
601
|
-
// });
|
|
602
|
-
|
|
603
|
-
// test('return new message line index if there is no date just above it', () => {
|
|
604
|
-
// const postListIds = [
|
|
605
|
-
// 'post1',
|
|
606
|
-
// 'post2',
|
|
607
|
-
// 'post3',
|
|
608
|
-
// 'post4',
|
|
609
|
-
// PostListRowListIds.START_OF_NEW_MESSAGES,
|
|
610
|
-
// 'post5',
|
|
611
|
-
// ];
|
|
612
|
-
|
|
613
|
-
// const props = {
|
|
614
|
-
// ...baseProps,
|
|
615
|
-
// postListIds,
|
|
616
|
-
// };
|
|
617
|
-
|
|
618
|
-
// const wrapper = shallow(<PostList {...props}/>);
|
|
619
|
-
// const instance = wrapper.instance();
|
|
620
|
-
// const initScrollToIndex = instance.initScrollToIndex();
|
|
621
|
-
// expect(initScrollToIndex).toEqual({index: 5, position: 'start', offset: -50});
|
|
622
|
-
// });
|
|
623
|
-
// });
|