From abd0466a42d6b9897ba9e3bcb373b41974e9c46f Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 5 Jun 2017 12:49:38 -0400 Subject: PLT-3466 E10: Add announcement bar feature (#6509) * E10 - Add announcement bar feature * Updates per feedback * Add component tests and snapshots * Update snapshots * Updating color picker UI (#6543) * Add class to body tag when banner is not dismissable and clean up localstorage items when banner changes * Fixing links (#6544) * Updating UI for fixed error bar (#6552) * Truncating text on fixed banner (#6561) * Plt 3466 - Error bar link states (#6577) * Updating error bar hover state * Updating error bar link states --- .../__snapshots__/color_setting.test.jsx.snap | 95 ++++++++++++++++++++++ .../admin_console/color_setting.test.jsx | 55 +++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 webapp/tests/components/admin_console/__snapshots__/color_setting.test.jsx.snap create mode 100644 webapp/tests/components/admin_console/color_setting.test.jsx (limited to 'webapp/tests/components') diff --git a/webapp/tests/components/admin_console/__snapshots__/color_setting.test.jsx.snap b/webapp/tests/components/admin_console/__snapshots__/color_setting.test.jsx.snap new file mode 100644 index 000000000..7b8c934ce --- /dev/null +++ b/webapp/tests/components/admin_console/__snapshots__/color_setting.test.jsx.snap @@ -0,0 +1,95 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`components/ColorSetting should match snapshot, all 1`] = ` + +
+ + + + +
+
+`; + +exports[`components/ColorSetting should match snapshot, disabled 1`] = ` + +
+ + + + +
+
+`; + +exports[`components/ColorSetting should match snapshot, no help text 1`] = ` + +
+ + + + +
+
+`; diff --git a/webapp/tests/components/admin_console/color_setting.test.jsx b/webapp/tests/components/admin_console/color_setting.test.jsx new file mode 100644 index 000000000..a1c44a037 --- /dev/null +++ b/webapp/tests/components/admin_console/color_setting.test.jsx @@ -0,0 +1,55 @@ +// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import React from 'react'; +import {shallow} from 'enzyme'; + +import ColorSetting from 'components/admin_console/color_setting.jsx'; + +describe('components/ColorSetting', () => { + test('should match snapshot, all', () => { + function emptyFunction() {} //eslint-disable-line no-empty-function + + const wrapper = shallow( + + ); + expect(wrapper).toMatchSnapshot(); + }); + + test('should match snapshot, no help text', () => { + function emptyFunction() {} //eslint-disable-line no-empty-function + + const wrapper = shallow( + + ); + expect(wrapper).toMatchSnapshot(); + }); + + test('should match snapshot, disabled', () => { + function emptyFunction() {} //eslint-disable-line no-empty-function + + const wrapper = shallow( + + ); + expect(wrapper).toMatchSnapshot(); + }); +}); -- cgit v1.2.3-1-g7c22