diff --git a/.env b/.env index 8d2358235..b9b30856c 100644 --- a/.env +++ b/.env @@ -37,7 +37,6 @@ HOTJAR_VERSION='6' HOTJAR_DEBUG='' ACCOUNT_SETTINGS_URL='' ACCOUNT_PROFILE_URL='' -ENABLE_NOTICES='' CAREER_LINK_URL='' ENABLE_EDX_PERSONAL_DASHBOARD=false ENABLE_PROGRAMS=false diff --git a/.env.development b/.env.development index 7c547ada6..73183ccc2 100644 --- a/.env.development +++ b/.env.development @@ -43,7 +43,6 @@ HOTJAR_VERSION='6' HOTJAR_DEBUG='' ACCOUNT_SETTINGS_URL='http://localhost:1997' ACCOUNT_PROFILE_URL='http://localhost:1995' -ENABLE_NOTICES='' CAREER_LINK_URL='' ENABLE_EDX_PERSONAL_DASHBOARD=false ENABLE_PROGRAMS=false diff --git a/.env.test b/.env.test index 16087686c..aa19975b6 100644 --- a/.env.test +++ b/.env.test @@ -42,7 +42,6 @@ HOTJAR_VERSION='6' HOTJAR_DEBUG='' ACCOUNT_SETTINGS_URL='http://account-settings-url.test' ACCOUNT_PROFILE_URL='http://account-profile-url.test' -ENABLE_NOTICES='' CAREER_LINK_URL='' ENABLE_EDX_PERSONAL_DASHBOARD=true ENABLE_PROGRAMS=false diff --git a/Makefile b/Makefile index e4db73fe1..0c5c9bb2c 100755 --- a/Makefile +++ b/Makefile @@ -12,6 +12,11 @@ transifex_temp = ./temp/babel-plugin-formatjs NPM_TESTS=build i18n_extract lint test +# Variables for additional translation sources and imports (define in edx-internal if needed) +ATLAS_EXTRA_SOURCES = +ATLAS_EXTRA_INTL_IMPORTS = +ATLAS_OPTIONS = + .PHONY: test test: $(addprefix test.npm.,$(NPM_TESTS)) ## validate ci suite @@ -48,9 +53,10 @@ pull_translations: translations/frontend-platform/src/i18n/messages:frontend-platform \ translations/paragon/src/i18n/messages:paragon \ translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \ - translations/frontend-app-learner-dashboard/src/i18n/messages:frontend-app-learner-dashboard + translations/frontend-app-learner-dashboard/src/i18n/messages:frontend-app-learner-dashboard \ + $(ATLAS_EXTRA_SOURCES) - $(intl_imports) frontend-platform paragon frontend-component-footer frontend-app-learner-dashboard + $(intl_imports) frontend-platform paragon frontend-component-footer frontend-app-learner-dashboard $(ATLAS_EXTRA_INTL_IMPORTS) # This target is used by CI. validate-no-uncommitted-package-lock-changes: diff --git a/example.env.config.js b/example.env.config.js index 52656aa67..70436fd55 100644 --- a/example.env.config.js +++ b/example.env.config.js @@ -67,7 +67,6 @@ module.exports = { NEW_RELIC_LICENSE_KEY: '', ACCOUNT_SETTINGS_URL: 'http://localhost:1997', ACCOUNT_PROFILE_URL: 'http://localhost:1995', - ENABLE_NOTICES: '', CAREER_LINK_URL: '', EXPERIMENT_08_23_VAN_PAINTED_DOOR: true, }; diff --git a/package-lock.json b/package-lock.json index 4f6349763..7cbeb0a92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", "@edx/frontend-component-footer": "^14.6.0", - "@edx/frontend-component-header": "^6.6.0", + "@edx/frontend-component-header": "^8.0.0", "@edx/frontend-enterprise-hotjar": "7.2.0", "@edx/frontend-platform": "^8.3.1", "@edx/openedx-atlas": "^0.7.0", @@ -36,7 +36,7 @@ "react-helmet": "^6.1.0", "react-intl": "6.8.9", "react-redux": "^7.2.4", - "react-router-dom": "6.30.1", + "react-router-dom": "6.30.2", "react-share": "^4.4.0", "redux": "4.2.1", "redux-logger": "3.0.6", @@ -2349,9 +2349,9 @@ } }, "node_modules/@edx/frontend-component-footer": { - "version": "14.9.2", - "resolved": "https://registry.npmjs.org/@edx/frontend-component-footer/-/frontend-component-footer-14.9.2.tgz", - "integrity": "sha512-koYtfZK9flTO3ExAmaP0HDlxbV9XX8hbRE/8WNtMJh+X1B8xppT3Ft8vhGDsw6dEBo9ojndmU9805G/a8/8o3g==", + "version": "14.9.3", + "resolved": "https://registry.npmjs.org/@edx/frontend-component-footer/-/frontend-component-footer-14.9.3.tgz", + "integrity": "sha512-cr2blXNMBdrFHPvfsoNAaI2KtEUKIufQE3si7LfBDU3VQu/pPBePi99hVCgCpjIOVHUC5TA/t0SzFD5i1RDrvw==", "license": "AGPL-3.0", "dependencies": { "@fortawesome/fontawesome-svg-core": "6.7.2", @@ -2419,9 +2419,9 @@ } }, "node_modules/@edx/frontend-component-header": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/@edx/frontend-component-header/-/frontend-component-header-6.6.1.tgz", - "integrity": "sha512-ETGIpCyXq1YWR/wvc4fGzPUtGsdYfXKDtuH45sgiRx7Zt9spgNm0KYO1tah1TF1UrPjIkQErm+8LFh8me/kJCg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@edx/frontend-component-header/-/frontend-component-header-8.1.0.tgz", + "integrity": "sha512-WkRTbEpbGsDdk74utLVOeCQLjb5fxhHMwL5xkbHfex7sGw+BxZGzQlrbZ9qv957pEano9S0kyg1SbUl7zqZhjQ==", "license": "AGPL-3.0", "dependencies": { "@fortawesome/fontawesome-svg-core": "6.7.2", @@ -2500,9 +2500,9 @@ } }, "node_modules/@edx/frontend-platform": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-8.5.1.tgz", - "integrity": "sha512-8u3EdO0o7xX4vqorjOx3k2wbs2bu3DXlIA3bnD+Y56vSB5QYw6k5GzYqo9pPaTMGeq9TuLRvPLE/QFFlc3xvPg==", + "version": "8.5.2", + "resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-8.5.2.tgz", + "integrity": "sha512-YlxNWs8NW/I7F03k/jH6grWIuY/GJrspq7fqWm5K0ocvNEf+B8XKcaLUof+jVUuCItK93SoVRDZewwejnjty5w==", "license": "AGPL-3.0", "peer": true, "dependencies": { @@ -5340,7 +5340,7 @@ "dependencies": { "@standard-schema/spec": "^1.0.0", "@standard-schema/utils": "^0.3.0", - "immer": "^10.0.3", + "immer": "^11.0.0", "redux": "^5.0.1", "redux-thunk": "^3.1.0", "reselect": "^5.1.0" @@ -5381,9 +5381,9 @@ "license": "MIT" }, "node_modules/@remix-run/router": { - "version": "1.23.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.0.tgz", - "integrity": "sha512-O3rHJzAQKamUz1fvE0Qaw0xSFqsA/yafi2iqeE0pvdFtCO1viYx8QL6f3Ln/aCCTLxs68SLf0KPM9eSeM8yBnA==", + "version": "1.23.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.1.tgz", + "integrity": "sha512-vDbaOzF7yT2Qs4vO6XV1MHcJv+3dgR1sT+l3B8xxOVhUC336prMvqrvsLL/9Dnw2xr6Qhz4J0dmS0llNAbnUmQ==", "license": "MIT", "engines": { "node": ">=14.0.0" @@ -13213,9 +13213,9 @@ "license": "MIT" }, "node_modules/immer": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz", - "integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/immer/-/immer-11.0.0.tgz", + "integrity": "sha512-XtRG4SINt4dpqlnJvs70O2j6hH7H0X8fUzFsjMn1rwnETaxwp83HLNimXBjZ78MrKl3/d3/pkzDH0o0Lkxm37Q==", "license": "MIT", "funding": { "type": "opencollective", @@ -18857,12 +18857,12 @@ } }, "node_modules/react-router": { - "version": "6.30.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.1.tgz", - "integrity": "sha512-X1m21aEmxGXqENEPG3T6u0Th7g0aS4ZmoNynhbs+Cn+q+QGTLt+d5IQ2bHAXKzKcxGJjxACpVbnYQSCRcfxHlQ==", + "version": "6.30.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.2.tgz", + "integrity": "sha512-H2Bm38Zu1bm8KUE5NVWRMzuIyAV8p/JrOaBJAwVmp37AXG72+CZJlEBw6pdn9i5TBgLMhNDgijS4ZlblpHyWTA==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.23.0" + "@remix-run/router": "1.23.1" }, "engines": { "node": ">=14.0.0" @@ -18872,14 +18872,14 @@ } }, "node_modules/react-router-dom": { - "version": "6.30.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.1.tgz", - "integrity": "sha512-llKsgOkZdbPU1Eg3zK8lCn+sjD9wMRZZPuzmdWWX5SUs8OFkN5HnFVC0u5KMeMaC9aoancFI/KoLuKPqN+hxHw==", + "version": "6.30.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.2.tgz", + "integrity": "sha512-l2OwHn3UUnEVUqc6/1VMmR1cvZryZ3j3NzapC2eUXO1dB0sYp5mvwdjiXhpUbRb21eFow3qSxpP8Yv6oAU824Q==", "license": "MIT", "peer": true, "dependencies": { - "@remix-run/router": "1.23.0", - "react-router": "6.30.1" + "@remix-run/router": "1.23.1", + "react-router": "6.30.2" }, "engines": { "node": ">=14.0.0" diff --git a/package.json b/package.json index 32efb0a25..1cf63398c 100755 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "dependencies": { "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", "@edx/frontend-component-footer": "^14.6.0", - "@edx/frontend-component-header": "^6.6.0", + "@edx/frontend-component-header": "^8.0.0", "@edx/frontend-enterprise-hotjar": "7.2.0", "@edx/frontend-platform": "^8.3.1", "@edx/openedx-atlas": "^0.7.0", @@ -56,7 +56,7 @@ "react-helmet": "^6.1.0", "react-intl": "6.8.9", "react-redux": "^7.2.4", - "react-router-dom": "6.30.1", + "react-router-dom": "6.30.2", "react-share": "^4.4.0", "redux": "4.2.1", "redux-logger": "3.0.6", diff --git a/src/components/NoticesWrapper/api.js b/src/components/NoticesWrapper/api.js deleted file mode 100644 index 72284243d..000000000 --- a/src/components/NoticesWrapper/api.js +++ /dev/null @@ -1,25 +0,0 @@ -import { getConfig } from '@edx/frontend-platform'; -import { getAuthenticatedHttpClient, getAuthenticatedUser } from '@edx/frontend-platform/auth'; -import { logError, logInfo } from '@edx/frontend-platform/logging'; - -export const noticesUrl = `${getConfig().LMS_BASE_URL}/notices/api/v1/unacknowledged`; - -export const getNotices = ({ onLoad, notFoundMessage }) => { - const authenticatedUser = getAuthenticatedUser(); - - const handleError = async (e) => { - // Error probably means that notices is not installed, which is fine. - const { customAttributes: { httpErrorStatus } } = e; - if (httpErrorStatus === 404) { - logInfo(`${e}. ${notFoundMessage}`); - } else { - logError(e); - } - }; - if (authenticatedUser) { - return getAuthenticatedHttpClient().get(noticesUrl, {}).then(onLoad).catch(handleError); - } - return null; -}; - -export default { getNotices }; diff --git a/src/components/NoticesWrapper/api.test.js b/src/components/NoticesWrapper/api.test.js deleted file mode 100644 index 4470f6ece..000000000 --- a/src/components/NoticesWrapper/api.test.js +++ /dev/null @@ -1,65 +0,0 @@ -import { getAuthenticatedHttpClient, getAuthenticatedUser } from '@edx/frontend-platform/auth'; -import { logError, logInfo } from '@edx/frontend-platform/logging'; - -import * as api from './api'; - -jest.mock('@edx/frontend-platform', () => ({ - getConfig: jest.fn(() => ({ - LMS_BASE_URL: 'test-lms-url', - })), -})); - -jest.mock('@edx/frontend-platform/auth', () => ({ - getAuthenticatedHttpClient: jest.fn(), - getAuthenticatedUser: jest.fn(), -})); - -jest.mock('@edx/frontend-platform/logging', () => ({ - logError: jest.fn(), - logInfo: jest.fn(), -})); - -const testData = 'test-data'; -const successfulGet = () => Promise.resolve(testData); -const error404 = { customAttributes: { httpErrorStatus: 404 }, test: 'error' }; -const error404Get = () => Promise.reject(error404); -const error500 = { customAttributes: { httpErrorStatus: 500 }, test: 'error' }; -const error500Get = () => Promise.reject(error500); - -const get = jest.fn().mockImplementation(successfulGet); -getAuthenticatedHttpClient.mockReturnValue({ get }); -const authenticatedUser = { fake: 'user' }; -getAuthenticatedUser.mockReturnValue(authenticatedUser); - -const onLoad = jest.fn(); -describe('getNotices api method', () => { - beforeEach(() => { - jest.clearAllMocks(); - }); - describe('behavior', () => { - describe('not authenticated', () => { - it('does not fetch anything', () => { - getAuthenticatedUser.mockReturnValueOnce(null); - api.getNotices({ onLoad }); - expect(get).not.toHaveBeenCalled(); - }); - }); - describe('authenticated', () => { - it('fetches noticesUrl with onLoad behavior', async () => { - await api.getNotices({ onLoad }); - expect(get).toHaveBeenCalledWith(api.noticesUrl, {}); - expect(onLoad).toHaveBeenCalledWith(testData); - }); - it('calls logInfo if fetch fails with 404', async () => { - get.mockImplementation(error404Get); - await api.getNotices({ onLoad }); - expect(logInfo).toHaveBeenCalledWith(`${error404}. ${api.error404Message}`); - }); - it('calls logError if fetch fails with non-404 error', async () => { - get.mockImplementation(error500Get); - await api.getNotices({ onLoad }); - expect(logError).toHaveBeenCalledWith(error500); - }); - }); - }); -}); diff --git a/src/components/NoticesWrapper/hooks.js b/src/components/NoticesWrapper/hooks.js deleted file mode 100644 index f16f8fb77..000000000 --- a/src/components/NoticesWrapper/hooks.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import { getConfig } from '@edx/frontend-platform'; -import { useIntl } from '@edx/frontend-platform/i18n'; - -import { StrictDict } from 'utils'; -import { getNotices } from './api'; -import * as module from './hooks'; -import messages from './messages'; - -/** - * This component uses the platform-plugin-notices plugin to function. - * If the user has an unacknowledged notice, they will be rerouted off - * course home and onto a full-screen notice page. If the plugin is not - * installed, or there are no notices, we just passthrough this component. - */ -export const state = StrictDict({ - isRedirected: (val) => React.useState(val), // eslint-disable-line -}); - -export const useNoticesWrapperData = () => { - const [isRedirected, setIsRedirected] = module.state.isRedirected(); - const { formatMessage } = useIntl(); - - React.useEffect(() => { - if (getConfig().ENABLE_NOTICES) { - getNotices({ - onLoad: (data) => { - if (data?.data?.results?.length > 0) { - setIsRedirected(true); - window.location.replace(`${data.data.results[0]}?next=${window.location.href}`); - } - }, - notFoundMessage: formatMessage(messages.error404Message), - }); - } - }, [setIsRedirected, formatMessage]); - return { isRedirected }; -}; - -export default useNoticesWrapperData; diff --git a/src/components/NoticesWrapper/hooks.test.js b/src/components/NoticesWrapper/hooks.test.js deleted file mode 100644 index 6e308c83b..000000000 --- a/src/components/NoticesWrapper/hooks.test.js +++ /dev/null @@ -1,99 +0,0 @@ -import React from 'react'; - -import { MockUseState, formatMessage } from 'testUtils'; - -import { getConfig } from '@edx/frontend-platform'; -import { getNotices } from './api'; -import * as hooks from './hooks'; - -jest.mock('@edx/frontend-platform', () => ({ getConfig: jest.fn() })); -jest.mock('./api', () => ({ getNotices: jest.fn() })); - -jest.mock('react', () => ({ - ...jest.requireActual('react'), - useEffect: jest.fn((cb, prereqs) => ({ useEffect: { cb, prereqs } })), - useContext: jest.fn(context => context), -})); - -jest.mock('@edx/frontend-platform/i18n', () => { - const { formatMessage: fn } = jest.requireActual('testUtils'); - return { - ...jest.requireActual('@edx/frontend-platform/i18n'), - useIntl: () => ({ - formatMessage: fn, - }), - }; -}); - -getConfig.mockReturnValue({ ENABLE_NOTICES: true }); -const state = new MockUseState(hooks); - -let hook; -describe('NoticesWrapper hooks', () => { - beforeEach(() => { - jest.clearAllMocks(); - }); - describe('state hooks', () => { - state.testGetter(state.keys.isRedirected); - }); - describe('useNoticesWrapperData', () => { - beforeEach(() => { - state.mock(); - }); - describe('behavior', () => { - it('initializes state hooks', () => { - hooks.useNoticesWrapperData(); - expect(hooks.state.isRedirected).toHaveBeenCalledWith(); - }); - describe('effects', () => { - it('does not call notices if not enabled', () => { - getConfig.mockReturnValueOnce({ ENABLE_NOTICES: false }); - hooks.useNoticesWrapperData(); - const [cb, prereqs] = React.useEffect.mock.calls[0]; - expect(prereqs).toEqual([state.setState.isRedirected, formatMessage]); - cb(); - expect(getNotices).not.toHaveBeenCalled(); - }); - describe('getNotices call (if enabled) onLoad behavior', () => { - it('does not redirect if there are no results', () => { - hooks.useNoticesWrapperData(); - expect(React.useEffect).toHaveBeenCalled(); - const [cb, prereqs] = React.useEffect.mock.calls[0]; - expect(prereqs).toEqual([state.setState.isRedirected, formatMessage]); - cb(); - expect(getNotices).toHaveBeenCalled(); - const { onLoad } = getNotices.mock.calls[0][0]; - onLoad({}); - expect(state.setState.isRedirected).not.toHaveBeenCalled(); - onLoad({ data: {} }); - expect(state.setState.isRedirected).not.toHaveBeenCalled(); - onLoad({ data: { results: [] } }); - expect(state.setState.isRedirected).not.toHaveBeenCalled(); - }); - it('redirects and set isRedirected if results are returned', () => { - delete window.location; - window.location = { replace: jest.fn(), href: 'test-old-href' }; - hooks.useNoticesWrapperData(); - const [cb, prereqs] = React.useEffect.mock.calls[0]; - expect(prereqs).toEqual([state.setState.isRedirected, formatMessage]); - cb(); - expect(getNotices).toHaveBeenCalled(); - const { onLoad } = getNotices.mock.calls[0][0]; - const target = 'url-target'; - onLoad({ data: { results: [target] } }); - expect(state.setState.isRedirected).toHaveBeenCalledWith(true); - expect(window.location.replace).toHaveBeenCalledWith( - `${target}?next=${window.location.href}`, - ); - }); - }); - }); - }); - describe('output', () => { - it('forwards isRedirected from state call', () => { - hook = hooks.useNoticesWrapperData(); - expect(hook.isRedirected).toEqual(state.stateVals.isRedirected); - }); - }); - }); -}); diff --git a/src/components/NoticesWrapper/index.jsx b/src/components/NoticesWrapper/index.jsx deleted file mode 100644 index faf9b9f2e..000000000 --- a/src/components/NoticesWrapper/index.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -import useNoticesWrapperData from './hooks'; - -/** - * This component uses the platform-plugin-notices plugin to function. - * If the user has an unacknowledged notice, they will be rerouted off - * course home and onto a full-screen notice page. If the plugin is not - * installed, or there are no notices, we just passthrough this component. - */ -const NoticesWrapper = ({ children }) => { - const { isRedirected } = useNoticesWrapperData(); - return ( -
- {isRedirected === true ? null : children} -
- ); -}; - -NoticesWrapper.propTypes = { - children: PropTypes.node.isRequired, -}; - -export default NoticesWrapper; diff --git a/src/components/NoticesWrapper/index.test.jsx b/src/components/NoticesWrapper/index.test.jsx deleted file mode 100644 index add2b2fd6..000000000 --- a/src/components/NoticesWrapper/index.test.jsx +++ /dev/null @@ -1,36 +0,0 @@ -import { render, screen } from '@testing-library/react'; - -import useNoticesWrapperData from './hooks'; -import NoticesWrapper from '.'; - -jest.mock('./hooks', () => jest.fn()); - -const hookProps = { isRedirected: false }; - -const children = [some, children]; -describe('NoticesWrapper component', () => { - beforeEach(() => { - useNoticesWrapperData.mockClear(); - }); - describe('behavior', () => { - it('initializes hooks', () => { - useNoticesWrapperData.mockReturnValue(hookProps); - render({children}); - expect(useNoticesWrapperData).toHaveBeenCalledWith(); - }); - }); - describe('output', () => { - it('does not show children if redirected', () => { - useNoticesWrapperData.mockReturnValueOnce({ isRedirected: true }); - render({children}); - expect(screen.queryByText('some')).not.toBeInTheDocument(); - expect(screen.queryByText('children')).not.toBeInTheDocument(); - }); - it('shows children if not redirected', () => { - useNoticesWrapperData.mockReturnValue(hookProps); - render({children}); - expect(screen.getByText('some')).toBeInTheDocument(); - expect(screen.getByText('children')).toBeInTheDocument(); - }); - }); -}); diff --git a/src/components/NoticesWrapper/messages.js b/src/components/NoticesWrapper/messages.js deleted file mode 100644 index 6dbbefaaf..000000000 --- a/src/components/NoticesWrapper/messages.js +++ /dev/null @@ -1,11 +0,0 @@ -import { defineMessages } from '@edx/frontend-platform/i18n'; - -const messages = defineMessages({ - error404Message: { - id: 'learner-dash.notices.error404Message', - defaultMessage: 'This probably happened because the notices plugin is not installed on platform.', - description: 'Error message when notices API returns 404', - }, -}); - -export default messages; diff --git a/src/config/index.js b/src/config/index.js index ce55cf093..ae923c27e 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -14,7 +14,6 @@ const configuration = { LEARNING_BASE_URL: process.env.LEARNING_BASE_URL, SESSION_COOKIE_DOMAIN: process.env.SESSION_COOKIE_DOMAIN || '', SUPPORT_URL: process.env.SUPPORT_URL || null, - ENABLE_NOTICES: process.env.ENABLE_NOTICES || null, CAREER_LINK_URL: process.env.CAREER_LINK_URL || null, LOGO_URL: process.env.LOGO_URL, ENABLE_EDX_PERSONAL_DASHBOARD: process.env.ENABLE_EDX_PERSONAL_DASHBOARD === 'true', diff --git a/src/index.jsx b/src/index.jsx index 418d81587..49e5858ac 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -27,7 +27,6 @@ import { configuration } from './config'; import messages from './i18n'; import App from './App'; -import NoticesWrapper from './components/NoticesWrapper'; subscribe(APP_READY, () => { const root = createRoot(document.getElementById('root')); @@ -35,12 +34,10 @@ subscribe(APP_READY, () => { root.render( - - - } /> - } /> - - + + } /> + } /> + , ); diff --git a/src/index.test.jsx b/src/index.test.jsx index 53a0fdccb..ba53223f8 100644 --- a/src/index.test.jsx +++ b/src/index.test.jsx @@ -35,7 +35,6 @@ jest.mock('@edx/frontend-platform', () => ({ jest.mock('data/store', () => ({ redux: 'store' })); jest.mock('./App', () => 'App'); -jest.mock('components/NoticesWrapper', () => 'NoticesWrapper'); describe('app registry', () => { let getElement; diff --git a/src/test/app.test.jsx b/src/test/app.test.jsx index 1a23f6537..cf39efd1d 100644 --- a/src/test/app.test.jsx +++ b/src/test/app.test.jsx @@ -39,7 +39,6 @@ jest.unmock('reselect'); jest.unmock('hooks'); jest.mock('plugin-slots/WidgetSidebarSlot', () => jest.fn(() => 'widget-sidebar')); -jest.mock('components/NoticesWrapper', () => 'notices-wrapper'); jest.mock('@edx/frontend-platform', () => ({ ...jest.requireActual('@edx/frontend-platform'),