diff --git a/src/common/AsideMenu.js b/src/common/AsideMenu.js index 433163ba..dca91132 100644 --- a/src/common/AsideMenu.js +++ b/src/common/AsideMenu.js @@ -1,4 +1,9 @@ -import { faList as listIcon, faLink as createIcon, faTags as tagsIcon } from '@fortawesome/free-solid-svg-icons'; +import { + faList as listIcon, + faLink as createIcon, + faTags as tagsIcon, + faPen as editIcon, +} from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React from 'react'; import { NavLink } from 'react-router-dom'; @@ -7,8 +12,13 @@ import classNames from 'classnames'; import { serverType } from '../servers/prop-types'; import './AsideMenu.scss'; -const AsideMenuItem = ({ children, to, ...rest }) => ( - +const AsideMenuItem = ({ children, to, className, ...rest }) => ( + {children} ); @@ -16,6 +26,7 @@ const AsideMenuItem = ({ children, to, ...rest }) => ( AsideMenuItem.propTypes = { children: PropTypes.node.isRequired, to: PropTypes.string.isRequired, + className: PropTypes.string, }; const propTypes = { @@ -48,7 +59,10 @@ const AsideMenu = (DeleteServerButton) => { Manage tags - + + + Edit this server + ', () => { it('contains links to different sections', () => { const links = wrapped.find('[to]'); - expect(links).toHaveLength(3); + expect(links).toHaveLength(4); links.forEach((link) => expect(link.prop('to')).toContain('abc123')); });