Skip to content

Commit

Permalink
💄(website) display link video from menu and Contents
Browse files Browse the repository at this point in the history
Display the video menu item and the video in the Contents component.
  • Loading branch information
AntoLC committed Mar 6, 2023
1 parent 8b8bfc1 commit a113e4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import Contents from './Contents';

jest.mock('features/Contents', () => ({
ClassRooms: () => <div>Classrooms Component</div>,
//Videos: () => <div>Videos Component</div>,
Videos: () => <div>Videos Component</div>,
}));

describe('<Contents />', () => {
test('renders Contents', () => {
render(<Contents />);
expect(screen.getByText(/My Classrooms/)).toBeInTheDocument();
//expect(screen.getByText(/My Videos/)).toBeInTheDocument();
expect(screen.getByText(/My Videos/)).toBeInTheDocument();
expect(screen.getByText(/Classrooms Component/i)).toBeInTheDocument();
//expect(screen.getByText(/Videos Component/i)).toBeInTheDocument();
expect(screen.getAllByText(/See Everything/i)).toHaveLength(1);
expect(screen.getByText(/Videos Component/i)).toBeInTheDocument();
expect(screen.getAllByText(/See Everything/i)).toHaveLength(2);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StyledLink } from 'lib-components';
import { defineMessages, useIntl } from 'react-intl';
import styled from 'styled-components';

import { ClassRooms } from 'features/Contents';
import { ClassRooms, Videos } from 'features/Contents';
import { routes } from 'routes';

const messages = defineMessages({
Expand Down Expand Up @@ -33,7 +33,7 @@ const Contents = () => {

return (
<Box margin={{ top: 'medium' }}>
{/* <Box margin={{ top: 'medium' }}>
<Box margin={{ top: 'medium' }}>
<BoxText direction="row" justify="between" margin={{ bottom: 'small' }}>
<Text weight="bolder">{intl.formatMessage(messages.MyVideos)}</Text>
<Text weight="bolder">
Expand All @@ -43,7 +43,7 @@ const Contents = () => {
</Text>
</BoxText>
<Videos withPagination={false} limit={4} />
</Box> */}
</Box>
<Box margin={{ top: 'medium' }}>
<BoxText direction="row" justify="between" margin={{ bottom: 'small' }}>
<Text weight="bolder">
Expand Down
1 change: 0 additions & 1 deletion src/frontend/apps/standalone_site/src/routes/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ export const routes: Routes = {
),
subRoutes: {
VIDEO: {
hideSubRoute: true,
label: <FormattedMessage {...messages.menuContentsVideosLabel} />,
path: `/my-contents/videos`,
menuIcon: (
Expand Down

0 comments on commit a113e4e

Please sign in to comment.