文件操作 - BottomSection.test.tsx
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/core/components/sidemenu/BottomSection.test.tsx
编辑文件内容
import React from 'react'; import { shallow } from 'enzyme'; import BottomSection from './BottomSection'; jest.mock('../../config', () => ({ bootData: { navTree: [ { id: 'profile', hideFromMenu: true, }, { hideFromMenu: true, }, { hideFromMenu: false, }, { hideFromMenu: true, }, ], }, user: { orgCount: 5, orgName: 'Grafana', }, })); jest.mock('app/core/services/context_srv', () => ({ contextSrv: { sidemenu: true, isSignedIn: false, isGrafanaAdmin: false, hasEditPermissionFolders: false, }, })); describe('Render', () => { it('should render component', () => { const wrapper = shallow(<BottomSection />); expect(wrapper).toMatchSnapshot(); }); });
修改文件时间
将文件时间修改为当前时间的前一年
删除文件