Skip to content

Commit

Permalink
feat(content-sidebar): Rename constant value to match it's name
Browse files Browse the repository at this point in the history
Also use constant in mock to show they connected
  • Loading branch information
jankowiakdawid committed Jul 16, 2024
1 parent 8acdc5a commit 0772506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export const REPRESENTATIONS_RESPONSE_VIEWABLE: 'viewable' = 'viewable';
export const SIDEBAR_VIEW_SKILLS: 'skills' = 'skills';
export const SIDEBAR_VIEW_DETAILS: 'details' = 'details';
export const SIDEBAR_VIEW_METADATA: 'metadata' = 'metadata';
export const SIDEBAR_VIEW_METADATA_REDESIGN: 'metadata_redesigned' = 'metadata_redesigned';
export const SIDEBAR_VIEW_METADATA_REDESIGN: 'metadata_redesign' = 'metadata_redesign';
export const SIDEBAR_VIEW_ACTIVITY: 'activity' = 'activity';
export const SIDEBAR_VIEW_VERSIONS: 'versions' = 'versions';
export const SIDEBAR_VIEW_DOCGEN: 'docgen' = 'docgen';
Expand Down
4 changes: 3 additions & 1 deletion src/elements/content-sidebar/__mocks__/SidebarUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* eslint-disable max-classes-per-file */
import * as React from 'react';

import { SIDEBAR_VIEW_METADATA_REDESIGN } from '../../../constants';

export default {
getAsyncSidebarContent: jest.fn(panelName => {
return {
Expand All @@ -15,7 +17,7 @@ export default {
return <div data-testid="metadata-sidebar" />;
}
},
metadata_redesigned: class MetadataSidebarRedesigned extends React.Component {
[SIDEBAR_VIEW_METADATA_REDESIGN]: class MetadataSidebarRedesigned extends React.Component {
render() {
return <div data-testid="metadata-sidebar-redesigned" />;
}
Expand Down

0 comments on commit 0772506

Please sign in to comment.