From 30545f99e8481f288f4d541ca0371aec55ba06b3 Mon Sep 17 00:00:00 2001 From: Emily Aquin Date: Wed, 26 Jul 2023 22:36:43 +0000 Subject: [PATCH] chore: portal appearance tab appears by default --- src/components/settings/SettingsTabs.jsx | 30 +++++++++---------- src/components/settings/data/constants.js | 2 +- .../settings/tests/SettingsPage.test.jsx | 4 +-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/settings/SettingsTabs.jsx b/src/components/settings/SettingsTabs.jsx index 3b4f292ffd..9fe2bca15d 100644 --- a/src/components/settings/SettingsTabs.jsx +++ b/src/components/settings/SettingsTabs.jsx @@ -48,6 +48,21 @@ const SettingsTabs = ({ const tabArray = useMemo(() => { const initialTabs = []; + if (SETTINGS_PAGE_APPEARANCE_TAB) { + initialTabs.push( + + + , + ); + } if (enableLearnerPortal) { initialTabs.push( , ); } - if (SETTINGS_PAGE_APPEARANCE_TAB) { - initialTabs.push( - - - , - ); - } return initialTabs; }, [ FEATURE_SSO_SETTINGS_TAB, diff --git a/src/components/settings/data/constants.js b/src/components/settings/data/constants.js index e5b15ff434..02edae89e9 100644 --- a/src/components/settings/data/constants.js +++ b/src/components/settings/data/constants.js @@ -71,7 +71,7 @@ export const SETTINGS_TAB_LABELS = { }; /** Default tab when no parameter is given */ -export const DEFAULT_TAB = ACCESS_TAB; +export const DEFAULT_TAB = APPEARANCE_TAB; /** * Url parameter that the set in the router diff --git a/src/components/settings/tests/SettingsPage.test.jsx b/src/components/settings/tests/SettingsPage.test.jsx index 8e15c00437..a0fae5b066 100644 --- a/src/components/settings/tests/SettingsPage.test.jsx +++ b/src/components/settings/tests/SettingsPage.test.jsx @@ -36,10 +36,10 @@ describe('', () => { jest.clearAllMocks(); }); - it('Redirects to access tab when no param given', () => { + it('Redirects to appearance tab when no param given', () => { render(settingsPageWithRouter('/settings')); expect(screen.queryByText('404')).toBeFalsy(); - expect(screen.queryByText('access')).toBeTruthy(); + expect(screen.queryByText('appearance')).toBeTruthy(); }); it('Does not redirect when access is passed', () => {