* Detox/E2E: Add e2e tests for channel notification preference * Fixed unit snap files * Moved e2e to notifications and updated formatting * Added basic snapshot tests * Update app/components/radio_button/radio_button_group.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/components/radio_button/radio_button_group.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/components/radio_button/radio_button_group.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/components/sidebars/settings/drawer_item.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/screens/channel_info/edit_channel/edit_channel.tsx Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/screens/channel_info/notification_preference/notification_preference.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/screens/channel_info/notification_preference/notification_preference.tsx Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/components/radio_button/radio_button_group.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Fix radio button group snap file * Simplified element call * Rename channel sidebar to main sidebar * Rename drawer button files * Update app/components/sidebars/settings/settings_sidebar.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update app/screens/channel_info/channel_info_row.test.js Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Update comments Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import {shallowWithIntl} from 'test/intl-test-helper';
|
|
|
|
import Preferences from '@mm-redux/constants/preferences';
|
|
|
|
import RadioButtonGroup from './radio_button_group';
|
|
|
|
describe('RadioButtonGroup', () => {
|
|
const baseProps = {
|
|
onSelect: jest.fn(),
|
|
name: 'name',
|
|
};
|
|
|
|
test('should match snapshot', () => {
|
|
const options = [{
|
|
testID: 'radio-1',
|
|
label: 'label-1',
|
|
theme: Preferences.THEMES.default,
|
|
value: 'value',
|
|
checked: true,
|
|
disabled: false,
|
|
}, {
|
|
testID: 'radio-2',
|
|
label: 'label-2',
|
|
theme: Preferences.THEMES.default,
|
|
value: 'value',
|
|
checked: false,
|
|
disabled: true,
|
|
}];
|
|
|
|
const wrapper = shallowWithIntl(
|
|
<RadioButtonGroup
|
|
{...baseProps}
|
|
options={options}
|
|
/>,
|
|
);
|
|
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
});
|