* Refactor post draft component Re-styled ReadOnly channels Remove filename from upload error * Update canSubmit based on file attachment changes * Fix error message for max file size * Fix select autocomplete values on iOS * Style readonly and refactor accessory view for iOS * Make PostDraft scrollViewNativeID prop not required * Update ReadOnly to have a background with 0.40 opacity * Update max file size error message * Fix shift+enter with HW keyboard
30 lines
No EOL
771 B
JavaScript
30 lines
No EOL
771 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import TestRenderer from 'react-test-renderer';
|
|
import {IntlProvider} from 'react-intl';
|
|
|
|
import Preferences from '@mm-redux/constants/preferences';
|
|
|
|
import ReadOnly from './index';
|
|
|
|
describe('PostDraft ReadOnly', () => {
|
|
test('Should match snapshot', () => {
|
|
const wrapper = renderWithIntl(
|
|
<ReadOnly
|
|
theme={Preferences.THEMES.default}
|
|
/>,
|
|
);
|
|
|
|
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
});
|
|
});
|
|
|
|
function renderWithIntl(component) {
|
|
return TestRenderer.create(
|
|
<IntlProvider locale='en'>
|
|
{component}
|
|
</IntlProvider>,
|
|
);
|
|
} |