mattermost-mobile/app/screens/options_modal/options_modal_list.test.js
Shaz Amjad 64223efafe
MM-28474: Custom Sidebar Categories (#5460)
* Further cleanup and fixes

Tests clean-up

Tests fixed?

Plays nicely with threads

Tests fixed

Fixes ESR and show experimental flags

Failing test fixed

DM Fix

WIP: Bottom bar UX

Fixes for unreads

Failing test

Always show current channel

Create a channel in a category!

* Unreads on top

* Various fixes

* Improves category collapsing

* Passes correct ID through

* Tests cleanup

* Redo unreads and unread-button

* Reverts to just using ids

* More unreads back to using ids

* Uses appropriate selectors for pref updates

* Unreads sorted by recency

* Fixes test for recency

* Fixes re-rendering bug

* Code review updates, websocket event debounced
2021-09-20 14:11:57 -04:00

35 lines
990 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {shallow} from 'enzyme';
import React from 'react';
import OptionModalList from './options_modal_list';
describe('OptionModalList', () => {
const baseProps = {
items: [{
action: jest.fn(),
text: {
id: 'mobile.file_upload.camera',
defaultMessage: 'Take Photo or Video',
},
icon: 'camera',
}, {
action: jest.fn(),
text: {
id: 'mobile.file_upload.library',
defaultMessage: 'Photo Library',
},
icon: 'photo',
}],
onCancelPress: jest.fn(),
title: 'test',
};
test('should match snapshot', async () => {
const wrapper = shallow(
<OptionModalList {...baseProps}/>,
);
expect(wrapper.getElement()).toMatchSnapshot();
});
});