diff --git a/app/components/file_attachment_list/__snapshots__/file_attachment.test.js.snap b/app/components/file_attachment_list/__snapshots__/file_attachment.test.js.snap
new file mode 100644
index 000000000..2e93e4b54
--- /dev/null
+++ b/app/components/file_attachment_list/__snapshots__/file_attachment.test.js.snap
@@ -0,0 +1,80 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`FileAttachment should match snapshot 1`] = `
+
+
+
+
+
+
+`;
diff --git a/app/components/file_attachment_list/file_attachment.js b/app/components/file_attachment_list/file_attachment.js
index 256eedf77..e7d0b8009 100644
--- a/app/components/file_attachment_list/file_attachment.js
+++ b/app/components/file_attachment_list/file_attachment.js
@@ -140,15 +140,14 @@ export default class FileAttachment extends PureComponent {
return (
{fileAttachmentComponent}
-
-
- {this.renderFileInfo()}
-
-
+
+ {this.renderFileInfo()}
+
);
}
diff --git a/app/components/file_attachment_list/file_attachment.test.js b/app/components/file_attachment_list/file_attachment.test.js
new file mode 100644
index 000000000..a138fd8da
--- /dev/null
+++ b/app/components/file_attachment_list/file_attachment.test.js
@@ -0,0 +1,45 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See LICENSE.txt for license information.
+import React from 'react';
+import {shallow} from 'enzyme';
+
+import FileAttachment from './file_attachment.js';
+import Preferences from 'mattermost-redux/constants/preferences';
+
+jest.mock('react-native-doc-viewer', () => ({
+ openDoc: jest.fn(),
+}));
+
+describe('FileAttachment', () => {
+ const baseProps = {
+ canDownloadFiles: true,
+ file: {
+ create_at: 1546893090093,
+ delete_at: 0,
+ extension: 'png',
+ has_preview_image: true,
+ height: 171,
+ id: 'fileId',
+ name: 'image.png',
+ post_id: 'postId',
+ size: 14894,
+ update_at: 1546893090093,
+ user_id: 'userId',
+ width: 425,
+ data: {
+ mime_type: 'image/png',
+ },
+ },
+ id: 'id',
+ index: 0,
+ theme: Preferences.THEMES.default,
+ };
+
+ test('should match snapshot', () => {
+ const wrapper = shallow(
+
+ );
+
+ expect(wrapper.getElement()).toMatchSnapshot();
+ });
+});