Skip to content

Commit

Permalink
fix: Remove Studio Maintenance link (#553)
Browse files Browse the repository at this point in the history
This Studio Maintenance app has been broken for a long time,
so it is being removed from edx-platform:
openedx/edx-platform#35852
  • Loading branch information
kdmccormick authored Nov 15, 2024
1 parent 5d7b4fe commit a229c34
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
5 changes: 0 additions & 5 deletions src/Header.messages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
20 changes: 0 additions & 20 deletions src/studio-header/StudioHeader.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { Context as ResponsiveContext } from 'react-responsive';
import { MemoryRouter } from 'react-router-dom';

import StudioHeader from './StudioHeader';
import messages from './messages';

const authenticatedUser = {
userId: 3,
Expand Down Expand Up @@ -115,16 +114,6 @@ describe('Header', () => {
expect(dropdownOption).toBeVisible();
});

it('maintenance should not be in user menu', async () => {
currentUser = { ...authenticatedUser, administrator: false };
const { getAllByRole, queryByText } = render(<RootWrapper {...props} />);
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(<RootWrapper {...props} />);
Expand Down Expand Up @@ -186,15 +175,6 @@ describe('Header', () => {
expect(desktopMenu).toBeNull();
});

it('maintenance should be in user menu', async () => {
const { getAllByRole, getByText } = render(<RootWrapper {...props} />);
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(<RootWrapper {...props} />);
const avatarImage = getByTestId('avatar-image');
Expand Down
5 changes: 0 additions & 5 deletions src/studio-header/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 0 additions & 4 deletions src/studio-header/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { getConfig } from '@edx/frontend-platform';
import messages from './messages';

const getUserMenuItems = ({
Expand All @@ -21,9 +20,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']),
Expand Down

0 comments on commit a229c34

Please sign in to comment.