BottomSection.test.tsx 800 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import React from 'react';
  2. import { shallow } from 'enzyme';
  3. import BottomSection from './BottomSection';
  4. jest.mock('../../config', () => ({
  5. bootData: {
  6. navTree: [
  7. {
  8. id: 'profile',
  9. hideFromMenu: true,
  10. },
  11. {
  12. hideFromMenu: true,
  13. },
  14. {
  15. hideFromMenu: false,
  16. },
  17. {
  18. hideFromMenu: true,
  19. },
  20. ],
  21. },
  22. user: {
  23. orgCount: 5,
  24. orgName: 'Grafana',
  25. },
  26. }));
  27. jest.mock('app/core/services/context_srv', () => ({
  28. contextSrv: {
  29. sidemenu: true,
  30. isSignedIn: false,
  31. isGrafanaAdmin: false,
  32. hasEditPermissionFolders: false,
  33. },
  34. }));
  35. describe('Render', () => {
  36. it('should render component', () => {
  37. const wrapper = shallow(<BottomSection />);
  38. expect(wrapper).toMatchSnapshot();
  39. });
  40. });