diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-06-06 17:24:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-06 17:24:08 -0400 |
commit | 6e7b912ec61a6a791e0e8405ff6f6bd7e622a187 (patch) | |
tree | c2fa1d2bae0b344859339d9077af5d822420e7bb /webapp/tests/components/reset_status_modal.test.jsx | |
parent | 02f09b8af90f1df38762b5257291b31597575dbb (diff) | |
download | chat-6e7b912ec61a6a791e0e8405ff6f6bd7e622a187.tar.gz chat-6e7b912ec61a6a791e0e8405ff6f6bd7e622a187.tar.bz2 chat-6e7b912ec61a6a791e0e8405ff6f6bd7e622a187.zip |
PLT-4257 Add pop-up asking if user wants to reset status (#6526)
* Add pop-up asking if user wants to reset status
* Update test snapshot
* Update prop name for old uses of confirm modal
* Updating checkbox (#6586)
* Updating style for checkbox (#6596)
Diffstat (limited to 'webapp/tests/components/reset_status_modal.test.jsx')
-rw-r--r-- | webapp/tests/components/reset_status_modal.test.jsx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/webapp/tests/components/reset_status_modal.test.jsx b/webapp/tests/components/reset_status_modal.test.jsx new file mode 100644 index 000000000..420bb2bfe --- /dev/null +++ b/webapp/tests/components/reset_status_modal.test.jsx @@ -0,0 +1,29 @@ +// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import React from 'react'; +import {shallow} from 'enzyme'; + +import ResetStatusModal from 'components/reset_status_modal/reset_status_modal.jsx'; + +describe('components/ResetStatusModal', () => { + test('should match snapshot', () => { + function emptyFunction() {} //eslint-disable-line no-empty-function + + async function fakeAutoReset() { //eslint-disable-line require-await + return {status: 'away', manual: true, user_id: 'fake'}; + } + + const wrapper = shallow( + <ResetStatusModal + autoResetPref='' + actions={{ + autoResetStatus: fakeAutoReset, + setStatus: emptyFunction, + savePreferences: emptyFunction + }} + /> + ); + expect(wrapper).toMatchSnapshot(); + }); +}); |