/* eslint-disable react/prop-types */ import React, { useMemo } from 'react'; import { IntlProvider } from '@edx/frontend-platform/i18n'; import TestRenderer from 'react-test-renderer'; import { Link } from 'react-router-dom'; import { AppContext } from '@edx/frontend-platform/react'; import { ActionRow, Button, Dropdown, } from '@edx/paragon'; import { StudioHeader } from './index'; const StudioHeaderComponent = ({ contextValue, appMenu = null, mainMenu = [] }) => ( ); const StudioHeaderContext = ({ actionRowContent = null }) => { const headerContextValue = useMemo(() => ({ authenticatedUser: { userId: 'abc123', username: 'edX', roles: [], administrator: false, }, config: { STUDIO_BASE_URL: process.env.STUDIO_BASE_URL, SITE_NAME: process.env.SITE_NAME, LOGIN_URL: process.env.LOGIN_URL, LOGOUT_URL: process.env.LOGOUT_URL, LOGO_URL: process.env.LOGO_URL, }, }), []); return ( ); }; describe('', () => { it('renders correctly', () => { const contextValue = { authenticatedUser: { userId: 'abc123', username: 'edX', roles: [], administrator: false, }, config: { STUDIO_BASE_URL: process.env.STUDIO_BASE_URL, SITE_NAME: process.env.SITE_NAME, LOGIN_URL: process.env.LOGIN_URL, LOGOUT_URL: process.env.LOGOUT_URL, LOGO_URL: process.env.LOGO_URL, }, }; const component = ; const wrapper = TestRenderer.create(component); expect(wrapper.toJSON()).toMatchSnapshot(); }); it('renders correctly with optional action row content', () => { const actionRowContent = ( <> Settings Dropdown Item 1 Dropdown Item 2 Dropdown Item 3 ); const component = ; const wrapper = TestRenderer.create(component); expect(wrapper.toJSON()).toMatchSnapshot(); }); });