From 44fa35ceb06eab54a093303614e4851443f8f8f4 Mon Sep 17 00:00:00 2001 From: "Kyle D. McCormick" Date: Thu, 14 Nov 2024 15:20:06 -0500 Subject: [PATCH] fix: Remove Studio Maintenance link This Studio Maintenance app has been broken for a long time, so it is being removed from edx-platform: https://github.com/openedx/edx-platform/pull/35852 --- src/Header.messages.jsx | 5 ----- src/studio-header/StudioHeader.test.jsx | 19 ------------------- src/studio-header/messages.js | 5 ----- src/studio-header/utils.js | 3 --- 4 files changed, 32 deletions(-) diff --git a/src/Header.messages.jsx b/src/Header.messages.jsx index a5ff3a589..c05b5980f 100644 --- a/src/Header.messages.jsx +++ b/src/Header.messages.jsx @@ -61,11 +61,6 @@ const messages = defineMessages({ defaultMessage: 'Studio Home', description: 'Link to the Studio Home', }, - 'header.user.menu.studio.maintenance': { - id: 'header.user.menu.studio.maintenance', - defaultMessage: 'Maintenance', - description: 'Link to the Studio Maintenance', - }, 'header.label.account.nav': { id: 'header.label.account.nav', defaultMessage: 'Account', diff --git a/src/studio-header/StudioHeader.test.jsx b/src/studio-header/StudioHeader.test.jsx index 793f91ab7..158913825 100644 --- a/src/studio-header/StudioHeader.test.jsx +++ b/src/studio-header/StudioHeader.test.jsx @@ -115,16 +115,6 @@ describe('Header', () => { expect(dropdownOption).toBeVisible(); }); - it('maintenance should not be in user menu', async () => { - currentUser = { ...authenticatedUser, administrator: false }; - const { getAllByRole, queryByText } = render(); - const userMenu = getAllByRole('button')[1]; - await waitFor(() => fireEvent.click(userMenu)); - const maintenanceButton = queryByText(messages['header.user.menu.maintenance'].defaultMessage); - - expect(maintenanceButton).toBeNull(); - }); - it('user menu should use avatar icon', async () => { currentUser = { ...authenticatedUser, avatar: null }; const { getByTestId } = render(); @@ -186,15 +176,6 @@ describe('Header', () => { expect(desktopMenu).toBeNull(); }); - it('maintenance should be in user menu', async () => { - const { getAllByRole, getByText } = render(); - const userMenu = getAllByRole('button')[1]; - await waitFor(() => fireEvent.click(userMenu)); - const maintenanceButton = getByText(messages['header.user.menu.maintenance'].defaultMessage); - - expect(maintenanceButton).toBeVisible(); - }); - it('user menu should use avatar image', async () => { const { getByTestId } = render(); const avatarImage = getByTestId('avatar-image'); diff --git a/src/studio-header/messages.js b/src/studio-header/messages.js index b3fc522a8..b57f7eac0 100644 --- a/src/studio-header/messages.js +++ b/src/studio-header/messages.js @@ -6,11 +6,6 @@ const messages = defineMessages({ defaultMessage: 'Studio Home', description: 'Link to Studio Home', }, - 'header.user.menu.maintenance': { - id: 'header.user.menu.maintenance', - defaultMessage: 'Maintenance', - description: 'Link to the Studio maintenance page', - }, 'header.user.menu.logout': { id: 'header.user.menu.logout', defaultMessage: 'Logout', diff --git a/src/studio-header/utils.js b/src/studio-header/utils.js index e95f03c4b..68f7ea5b3 100644 --- a/src/studio-header/utils.js +++ b/src/studio-header/utils.js @@ -21,9 +21,6 @@ const getUserMenuItems = ({ { href: `${studioBaseUrl}`, title: intl.formatMessage(messages['header.user.menu.studio']), - }, { - href: `${getConfig().STUDIO_BASE_URL}/maintenance`, - title: intl.formatMessage(messages['header.user.menu.maintenance']), }, { href: `${logoutUrl}`, title: intl.formatMessage(messages['header.user.menu.logout']),