diff --git a/app/components/announcement_banner/announcement_banner.test.js b/app/components/announcement_banner/announcement_banner.test.js index f0d4d1f43..5312962ba 100644 --- a/app/components/announcement_banner/announcement_banner.test.js +++ b/app/components/announcement_banner/announcement_banner.test.js @@ -4,6 +4,8 @@ import React from 'react'; import {shallow} from 'enzyme'; +import Preferences from 'mattermost-redux/constants/preferences'; + import AnnouncementBanner from './announcement_banner.js'; jest.useFakeTimers(); @@ -16,7 +18,7 @@ describe('AnnouncementBanner', () => { bannerText: 'Banner Text', bannerTextColor: '#fff', navigator: {}, - theme: {}, + theme: Preferences.THEMES.default, }; test('should match snapshot', () => { diff --git a/app/components/custom_list/__snapshots__/index.test.js.snap b/app/components/custom_list/__snapshots__/index.test.js.snap index dbdad1d3a..f23e638ea 100644 --- a/app/components/custom_list/__snapshots__/index.test.js.snap +++ b/app/components/custom_list/__snapshots__/index.test.js.snap @@ -27,7 +27,7 @@ exports[`CustomList should match snapshot 1`] = ` scrollRenderAheadDistance={0} style={ Object { - "backgroundColor": "#aaa", + "backgroundColor": "#ffffff", "flex": 1, } } @@ -42,7 +42,7 @@ exports[`CustomList should match snapshot, renderFooter 2`] = ` style={ Object { "alignItems": "center", - "backgroundColor": "#aaa", + "backgroundColor": "#ffffff", "height": 70, "justifyContent": "center", } @@ -53,7 +53,7 @@ exports[`CustomList should match snapshot, renderFooter 2`] = ` id="mobile.loading_members" style={ Object { - "color": "rgba(170,170,170,0.6)", + "color": "rgba(61,60,64,0.6)", } } /> @@ -64,14 +64,14 @@ exports[`CustomList should match snapshot, renderSectionHeader 1`] = ` { const baseProps = { data: [{username: 'username_1'}, {username: 'username_2'}], - theme: {centerChannelBg: '#aaa', centerChannelColor: '#aaa'}, + theme: Preferences.THEMES.default, searching: false, onListEndReached: emptyFunc, onListEndReachedThreshold: 0, diff --git a/app/components/custom_list/user_list_row/user_list_test.test.js b/app/components/custom_list/user_list_row/user_list_test.test.js index 3e7039d46..74b717a9a 100644 --- a/app/components/custom_list/user_list_row/user_list_test.test.js +++ b/app/components/custom_list/user_list_row/user_list_test.test.js @@ -2,15 +2,12 @@ // See LICENSE.txt for license information. import React from 'react'; -import {configure, shallow} from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; +import {shallow} from 'enzyme'; import Preferences from 'mattermost-redux/constants/preferences'; import UserListRow from './user_list_row'; -configure({adapter: new Adapter()}); - jest.mock('react-intl'); jest.mock('app/utils/theme', () => { const original = require.requireActual('app/utils/theme'); diff --git a/app/components/post_list/date_header/__snapshots__/date_header.test.js.snap b/app/components/post_list/date_header/__snapshots__/date_header.test.js.snap index 5915caa45..6b7cd2508 100644 --- a/app/components/post_list/date_header/__snapshots__/date_header.test.js.snap +++ b/app/components/post_list/date_header/__snapshots__/date_header.test.js.snap @@ -17,7 +17,7 @@ exports[`DateHeader component should match snapshot with suffix 1`] = ` { const baseProps = { - theme: {centerChannelBg: '#aaa', centerChannelColor: '#aaa'}, + theme: Preferences.THEMES.default, }; describe('component should match snapshot', () => { diff --git a/app/components/show_more_button/__snapshots__/show_more_button.test.js.snap b/app/components/show_more_button/__snapshots__/show_more_button.test.js.snap index 233a6c5f0..b3c689ad9 100644 --- a/app/components/show_more_button/__snapshots__/show_more_button.test.js.snap +++ b/app/components/show_more_button/__snapshots__/show_more_button.test.js.snap @@ -39,9 +39,9 @@ exports[`ShowMoreButton should match, full snapshot 1`] = ` { highlight: false, onPress: jest.fn(), showMore: true, - theme: { - centerChannelBg: '#2f3e4e', - centerChannelColor: '#dddddd', - }, + theme: Preferences.THEMES.default, }; test('should match, full snapshot', () => { diff --git a/app/screens/error_teams_list/__snapshots__/error_teams_list.test.js.snap b/app/screens/error_teams_list/__snapshots__/error_teams_list.test.js.snap index 41f9bd477..b90dd19f4 100644 --- a/app/screens/error_teams_list/__snapshots__/error_teams_list.test.js.snap +++ b/app/screens/error_teams_list/__snapshots__/error_teams_list.test.js.snap @@ -4,7 +4,7 @@ exports[`ErrorTeamsList should match snapshot 1`] = ` `; diff --git a/app/screens/error_teams_list/error_teams_list.test.js b/app/screens/error_teams_list/error_teams_list.test.js index 532c69fef..dcf9af079 100644 --- a/app/screens/error_teams_list/error_teams_list.test.js +++ b/app/screens/error_teams_list/error_teams_list.test.js @@ -2,13 +2,13 @@ // See LICENSE.txt for license information. import React from 'react'; -import {configure, shallow} from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; +import {shallow} from 'enzyme'; + +import Preferences from 'mattermost-redux/constants/preferences'; + import FailedNetworkAction from 'app/components/failed_network_action'; import ErrorTeamsList from './error_teams_list'; -configure({adapter: new Adapter()}); - describe('ErrorTeamsList', () => { const navigator = { setOnNavigatorEvent: () => {}, // eslint-disable-line no-empty-function @@ -27,7 +27,7 @@ describe('ErrorTeamsList', () => { logout: () => {}, // eslint-disable-line no-empty-function selectDefaultTeam: () => {}, // eslint-disable-line no-empty-function }, - theme: {}, + theme: Preferences.THEMES.default, navigator, }; diff --git a/app/screens/menu_action_selector/__snapshots__/menu_action_selector.test.js.snap b/app/screens/menu_action_selector/__snapshots__/menu_action_selector.test.js.snap index 857cf952e..f13d40805 100644 --- a/app/screens/menu_action_selector/__snapshots__/menu_action_selector.test.js.snap +++ b/app/screens/menu_action_selector/__snapshots__/menu_action_selector.test.js.snap @@ -1,1243 +1,525 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`MenuActionSelector should match snapshot for channels 1`] = ` -ShallowWrapper { - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateError": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "actions": Object { - "getChannels": [Function], - "getProfiles": [Function], - "searchChannels": [Function], - "searchProfiles": [Function], - }, - "currentTeamId": "someId", - "data": Array [ - Object { - "display_name": "display_name", - "id": "id", - "name": "name", - }, - Object { - "display_name": "display_name2", - "id": "id2", - "name": "name2", - }, - ], - "dataSource": "channels", - "intl": Object { - "defaultFormats": Object {}, - "defaultLocale": "en", - "formatDate": [Function], - "formatHTMLMessage": [Function], - "formatMessage": [Function], - "formatNumber": [Function], - "formatPlural": [Function], - "formatRelative": [Function], - "formatTime": [Function], - "formats": Object {}, - "formatters": Object { - "getDateTimeFormat": [Function], - "getMessageFormat": [Function], - "getNumberFormat": [Function], - "getPluralFormat": [Function], - "getRelativeFormat": [Function], - }, - "locale": "en", - "messages": Object {}, - "now": [Function], - "textComponent": "span", - "timeZone": null, - }, - "navigator": Object { - "setOnNavigatorEvent": [MockFunction], - }, - "onSelect": [MockFunction], - "theme": Object {}, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ + `; exports[`MenuActionSelector should match snapshot for channels 2`] = ` -ShallowWrapper { - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateError": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "actions": Object { - "getChannels": [Function], - "getProfiles": [Function], - "searchChannels": [Function], - "searchProfiles": [Function], - }, - "currentTeamId": "someId", - "data": Array [ - Object { - "display_name": "display_name", - "id": "id", - "name": "name", - }, - Object { - "display_name": "display_name2", - "id": "id2", - "name": "name2", - }, - ], - "dataSource": "channels", - "intl": Object { - "defaultFormats": Object {}, - "defaultLocale": "en", - "formatDate": [Function], - "formatHTMLMessage": [Function], - "formatMessage": [Function], - "formatNumber": [Function], - "formatPlural": [Function], - "formatRelative": [Function], - "formatTime": [Function], - "formats": Object {}, - "formatters": Object { - "getDateTimeFormat": [Function], - "getMessageFormat": [Function], - "getNumberFormat": [Function], - "getPluralFormat": [Function], - "getRelativeFormat": [Function], - }, - "locale": "en", - "messages": Object {}, - "now": [Function], - "textComponent": "span", - "timeZone": null, - }, - "navigator": Object { - "setOnNavigatorEvent": [MockFunction], - }, - "onSelect": [MockFunction], - "theme": Object {}, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ + `; exports[`MenuActionSelector should match snapshot for explicit options 1`] = ` -ShallowWrapper { - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateError": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "actions": Object { - "getChannels": [Function], - "getProfiles": [Function], - "searchChannels": [Function], - "searchProfiles": [Function], - }, - "currentTeamId": "someId", - "data": Array [ - Object { - "text": "text", - "value": "value", - }, - ], - "dataSource": null, - "intl": Object { - "defaultFormats": Object {}, - "defaultLocale": "en", - "formatDate": [Function], - "formatHTMLMessage": [Function], - "formatMessage": [Function], - "formatNumber": [Function], - "formatPlural": [Function], - "formatRelative": [Function], - "formatTime": [Function], - "formats": Object {}, - "formatters": Object { - "getDateTimeFormat": [Function], - "getMessageFormat": [Function], - "getNumberFormat": [Function], - "getPluralFormat": [Function], - "getRelativeFormat": [Function], - }, - "locale": "en", - "messages": Object {}, - "now": [Function], - "textComponent": "span", - "timeZone": null, - }, - "navigator": Object { - "setOnNavigatorEvent": [MockFunction], - }, - "onSelect": [MockFunction], - "theme": Object {}, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ + `; exports[`MenuActionSelector should match snapshot for searching 1`] = ` -ShallowWrapper { - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateError": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "actions": Object { - "getChannels": [Function], - "getProfiles": [Function], - "searchChannels": [Function], - "searchProfiles": [Function], - }, - "currentTeamId": "someId", - "data": Array [ - Object { - "display_name": "display_name", - "id": "id", - "name": "name", - }, - Object { - "display_name": "display_name2", - "id": "id2", - "name": "name2", - }, - ], - "dataSource": "channels", - "intl": Object { - "defaultFormats": Object {}, - "defaultLocale": "en", - "formatDate": [Function], - "formatHTMLMessage": [Function], - "formatMessage": [Function], - "formatNumber": [Function], - "formatPlural": [Function], - "formatRelative": [Function], - "formatTime": [Function], - "formats": Object {}, - "formatters": Object { - "getDateTimeFormat": [Function], - "getMessageFormat": [Function], - "getNumberFormat": [Function], - "getPluralFormat": [Function], - "getRelativeFormat": [Function], - }, - "locale": "en", - "messages": Object {}, - "now": [Function], - "textComponent": "span", - "timeZone": null, - }, - "navigator": Object { - "setOnNavigatorEvent": [MockFunction], - }, - "onSelect": [MockFunction], - "theme": Object {}, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ + `; exports[`MenuActionSelector should match snapshot for users 1`] = ` -ShallowWrapper { - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateError": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "actions": Object { - "getChannels": [Function], - "getProfiles": [Function], - "searchChannels": [Function], - "searchProfiles": [Function], - }, - "currentTeamId": "someId", - "data": Array [ - Object { - "id": "id", - "username": "username", - }, - Object { - "id": "id2", - "username": "username2", - }, - ], - "dataSource": "users", - "intl": Object { - "defaultFormats": Object {}, - "defaultLocale": "en", - "formatDate": [Function], - "formatHTMLMessage": [Function], - "formatMessage": [Function], - "formatNumber": [Function], - "formatPlural": [Function], - "formatRelative": [Function], - "formatTime": [Function], - "formats": Object {}, - "formatters": Object { - "getDateTimeFormat": [Function], - "getMessageFormat": [Function], - "getNumberFormat": [Function], - "getPluralFormat": [Function], - "getRelativeFormat": [Function], - }, - "locale": "en", - "messages": Object {}, - "now": [Function], - "textComponent": "span", - "timeZone": null, - }, - "navigator": Object { - "setOnNavigatorEvent": [MockFunction], - }, - "onSelect": [MockFunction], - "theme": Object {}, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ + `; exports[`MenuActionSelector should match snapshot for users 2`] = ` -ShallowWrapper { - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateError": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "actions": Object { - "getChannels": [Function], - "getProfiles": [Function], - "searchChannels": [Function], - "searchProfiles": [Function], - }, - "currentTeamId": "someId", - "data": Array [ - Object { - "id": "id", - "username": "username", - }, - Object { - "id": "id2", - "username": "username2", - }, - ], - "dataSource": "users", - "intl": Object { - "defaultFormats": Object {}, - "defaultLocale": "en", - "formatDate": [Function], - "formatHTMLMessage": [Function], - "formatMessage": [Function], - "formatNumber": [Function], - "formatPlural": [Function], - "formatRelative": [Function], - "formatTime": [Function], - "formats": Object {}, - "formatters": Object { - "getDateTimeFormat": [Function], - "getMessageFormat": [Function], - "getNumberFormat": [Function], - "getPluralFormat": [Function], - "getRelativeFormat": [Function], - }, - "locale": "en", - "messages": Object {}, - "now": [Function], - "textComponent": "span", - "timeZone": null, - }, - "navigator": Object { - "setOnNavigatorEvent": [MockFunction], - }, - "onSelect": [MockFunction], - "theme": Object {}, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ + `; diff --git a/app/screens/menu_action_selector/menu_action_selector.test.js b/app/screens/menu_action_selector/menu_action_selector.test.js index 1ff24d4e6..03e3e1f88 100644 --- a/app/screens/menu_action_selector/menu_action_selector.test.js +++ b/app/screens/menu_action_selector/menu_action_selector.test.js @@ -4,6 +4,8 @@ import React from 'react'; import {shallow} from 'enzyme'; import {IntlProvider} from 'react-intl'; +import Preferences from 'mattermost-redux/constants/preferences'; + import MenuActionSelector from './menu_action_selector.js'; jest.mock('rn-fetch-blob', () => ({ @@ -76,7 +78,7 @@ describe('MenuActionSelector', () => { onSelect: jest.fn(), data: [{text: 'text', value: 'value'}], dataSource: null, - theme: {}, + theme: Preferences.THEMES.default, }; test('should match snapshot for explicit options', async () => { @@ -84,7 +86,7 @@ describe('MenuActionSelector', () => { , {context: {intl}}, ); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.getElement()).toMatchSnapshot(); }); test('should match snapshot for users', async () => { @@ -98,10 +100,10 @@ describe('MenuActionSelector', () => { , {context: {intl}}, ); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.getElement()).toMatchSnapshot(); wrapper.setState({isLoading: false}); wrapper.update(); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.getElement()).toMatchSnapshot(); }); test('should match snapshot for channels', async () => { @@ -115,10 +117,10 @@ describe('MenuActionSelector', () => { , {context: {intl}}, ); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.getElement()).toMatchSnapshot(); wrapper.setState({isLoading: false}); wrapper.update(); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.getElement()).toMatchSnapshot(); }); test('should match snapshot for searching', async () => { @@ -134,6 +136,6 @@ describe('MenuActionSelector', () => { ); wrapper.setState({isLoading: false, searching: true, term: 'name2'}); wrapper.update(); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.getElement()).toMatchSnapshot(); }); }); diff --git a/app/screens/more_channels/__snapshots__/more_channels.test.js.snap b/app/screens/more_channels/__snapshots__/more_channels.test.js.snap index db4514bbd..a1ea76ecc 100644 --- a/app/screens/more_channels/__snapshots__/more_channels.test.js.snap +++ b/app/screens/more_channels/__snapshots__/more_channels.test.js.snap @@ -18,8 +18,8 @@ exports[`MoreChannels should match snapshot 1`] = ` inputHeight={33} inputStyle={ Object { - "backgroundColor": "rgba(170,170,170,0.2)", - "color": "#aaa", + "backgroundColor": "rgba(61,60,64,0.2)", + "color": "#3d3c40", "fontSize": 15, } } @@ -29,10 +29,10 @@ exports[`MoreChannels should match snapshot 1`] = ` onFocus={[Function]} onSearchButtonPress={[Function]} onSelectionChange={[Function]} - placeholderTextColor="rgba(170,170,170,0.5)" - tintColorDelete="rgba(170,170,170,0.5)" - tintColorSearch="rgba(170,170,170,0.5)" - titleCancelColor="#aaa" + placeholderTextColor="rgba(61,60,64,0.5)" + tintColorDelete="rgba(61,60,64,0.5)" + tintColorSearch="rgba(61,60,64,0.5)" + titleCancelColor="#3d3c40" value="" /> @@ -67,10 +67,30 @@ exports[`MoreChannels should match snapshot 1`] = ` showSections={false} theme={ Object { - "centerChannelBg": "#aaa", - "centerChannelColor": "#aaa", - "sidebarHeaderBg": "#aaa", - "sidebarHeaderTextColor": "#aaa", + "awayIndicator": "#ffbc42", + "buttonBg": "#166de0", + "buttonColor": "#ffffff", + "centerChannelBg": "#ffffff", + "centerChannelColor": "#3d3c40", + "codeTheme": "github", + "dndIndicator": "#f74343", + "errorTextColor": "#fd5960", + "linkColor": "#2389d7", + "mentionBj": "#ffffff", + "mentionColor": "#145dbf", + "mentionHighlightBg": "#ffe577", + "mentionHighlightLink": "#166de0", + "newMessageSeparator": "#ff8800", + "onlineIndicator": "#06d6a0", + "sidebarBg": "#145dbf", + "sidebarHeaderBg": "#1153ab", + "sidebarHeaderTextColor": "#ffffff", + "sidebarText": "#ffffff", + "sidebarTextActiveBorder": "#579eff", + "sidebarTextActiveColor": "#ffffff", + "sidebarTextHoverBg": "#4578bf", + "sidebarUnreadText": "#ffffff", + "type": "Mattermost", } } /> diff --git a/app/screens/more_channels/more_channels.test.js b/app/screens/more_channels/more_channels.test.js index 7e89ef4de..89f8e862f 100644 --- a/app/screens/more_channels/more_channels.test.js +++ b/app/screens/more_channels/more_channels.test.js @@ -4,6 +4,8 @@ import React from 'react'; import {shallow} from 'enzyme'; +import Preferences from 'mattermost-redux/constants/preferences'; + import MoreChannels from './more_channels.js'; jest.mock('react-intl'); @@ -29,12 +31,7 @@ describe('MoreChannels', () => { currentUserId: 'current_user_id', currentTeamId: 'current_team_id', navigator, - theme: { - centerChannelBg: '#aaa', - centerChannelColor: '#aaa', - sidebarHeaderBg: '#aaa', - sidebarHeaderTextColor: '#aaa', - }, + theme: Preferences.THEMES.default, canCreateChannels: true, channels: [{id: 'id', name: 'name', display_name: 'display_name'}], closeButton: {}, diff --git a/app/screens/select_team/__snapshots__/select_team.test.js.snap b/app/screens/select_team/__snapshots__/select_team.test.js.snap index 17b97c914..2ef1a1e18 100644 --- a/app/screens/select_team/__snapshots__/select_team.test.js.snap +++ b/app/screens/select_team/__snapshots__/select_team.test.js.snap @@ -15,7 +15,34 @@ exports[`SelectTeam should match snapshot for fail of teams 1`] = ` } } onRetry={[Function]} - theme={Object {}} + theme={ + Object { + "awayIndicator": "#ffbc42", + "buttonBg": "#166de0", + "buttonColor": "#ffffff", + "centerChannelBg": "#ffffff", + "centerChannelColor": "#3d3c40", + "codeTheme": "github", + "dndIndicator": "#f74343", + "errorTextColor": "#fd5960", + "linkColor": "#2389d7", + "mentionBj": "#ffffff", + "mentionColor": "#145dbf", + "mentionHighlightBg": "#ffe577", + "mentionHighlightLink": "#166de0", + "newMessageSeparator": "#ff8800", + "onlineIndicator": "#06d6a0", + "sidebarBg": "#145dbf", + "sidebarHeaderBg": "#1153ab", + "sidebarHeaderTextColor": "#ffffff", + "sidebarText": "#ffffff", + "sidebarTextActiveBorder": "#579eff", + "sidebarTextActiveColor": "#ffffff", + "sidebarTextHoverBg": "#4578bf", + "sidebarUnreadText": "#ffffff", + "type": "Mattermost", + } + } /> `; @@ -23,7 +50,7 @@ exports[`SelectTeam should match snapshot for teams 1`] = ` { }, userWithoutTeams: false, teams: [], - theme: {}, + theme: Preferences.THEMES.default, teamsRequest: { status: RequestStatus.FAILURE, }, diff --git a/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.android.test.js.snap b/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.android.test.js.snap index c51024c1c..a72dbacb1 100644 --- a/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.android.test.js.snap +++ b/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.android.test.js.snap @@ -18,8 +18,30 @@ exports[`NotificationSettingsEmailAndroid should match snapshot 1`] = ` } theme={ Object { - "centerChannelBg": "#aaa", - "centerChannelColor": "#aaa", + "awayIndicator": "#ffbc42", + "buttonBg": "#166de0", + "buttonColor": "#ffffff", + "centerChannelBg": "#ffffff", + "centerChannelColor": "#3d3c40", + "codeTheme": "github", + "dndIndicator": "#f74343", + "errorTextColor": "#fd5960", + "linkColor": "#2389d7", + "mentionBj": "#ffffff", + "mentionColor": "#145dbf", + "mentionHighlightBg": "#ffe577", + "mentionHighlightLink": "#166de0", + "newMessageSeparator": "#ff8800", + "onlineIndicator": "#06d6a0", + "sidebarBg": "#145dbf", + "sidebarHeaderBg": "#1153ab", + "sidebarHeaderTextColor": "#ffffff", + "sidebarText": "#ffffff", + "sidebarTextActiveBorder": "#579eff", + "sidebarTextActiveColor": "#ffffff", + "sidebarTextHoverBg": "#4578bf", + "sidebarUnreadText": "#ffffff", + "type": "Mattermost", } } /> diff --git a/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.ios.test.js.snap b/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.ios.test.js.snap index c5d091780..cfc2bf383 100644 --- a/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.ios.test.js.snap +++ b/app/screens/settings/notification_settings_email/__snapshots__/notification_settings_email.ios.test.js.snap @@ -14,8 +14,30 @@ exports[`NotificationSettingsEmailIos should match snapshot, renderEmailSection headerId="mobile.notification_settings.email.send" theme={ Object { - "centerChannelBg": "#aaa", - "centerChannelColor": "#aaa", + "awayIndicator": "#ffbc42", + "buttonBg": "#166de0", + "buttonColor": "#ffffff", + "centerChannelBg": "#ffffff", + "centerChannelColor": "#3d3c40", + "codeTheme": "github", + "dndIndicator": "#f74343", + "errorTextColor": "#fd5960", + "linkColor": "#2389d7", + "mentionBj": "#ffffff", + "mentionColor": "#145dbf", + "mentionHighlightBg": "#ffe577", + "mentionHighlightLink": "#166de0", + "newMessageSeparator": "#ff8800", + "onlineIndicator": "#06d6a0", + "sidebarBg": "#145dbf", + "sidebarHeaderBg": "#1153ab", + "sidebarHeaderTextColor": "#ffffff", + "sidebarText": "#ffffff", + "sidebarTextActiveBorder": "#579eff", + "sidebarTextActiveColor": "#ffffff", + "sidebarTextHoverBg": "#4578bf", + "sidebarUnreadText": "#ffffff", + "type": "Mattermost", } } > @@ -33,8 +55,30 @@ exports[`NotificationSettingsEmailIos should match snapshot, renderEmailSection selected={true} theme={ Object { - "centerChannelBg": "#aaa", - "centerChannelColor": "#aaa", + "awayIndicator": "#ffbc42", + "buttonBg": "#166de0", + "buttonColor": "#ffffff", + "centerChannelBg": "#ffffff", + "centerChannelColor": "#3d3c40", + "codeTheme": "github", + "dndIndicator": "#f74343", + "errorTextColor": "#fd5960", + "linkColor": "#2389d7", + "mentionBj": "#ffffff", + "mentionColor": "#145dbf", + "mentionHighlightBg": "#ffe577", + "mentionHighlightLink": "#166de0", + "newMessageSeparator": "#ff8800", + "onlineIndicator": "#06d6a0", + "sidebarBg": "#145dbf", + "sidebarHeaderBg": "#1153ab", + "sidebarHeaderTextColor": "#ffffff", + "sidebarText": "#ffffff", + "sidebarTextActiveBorder": "#579eff", + "sidebarTextActiveColor": "#ffffff", + "sidebarTextHoverBg": "#4578bf", + "sidebarUnreadText": "#ffffff", + "type": "Mattermost", } } /> @@ -61,8 +105,30 @@ exports[`NotificationSettingsEmailIos should match snapshot, renderEmailSection selected={false} theme={ Object { - "centerChannelBg": "#aaa", - "centerChannelColor": "#aaa", + "awayIndicator": "#ffbc42", + "buttonBg": "#166de0", + "buttonColor": "#ffffff", + "centerChannelBg": "#ffffff", + "centerChannelColor": "#3d3c40", + "codeTheme": "github", + "dndIndicator": "#f74343", + "errorTextColor": "#fd5960", + "linkColor": "#2389d7", + "mentionBj": "#ffffff", + "mentionColor": "#145dbf", + "mentionHighlightBg": "#ffe577", + "mentionHighlightLink": "#166de0", + "newMessageSeparator": "#ff8800", + "onlineIndicator": "#06d6a0", + "sidebarBg": "#145dbf", + "sidebarHeaderBg": "#1153ab", + "sidebarHeaderTextColor": "#ffffff", + "sidebarText": "#ffffff", + "sidebarTextActiveBorder": "#579eff", + "sidebarTextActiveColor": "#ffffff", + "sidebarTextHoverBg": "#4578bf", + "sidebarUnreadText": "#ffffff", + "type": "Mattermost", } } /> diff --git a/app/screens/settings/notification_settings_email/notification_settings_email.android.test.js b/app/screens/settings/notification_settings_email/notification_settings_email.android.test.js index acf8246c7..08c98ca00 100644 --- a/app/screens/settings/notification_settings_email/notification_settings_email.android.test.js +++ b/app/screens/settings/notification_settings_email/notification_settings_email.android.test.js @@ -3,6 +3,8 @@ import React from 'react'; +import Preferences from 'mattermost-redux/constants/preferences'; + import {shallowWithIntl} from 'test/intl-test-helper'; import {emptyFunction} from 'app/utils/general'; @@ -22,10 +24,7 @@ describe('NotificationSettingsEmailAndroid', () => { }, sendEmailNotifications: true, siteName: 'Mattermost', - theme: { - centerChannelBg: '#aaa', - centerChannelColor: '#aaa', - }, + theme: Preferences.THEMES.default, }; test('should match snapshot', () => { diff --git a/app/screens/settings/notification_settings_email/notification_settings_email.ios.test.js b/app/screens/settings/notification_settings_email/notification_settings_email.ios.test.js index f202aaaec..16f62dc1d 100644 --- a/app/screens/settings/notification_settings_email/notification_settings_email.ios.test.js +++ b/app/screens/settings/notification_settings_email/notification_settings_email.ios.test.js @@ -4,6 +4,8 @@ import React from 'react'; import {shallow} from 'enzyme'; +import Preferences from 'mattermost-redux/constants/preferences'; + import {emptyFunction} from 'app/utils/general'; import SectionItem from 'app/screens/settings/section_item'; @@ -30,10 +32,7 @@ describe('NotificationSettingsEmailIos', () => { }, sendEmailNotifications: true, siteName: 'Mattermost', - theme: { - centerChannelBg: '#aaa', - centerChannelColor: '#aaa', - }, + theme: Preferences.THEMES.default, }; test('should match snapshot, renderEmailSection', () => { diff --git a/app/screens/user_profile/__snapshots__/user_profile.test.js.snap b/app/screens/user_profile/__snapshots__/user_profile.test.js.snap index be187f9c4..fa91eecd8 100644 --- a/app/screens/user_profile/__snapshots__/user_profile.test.js.snap +++ b/app/screens/user_profile/__snapshots__/user_profile.test.js.snap @@ -12,7 +12,7 @@ exports[`user_profile should match snapshot 1`] = ` { const original = require.requireActual('app/utils/theme'); return { @@ -29,11 +31,7 @@ describe('user_profile', () => { resetTo: jest.fn(), }, teams: [], - theme: { - centerChannelBg: '#aaa', - centerChannelColor: '#aaa', - color: '#aaa', - }, + theme: Preferences.THEMES.default, enableTimezone: false, user: { email: 'test@test.com',