From 6e7b912ec61a6a791e0e8405ff6f6bd7e622a187 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 6 Jun 2017 17:24:08 -0400 Subject: 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) --- .../__snapshots__/reset_status_modal.test.jsx.snap | 54 ++++++++++++++++++++++ .../tests/components/reset_status_modal.test.jsx | 29 ++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 webapp/tests/components/__snapshots__/reset_status_modal.test.jsx.snap create mode 100644 webapp/tests/components/reset_status_modal.test.jsx (limited to 'webapp/tests/components') diff --git a/webapp/tests/components/__snapshots__/reset_status_modal.test.jsx.snap b/webapp/tests/components/__snapshots__/reset_status_modal.test.jsx.snap new file mode 100644 index 000000000..ec992a25e --- /dev/null +++ b/webapp/tests/components/__snapshots__/reset_status_modal.test.jsx.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`components/ResetStatusModal should match snapshot 1`] = ` + + } + checkboxText={ + + } + confirmButtonClass="btn btn-primary" + confirmButtonText={ + + } + message={ + + } + onCancel={[Function]} + onConfirm={[Function]} + show={false} + showCheckbox={true} + title={ + + } +/> +`; 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( + + ); + expect(wrapper).toMatchSnapshot(); + }); +}); -- cgit v1.2.3-1-g7c22